Debugging with LDMX¶
This guide provides step-by-step debugging workflows using LDMX (Land Data Model Explorer). For an overview of the LDMX interface, tabs, and features see the LDMX Overview.
When to Use LDMX¶
| Scenario | LDMX Capability |
|---|---|
| Debug DDS communication issues | Monitor all DDS topics in real-time |
| Verify resource registration | Track registration requests and responses |
| Test alarm handling | View, acknowledge, and manage alarms |
| Diagnose UACM health status | Monitor fault events and resource health |
| Validate message content | Inspect message fields and values |
| Integration testing | Verify multiple components communicate correctly |
Debugging Workflows¶
Workflow 1: Debugging Resource Registration¶
When an application fails to register or isn't appearing in the system:
Step 1: Start the Registry Service
Step 2: Open LDMX and go to the Registry Status tab
Step 3: Start your application and watch for registration
Look for:
- ✅ New entry in "Registered Resources" table
- ✅ Resource ID assigned (non-zero)
- ✅ Descriptor mapping created (if applicable)
Common Issues:
| Symptom | Cause | Solution |
|---|---|---|
| No registration appears | Wrong domain ID | Check --domain matches registry |
| Registration appears then disappears | Application crashed | Check application logs |
| "Unmapped" status | No descriptor mapping | Use Map button or check registration code |
Step 4: Verify descriptor mappings
Select a resource in the Registered Resources table, then check the Descriptor Mappings table for the corresponding mapping.
Workflow 2: Debugging Alarms¶
When alarms aren't being raised or displayed correctly:
Step 1: Start the Alarms Service
Step 2: Open the LDMX Alarms tab
Step 3: Trigger an alarm from your application
Watch for the alarm to appear in the table with:
- Correct category (Warning/Caution/Advisory)
- Correct description text
- Correct source resource ID
Step 4: Test alarm lifecycle
- Raise - Verify alarm appears as "Active"
- Acknowledge - Click Acknowledge, verify state changes
- Clear - Clear the condition, verify alarm clears
Common Issues:
| Symptom | Cause | Solution |
|---|---|---|
| Alarm not appearing | Wrong topic name | Verify using correct alarm topic |
| Wrong category | Incorrect priority field | Check alarm condition configuration |
| Can't acknowledge | Alarm already acknowledged | Check State column |
| Alarm won't clear | Clearable flag not set | Set clearable=true in alarm |
Workflow 3: Debugging UACM Health¶
When resources aren't reporting health correctly:
Step 1: Open the LDMX UACM Monitor tab
Step 2: Look for your resource in the health table
Expected states:
Operational- Resource is healthyDegraded- Resource has non-critical faultsFailed- Resource has critical faults
Step 3: Check fault events
When a fault occurs, you should see:
- Fault event in the events table
- Health state change
- Timestamp of fault
Debugging Tips:
// Ensure your application publishes health status
void publishHealthStatus() {
P_Platform_Configuration_PSM::C_Resource_Health_Status status;
status.A_sourceID().A_resourceId(m_resourceId);
status.A_healthState(P_Platform_Configuration_PSM::T_HealthStateType::L_HealthState__Operational);
m_healthPublisher->Publish(status);
}
Workflow 4: Monitoring DDS Traffic¶
For general DDS debugging and message inspection, use the Analyser and Topics tabs.
Step 1: Use the Topics tab to see all active topics
Step 2: Select a topic to see message details
- Message count
- Last received timestamp
- Message content (field values)
Step 3: Filter by topic name or source
Use the filter box to focus on specific traffic.
Debugging Tips:
- High message count with low rate = batched publishing
- Zero message count = publisher not connected or wrong topic name
- Timestamps not updating = publisher stopped or network issue
Advanced Debugging¶
Multi-Domain Systems¶
If your system uses multiple DDS domains, run separate LDMX instances:
# Terminal 1: Monitor domain 0
./ldmx # Uses default domain 0
# Terminal 2: Monitor domain 1 (separate config)
./ldmx --domain=1
Verbose Logging¶
Enable Qt debug output for more detail:
Logging Output
Debug output will appear in the terminal where LDMX was launched.
Capturing DDS Traffic¶
For offline analysis, LDMX can log messages:
- Go to File > Start Logging
- Select output file
- Reproduce the issue
- Stop logging
- Analyse the JSON log file
Common Debugging Scenarios¶
Scenario: Application Can't Connect to Registry¶
Debug Steps:
- Open LDMX Registry Status tab
- Check if Registry Service is running (shows activity)
- Verify domain ID matches
- Check network connectivity
# Verify registry is publishing
./ldmx &
./gva-registry --domain=0 &
# Watch for Registry Service messages in LDMX
Scenario: Alarms Not Appearing in HMI¶
Debug Steps:
- Open LDMX Alarms tab
- Trigger alarm from application
- Verify alarm appears in LDMX
- If yes → HMI subscription issue
- If no → Application publishing issue
Scenario: External App Not Receiving Button Events¶
Debug Steps:
- Open LDMX and monitor Display Extension topics
- Press soft key on HMI
- Verify
Hard_Button_EventorSoft_Button_Eventpublished - Verify source/target resource IDs match
Best Practices¶
During Development¶
- Always run LDMX alongside your application during development
- Watch registration on startup to verify initialisation
- Monitor alarms when testing error conditions
- Check message rates to ensure efficient publishing
During Integration Testing¶
- Log all traffic for later analysis
- Compare message counts between publisher and subscriber
- Verify timestamps are synchronised across resources
- Test failure scenarios with LDMX monitoring
During Production Debugging¶
- Start LDMX first before reproducing issues
- Filter to relevant topics to reduce noise
- Note timestamps for correlation with logs
- Export data for support requests
Quick Reference¶
Command Line Options¶
| Option | Description |
|---|---|
--domain=N |
Set DDS domain ID |
--help |
Show help message |
DDS Domain IDs¶
| Domain | Use |
|---|---|
| 0 | Default development |
| 1+ | Multi-system testing |
Key Topics to Monitor¶
| Topic | Purpose |
|---|---|
KC_Registration_Request |
Resource registration |
KC_Registration_Response |
Registry responses |
KC_Alarm |
System alarms |
KC_Resource_Health_Status |
UACM health |
See Also¶
- Registration Service - Registration concepts
- Alarms Service - Alarm system details