← Previous: ODAS Server | Next: ODAS Audio Playback →
This document describes the data format and logging system used by the ODAS (Open embeddeD Audition System) server implementation. ODAS provides two separate data streams: one for tracked sources and one for potential sources.
The ODAS server creates and manages log files in the following directory structure:
hexapod/
└── logs/
└── odas/
├── tracked.log # Logs for tracked sound sources
├── potential.log # Logs for potential sound sources
└── console.log # General server console output
The ODAS server receives data in the following format:
- 4-byte size header (unsigned integer)
- JSON payload of the specified size
The server processes and logs two types of data streams:
{
"id": 2, # Unique identifier (0 = inactive, >0 = active)
"tag": "dynamic", # Source type ("dynamic" = automatically detected)
"x": 0.865, # X coordinate (-1.0 to 1.0)
"y": 0.143, # Y coordinate (-1.0 to 1.0)
"z": 0.481, # Z coordinate (-1.0 to 1.0)
"activity": 0.998 # Activity level (0.0 to 1.0)
}{
"id": 0, # Always 0 for potential sources
"tag": "", # Empty for potential sources
"x": 0.0, # X coordinate (-1.0 to 1.0)
"y": 0.0, # Y coordinate (-1.0 to 1.0)
"z": 0.0, # Z coordinate (-1.0 to 1.0)
"activity": 0.0 # Activity level (0.0 to 1.0)
}id:- 0: Inactive or potential source
- > 0: Active tracked source with unique identifier
tag:- "": Empty for potential sources
- "dynamic": Automatically detected and tracked source
x,y,z: 3D coordinates of the sound source (-1.0 to 1.0)activity: Probability of the source being active (0.0 to 1.0)
- Currently active and tracked sound sources
- Have non-zero IDs
- Represent sources that have been confirmed and are being actively tracked
- Only logged in tracked.log when active (non-zero ID)
- New or untracked sound sources being detected
- Always have ID 0
- Represent possible sound sources that haven't been confirmed for tracking
- All potential sources are logged in potential.log
- May transition to tracked sources if they meet tracking criteria
- Log files are created in the
hexapod/logs/odas/directory - Files are overwritten when the server starts
- All logs from the current session are preserved until server restart
Each log entry includes:
- Timestamp
- Data type (tracked/potential)
- JSON payload with source information
- Server provides status updates every 15 seconds
- Shows number of active tracked sources
- Indicates when monitoring for new potential sources
- Warns if no active sources are detected
- JSON parsing errors are logged with the raw data for debugging
- Connection errors and timeouts are logged in the console log
- Directory creation errors fall back to the current directory
The server can be configured with the following parameters:
- Host IP address (default: 192.168.0.171)
- Tracked port (default: 9000)
- Potential port (default: 9001)
The server handles shutdown gracefully by:
- Closing all client connections
- Flushing and closing log files
- Cleaning up server sockets
- Terminating all threads