Skip to main content

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

  1. Set up virtual environment:

    python3 -m venv venv
    source venv/bin/activate
    
  2. Install dependencies:

    pip install -r requirements.txt
    
  3. Install in development mode:

    pip install -e .
    
  4. 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 check
  • GET /version-info - Server version information

Collection Endpoints

  • GET /areas - List vehicle areas
  • GET /components - List vehicle components
  • GET /apps - List diagnostic applications

Entity Endpoints

  • GET /{entity-path} - Get entity capabilities
  • GET /{entity-path}/data - Get data resources
  • GET /{entity-path}/data/{data-id} - Get specific data resource
  • GET /{entity-path}/operations - Get operations
  • GET /{entity-path}/operations/{operation-id} - Get specific operation
  • POST /{entity-path}/operations/{operation-id} - Start operation execution
  • GET /{entity-path}/faults - Get faults
  • GET /{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:

  1. Add new entities: Create new YAML files in src/sovd_server/config/entities/
  2. Add new resources: Create new YAML files in src/sovd_server/config/resources/
  3. Modify data: Update the YAML files with new data
  4. 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

  1. Configuration not loading: Check file paths in YAML files
  2. Endpoints returning 404: Verify entity paths match configuration
  3. Data not found: Check resource file references in entity configs
  4. 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

sovd_server-1.0.0.tar.gz (54.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sovd_server-1.0.0-py3-none-any.whl (90.9 kB view details)

Uploaded Python 3

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

Hashes for sovd_server-1.0.0.tar.gz
Algorithm Hash digest
SHA256 06bde8882b04a56cc49bc545ace83748bd42a2d0d7ef9873a6088faef9d33de6
MD5 cb0e9beeae49b704b0e610877f692bbf
BLAKE2b-256 8a08fad3a4692f0351843c2747f7971ba8ef55fbd220d79c170e6c07c38e75d4

See more details on using hashes here.

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

Hashes for sovd_server-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9796d5644d55e25bb31a06080d6b22ed47c77d734e49fa5f6463a3917beaf220
MD5 c8cff8c6ee30f751be44b5f3fa36520e
BLAKE2b-256 657584ce1b04cce35d4f6959c416b3feec53b1cc13b2eb86a7f126e720fb5939

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page