External Applications¶
The GVA architecture supports integration of external applications through a standardised DDS-based interface. This enables third-party software to operate within the vehicle environment while maintaining system integrity.
Overview¶
External applications can:
- Display content in the HMI control area
- Receive user input via soft keys
- Access GVA services (Registration, Alarms, UACM)
- Communicate with other systems via DDS
Integration Architecture¶
graph TB
subgraph "HMI"
CA[Control Area]
SK[Soft Keys]
FS[Function Select]
end
subgraph "External App"
APP[Application Logic]
REN[Renderer]
INP[Input Handler]
end
subgraph "GVA Services"
REG[Registration]
ALM[Alarms]
UACM[UACM]
end
subgraph "DDS Network"
DDS((DDS))
end
APP --> REG
APP --> ALM
APP --> UACM
REN -->|Display Data| DDS
DDS -->|Display Data| CA
SK -->|Key Events| DDS
DDS -->|Key Events| INP
FS -->|Select App| DDS
DDS -->|Activate| APP
Message Sequence¶
Application Lifecycle¶
sequenceDiagram
participant App as External App
participant DDS as DDS Network
participant Reg as Registration
participant HMI as HMI
participant Op as Operator
Note over App: Application starts
App->>DDS: Register application
DDS->>Reg: Store registration
DDS->>HMI: Update app list
HMI->>HMI: Add to Function Select
Note over Op: Operator selects app
Op->>HMI: Press Function Select
HMI->>DDS: FunctionSelect event
DDS->>App: Application activated
Note over App: Application active
App->>DDS: Publish display data
DDS->>HMI: Render in Control Area
loop User interaction
Op->>HMI: Press soft key
HMI->>DDS: KeyEvent
DDS->>App: Handle key
App->>DDS: Update display
DDS->>HMI: Refresh display
end
Note over Op: Operator switches app
Op->>HMI: Select different function
HMI->>DDS: FunctionSelect event
DDS->>App: Application deactivated
App->>App: Pause/save state
Note over App: Application stops
App->>DDS: Deregister
DDS->>Reg: Remove registration
DDS->>HMI: Update app list
Display Rendering¶
sequenceDiagram
participant App as External App
participant DDS as DDS Network
participant HMI as HMI
participant GPU as Renderer
Note over App: Render frame
App->>App: Generate graphics commands
App->>DDS: Publish DisplayData
Note right of App: drawCommands[],
width, height,
timestamp DDS->>HMI: Receive DisplayData HMI->>GPU: Execute draw commands GPU->>GPU: Clear control area loop For each command GPU->>GPU: Parse command alt DrawRect GPU->>GPU: Draw rectangle else DrawText GPU->>GPU: Render text else DrawImage GPU->>GPU: Blit image else DrawLine GPU->>GPU: Draw line end end GPU->>HMI: Frame complete HMI->>HMI: Swap buffers
width, height,
timestamp DDS->>HMI: Receive DisplayData HMI->>GPU: Execute draw commands GPU->>GPU: Clear control area loop For each command GPU->>GPU: Parse command alt DrawRect GPU->>GPU: Draw rectangle else DrawText GPU->>GPU: Render text else DrawImage GPU->>GPU: Blit image else DrawLine GPU->>GPU: Draw line end end GPU->>HMI: Frame complete HMI->>HMI: Swap buffers
Soft Key Handling¶
sequenceDiagram
participant Op as Operator
participant HMI as HMI
participant DDS as DDS Network
participant App as External App
Note over App: App requests key labels
App->>DDS: Publish SoftKeyConfig
Note right of App: key[0]="ZOOM IN"
key[1]="ZOOM OUT"
key[2]=""
key[3]="EXIT" DDS->>HMI: Update key labels HMI->>HMI: Display labels Note over Op: Operator presses key Op->>HMI: Press Soft Key 1 HMI->>DDS: Publish KeyEvent Note right of HMI: keyId=1,
state=PRESSED DDS->>App: Receive KeyEvent App->>App: Handle zoom out App->>DDS: Update display HMI->>DDS: Publish KeyEvent Note right of HMI: keyId=1,
state=RELEASED DDS->>App: Key released
key[1]="ZOOM OUT"
key[2]=""
key[3]="EXIT" DDS->>HMI: Update key labels HMI->>HMI: Display labels Note over Op: Operator presses key Op->>HMI: Press Soft Key 1 HMI->>DDS: Publish KeyEvent Note right of HMI: keyId=1,
state=PRESSED DDS->>App: Receive KeyEvent App->>App: Handle zoom out App->>DDS: Update display HMI->>DDS: Publish KeyEvent Note right of HMI: keyId=1,
state=RELEASED DDS->>App: Key released
External Application Interface¶
Display Data¶
| Field | Type | Description |
|---|---|---|
applicationId |
string | Unique application ID |
width |
int | Display width in pixels |
height |
int | Display height in pixels |
commands |
list | Draw command list |
timestamp |
datetime | Frame time |
Draw Commands¶
| Command | Description |
|---|---|
| CLEAR | Clear display area |
| RECT | Draw rectangle outline |
| FILLED_RECT | Draw filled rectangle |
| LINE | Draw line |
| TEXT | Draw text |
| IMAGE | Draw image/sprite |
| ARC | Draw arc |
| POLYGON | Draw polygon |
Soft Key Configuration¶
| Field | Type | Description |
|---|---|---|
applicationId |
string | Application ID |
keys |
array[6] | Key label strings |
enabled |
array[6] | Key enabled flags |
Key Events¶
| Field | Type | Description |
|---|---|---|
applicationId |
string | Target application |
keyId |
int | Key number (0-5) |
state |
enum | PRESSED, RELEASED |
timestamp |
datetime | Event time |
Application Types¶
Information Display¶
Applications that display static or slowly-changing information:
- Map overlays
- System status displays
- Documentation viewers
- Reference tables
Interactive Tools¶
Applications requiring user input:
- Configuration editors
- Diagnostic tools
- Planning aids
- Communication interfaces
Games and Training¶
Applications for operator training and entertainment:
- Simulation games
- Training scenarios
- Skill development tools
Best Practices¶
Registration¶
- Register immediately - Don't delay registration
- Unique application ID - Use organisation prefix
- Meaningful name - Operators see this in menus
Display¶
- Respect boundaries - Stay within control area
- Consistent styling - Match GVA visual language
- Efficient rendering - Minimise draw commands
- Handle resize - Support different display sizes
Input Handling¶
- Clear key labels - Max 8 characters
- Disable unused keys - Set enabled=false
- Responsive feedback - Update display quickly
Resource Management¶
- Clean shutdown - Deregister properly
- Memory efficiency - Don't leak resources
- CPU considerate - Yield when inactive
Troubleshooting¶
Application Not Listed¶
- Check registration is published
- Verify systemType is APPLICATION
- Ensure HMI is receiving registrations
Display Not Updating¶
- Verify application is active
- Check DisplayData topic
- Ensure timestamp is updating
Keys Not Responding¶
- Check KeyEvent topic subscription
- Verify applicationId filter
- Ensure SoftKeyConfig is published