Files
cloud-services/services/virtual-vehicle/README.md
Chris Rai 454f313556 virtual-vehicle: add simulator for mini cluster
- Uses public dev manufacturer endpoint for cert registration
- Connects to local gateway via websocket
- Generates fake CAN frames and sends telemetry
- Image: localhost:32000/virtual-vehicle:latest
2026-02-02 20:55:45 -05:00

36 lines
1.0 KiB
Markdown

# Virtual Vehicle Simulator
A lightweight vehicle simulator that generates CAN telemetry and sends it to the cloud gateway.
## Overview
This service simulates a connected vehicle (T.Rex) by:
1. Registering with the manufacturer API to get certificates
2. Connecting to the gateway via WebSocket with mTLS
3. Generating and sending CAN frames
## Configuration
| Env Var | Description | Default |
|---------|-------------|---------|
| MANUFACTURER_URL | URL for vehicle registration | http://gateway:8077/manufacture/manufacturer |
| GATEWAY_WS_URL | WebSocket URL for gateway | ws://gateway:8077/session |
| API_KEY | API key for manufacturer endpoint | - |
| VIN_PREFIX | Prefix for generated VIN | VIRTUAL |
| SEND_INTERVAL_MS | Telemetry interval in ms | 1000 |
## CAN Frame IDs
| CAN ID | Description |
|--------|-------------|
| 0x100 | Speed |
| 0x101 | RPM |
| 0x102 | Battery SOC |
| 0x103 | Battery voltage |
| 0x104 | Temperature |
| 0x105 | GPS latitude |
| 0x106 | GPS longitude |
| 0x200 | Door status |
| 0x201 | Light status |
| 0x300 | HVAC |