Vicon Driver Testing Guide
Proxy Architecture Overview
CTrack uses a proxy-based architecture for communicating with external measurement devices. Instead of embedding device-specific code directly into the main application, each device driver runs as a separate executable that communicates with CTrack via TCP/IP.
Advantages of the Proxy Approach
Stress Testing the Vicon Driver
The Vicon proxy includes a built-in stress test facility to verify communication stability over extended periods. This is essential for validating that the driver can maintain reliable connections during long measurement sessions.
Starting the Stress Test
- Launch the Vicon proxy executable
- Press z to start the stress test
- Press y to stop the stress test
Test Phases
The stress test executes in four phases:
Action Types
| Action | Description |
|---|---|
| Hardware Detect | Re-detect Vicon hardware |
| Config Detect | Re-detect markers and subjects |
| Start Tracking | Begin frame acquisition at 50 Hz |
| Stop Tracking | End frame acquisition |
| Wait Short | Wait 5-30 seconds |
| Wait Medium | Wait 30-120 seconds |
| Wait Long | Wait 2-5 minutes |
Tracking State Machine
When tracking is active, the stress test enforces a minimum measurement duration (10-120 seconds randomly selected) before allowing stop:
Frame Processing During Tracking
While tracking is active, the stress test:
- Calls Run() at approximately 50 Hz to process incoming frames
- Displays frame number and FPS in the console's top-right corner
- Logs frame processing statistics every 10 seconds
ConsoleVicon SDKDriverViconStressTestConsoleVicon SDKDriverViconStressTestloop[Every ~20ms (50 Hz)]Run()GetFrame()Frame DataProcess 6DOF & MarkersPrintStatusTopRight(Frame, FPS)true
Tracy Profiling Integration
Prerequisites
Tracy profiling is only active in the Profiler build configuration, which defines:
- TRACY_ENABLE - Enables Tracy instrumentation
- TRACY_ON_DEMAND - Only captures when Tracy profiler is connected
Zone Color Coding
DriverVicon.cpp
| Function | Zone Name | Color | Hex Code | Description |
|---|---|---|---|---|
| Connect() | Vicon::Connect | Blue | 0x4488FF | Establishes connection to Vicon DataStream server |
| Disconnect() | Vicon::Disconnect | Red | 0xFF4444 | Disconnects from Vicon DataStream server |
| HardwareDetect() | Vicon::HardwareDetect | Green | 0x44FF44 | Detects connected Vicon cameras |
| ConfigDetect() | Vicon::ConfigDetect | Orange | 0xFFAA00 | Detects markers and 6DOF subjects |
| CheckInitialize() | Vicon::CheckInitialize | Cyan | 0x00FFFF | Initializes tracking at specified frequency |
| Run() | Vicon::Run | Magenta | 0xFF00FF | Processes incoming frame data |
| GetValues() | Vicon::GetValues | Light Blue | 0x8888FF | Retrieves current tracking values |
| ShutDown() | Vicon::ShutDown | Dark Orange | 0xFF8800 | Stops tracking and disconnects |
StressTest.cpp
| Function | Zone Name | Color | Hex Code | Description |
|---|---|---|---|---|
| DoHardwareDetect() | StressTest::HardwareDetect | Green | 0x44FF44 | Stress test hardware detection action |
| DoConfigDetect() | StressTest::ConfigDetect | Orange | 0xFFAA00 | Stress test configuration detection action |
| DoStartTracking() | StressTest::StartTracking | Cyan | 0x00FFFF | Stress test start tracking action |
| DoStopTracking() | StressTest::StopTracking | Red | 0xFF4444 | Stress test stop tracking action |
| DoShutdown() | StressTest::Shutdown | Dark Orange | 0xFF8800 | Stress test final shutdown action |
| DoWait() | StressTest::Wait | Gray | 0x888888 | Stress test wait period |
Message Color Coding
Tracy messages are sent from the StressTest logging functions to provide real-time visibility into test progress.
| Log Level | Color | Hex Code | Usage |
|---|---|---|---|
| Info | Green | 0x44FF44 | General information messages |
| Warning | Yellow | 0xFFFF00 | Warning conditions |
| Error | Red | 0xFF4444 | Error conditions |
| Action Success | Green | 0x44FF44 | Successful action completion |
| Action Failure | Red | 0xFF4444 | Failed action completion |
Color Reference
| Color Name | Sample | Hex Code | Usage |
|---|---|---|---|
| Blue | ![]() | #4488FF | Connection operations |
| Light Blue | ![]() | #8888FF | Data retrieval |
| Cyan | ![]() | #00FFFF | Initialization/Start |
| Green | ![]() | #44FF44 | Detection/Success/Info |
| Orange | ![]() | #FFAA00 | Configuration |
| Dark Orange | ![]() | #FF8800 | Shutdown |
| Red | ![]() | #FF4444 | Disconnect/Stop/Error |
| Magenta | ![]() | #FF00FF | Runtime processing |
| Yellow | ![]() | #FFFF00 | Warnings |
| Gray | ![]() | #888888 | Waiting/Idle |
Usage
- Build the Vicon proxy using the Profiler|x64 configuration
- Run the Vicon proxy executable
- Connect the Tracy profiler application to capture data
- Zones will appear in the timeline view with their assigned colors
- Messages will appear in the messages panel with color coding
Stress Test Sequence
When running the stress test (press 'z' to start, 'y' to stop):
- Phase 1: Hardware Detection

