SOVD (Service-Oriented Vehicle Data) Server Implementation
Project description
SOVD Server with YAML Configuration
This project implements a Service-Oriented Vehicle Diagnostics (SOVD) server based on ISO/DIS 17978-3:2025 with YAML-based configuration support.
Features
- Hierarchical YAML Configuration: Multi-level configuration system with gateway, entity, and resource configurations
- Real Data Endpoints: Actual data for data resources, operations, faults, and modes
- No Authentication: Simplified setup without authorization layer for testing
- RESTful API: Full SOVD API implementation with proper JSON responses
- Configurable Entities: Support for areas, components, and applications
- Resource Management: Data resources, operations, faults, modes, and configurations
Project Structure
sovd_server/
├── src/
│ └── sovd_server/ # Main source code
│ ├── config/ # Configuration files
│ │ ├── sovd_gateway.yaml # Main gateway configuration
│ │ ├── entities/ # Entity configurations
│ │ │ ├── areas.yaml
│ │ │ ├── components.yaml
│ │ │ └── apps.yaml
│ │ └── resources/ # Resource configurations
│ │ ├── data/ # Data resource configs
│ │ ├── operations/ # Operation configs
│ │ ├── faults/ # Fault configs
│ │ └── modes/ # Mode configs
│ ├── enhanced_server.py # Enhanced server with YAML support
│ ├── config_loader.py # YAML configuration loader
│ └── run_enhanced_server.py # Server runner script
├── tests/ # Test files
│ ├── test_config.py # Configuration testing
│ ├── test_endpoints.py # Endpoint testing
│ └── debug_*.py # Debug utilities
├── generated/ # Auto-generated SOVD server
├── docs/ # Documentation
├── requirements.txt # Dependencies
├── setup.py # Package setup
├── pyproject.toml # Modern Python project config
└── Makefile # Development commands
Configuration System
Gateway Configuration (config/sovd_gateway.yaml)
- Network settings (host, port)
- Logging configuration
- Security settings (disabled for testing)
- Entity and resource file references
Entity Configurations
- Areas: Vehicle areas (engine, transmission, brakes)
- Components: Vehicle components (ECU, sensors, cameras)
- Apps: Diagnostic applications
Resource Configurations
- Data Resources: Actual data with schemas (e.g., SoftwarePartNumber, EngineRPM)
- Operations: Operation definitions with request/response payloads (e.g., calibratecamera)
- Faults: Fault definitions with severity and diagnostic information
- Modes: Operation modes with capabilities and limitations
Installation
-
Set up virtual environment:
python3 -m venv venv source venv/bin/activate
-
Install dependencies:
pip install -r requirements.txt
-
Install in development mode:
pip install -e .
-
Test configuration:
python tests/test_config.py
Running the Server
Enhanced Server (Recommended)
make run-server
# or
python src/sovd_server/run_enhanced_server.py
Simple Server (Basic)
python generated/simple_server.py
Development Commands
make help # Show all available commands
make install-dev # Install development dependencies
make test # Run all tests
make lint # Run linting checks
make format # Format code with black
make clean # Clean up build artifacts
API Endpoints
Basic Endpoints
GET /health- Health checkGET /version-info- Server version information
Collection Endpoints
GET /areas- List vehicle areasGET /components- List vehicle componentsGET /apps- List diagnostic applications
Entity Endpoints
GET /{entity-path}- Get entity capabilitiesGET /{entity-path}/data- Get data resourcesGET /{entity-path}/data/{data-id}- Get specific data resourceGET /{entity-path}/operations- Get operationsGET /{entity-path}/operations/{operation-id}- Get specific operationPOST /{entity-path}/operations/{operation-id}- Start operation executionGET /{entity-path}/faults- Get faultsGET /{entity-path}/modes- Get modes
Example Usage
Get Engine Data
curl http://localhost:8080/engine/data
Get Software Part Number
curl http://localhost:8080/engine/data/SoftwarePartNumber
Start Camera Calibration
curl -X POST http://localhost:8080/camera/front/operations/calibratecamera \
-H "Content-Type: application/json" \
-d '{"calibration_type": "automatic", "target_distance": 10.0}'
Configuration Examples
Data Resource Example
data_resources:
- id: "SoftwarePartNumber"
name: "Software Part Number"
description: "Current software part number installed on the engine ECU"
category: "software"
data:
value: "SW-ENG-2024.1.0-REV-A"
version: "2024.1.0"
revision: "A"
Operation Example
operations:
- id: "calibratecamera"
name: "Calibrate Camera"
description: "Calibrate the front camera system for optimal performance"
execution:
type: "asynchronous"
timeout: 300
request_payload:
calibration_type:
type: "string"
enum: ["automatic", "manual", "advanced"]
default: "automatic"
Testing
Run All Tests
make test
Configuration Test
python tests/test_config.py
Endpoint Test
python tests/test_endpoints.py
Development
The system is designed to be easily extensible:
- Add new entities: Create new YAML files in
src/sovd_server/config/entities/ - Add new resources: Create new YAML files in
src/sovd_server/config/resources/ - Modify data: Update the YAML files with new data
- Add endpoints: Extend the enhanced server with new routes
Documentation
Full documentation is in the docs/ directory: configuration, contributing, testing, deployment, security, and changelog.
Notes
- The server runs without authentication for testing purposes
- All configuration is loaded from YAML files
- The system uses the auto-generated SOVD models for proper API compliance
- CORS is enabled for web client testing
- Logging is configured through the gateway configuration
Troubleshooting
- Configuration not loading: Check file paths in YAML files
- Endpoints returning 404: Verify entity paths match configuration
- Data not found: Check resource file references in entity configs
- Server not starting: Check port availability and dependencies
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file sovd_server-1.0.0.tar.gz.
File metadata
- Download URL: sovd_server-1.0.0.tar.gz
- Upload date:
- Size: 54.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
06bde8882b04a56cc49bc545ace83748bd42a2d0d7ef9873a6088faef9d33de6
|
|
| MD5 |
cb0e9beeae49b704b0e610877f692bbf
|
|
| BLAKE2b-256 |
8a08fad3a4692f0351843c2747f7971ba8ef55fbd220d79c170e6c07c38e75d4
|
File details
Details for the file sovd_server-1.0.0-py3-none-any.whl.
File metadata
- Download URL: sovd_server-1.0.0-py3-none-any.whl
- Upload date:
- Size: 90.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9796d5644d55e25bb31a06080d6b22ed47c77d734e49fa5f6463a3917beaf220
|
|
| MD5 |
c8cff8c6ee30f751be44b5f3fa36520e
|
|
| BLAKE2b-256 |
657584ce1b04cce35d4f6959c416b3feec53b1cc13b2eb86a7f126e720fb5939
|