- Phase 2: Configuration Detection

- Phase 3: Random Actions (various colors based on action)
- Phase 4: Final Shutdown

All phases emit Tracy messages for detailed logging visibility.
Log File Output
All stress test activity is logged to a dedicated file for post-test analysis.
Log File Location
Proxies/Log/ViconStressTest_YYYYMMDD_HHMMSS.log
Log Structure
Log Format
Each log entry includes:
[YYYY-MM-DD HH:MM:SS.mmm] [LEVEL] Message
Levels: INFO, WARNING, ERROR
Log Contents
The log file records:
- Test Configuration - Start time, test parameters, measurement duration range
- Action Results - Each action with success/failure status and duration
- Hardware Information - Detected cameras, markers, and 6DOF subjects
- Frame Processing Statistics - Tracking state and Run() call counts
- Test Summary - Total duration, iterations, success and error counts
Example Log Output
[2025-12-12 15:39:36.067] [INFO] === STRESS TEST STARTED === [2025-12-12 15:39:36.067] [INFO] Purpose: Test Vicon communication stability [2025-12-12 15:39:36.068] [INFO] Measurement duration: 10-120 seconds (randomly selected per tracking session) [2025-12-12 15:39:36.070] [INFO] Test loop started [2025-12-12 15:39:36.070] [INFO] === PHASE 1: Hardware Detection === [2025-12-12 15:39:36.072] [INFO] Executing Hardware Detect... [2025-12-12 15:39:36.190] [INFO] Hardware present: Yes [2025-12-12 15:39:36.191] [INFO] Feedback: SDK Version 1:12:0:145507 Detected 4 cameras [2025-12-12 15:39:37.933] [INFO] Executing Start Tracking... [2025-12-12 15:39:38.027] [INFO] Tracking started successfully at 50 Hz - will track for 42 seconds before allowing stop [2025-12-12 15:39:38.540] [INFO] DoWait state: m_bCurrentlyTracking=true, driver->IsRunning()=true [2025-12-12 15:39:48.540] [INFO] Processed 50 Run() calls in last second ... [2025-12-12 15:41:03.826] [INFO] === STRESS TEST COMPLETED === [2025-12-12 15:41:03.827] [INFO] Total duration: 0h 1m 27s [2025-12-12 15:41:03.828] [INFO] Total iterations: 7 [2025-12-12 15:41:03.828] [INFO] Successful actions: 7 [2025-12-12 15:41:03.829] [INFO] Errors encountered: 0
Error Handling
The stress test automatically stops on any error to prevent cascading failures:
Common error scenarios:
| Error | Message | Cause |
|---|---|---|
| Connection Lost | Driver Run() returned false during wait | Network or SDK issue |
| Hardware Not Found | Hardware not detected | Vicon system offline |
| Tracking Failed | Failed to start tracking | Configuration error |
Console Commands Reference
| Key | Action |
|---|---|
| q | Quit the proxy |
| h | Manual hardware detect |
| c | Manual configuration detect |
| s | Manual start tracking |
| t | Manual stop tracking |
| z | Start stress test |
| y | Stop stress test |
Test configuration
Extra programs
- TCP view
- Wireshark
- Tracy



















