Follow these steps to build the runtime configuration JSON that controls folders, threading, CPU affinity, startup state, and recording policies in APIC.
In APICCenter (project page config.json) the recorder keys show a description and unit; fixed values are lists
(report 0 / 1 / 2, startRecording boot / model, ioMode, onOverflow, ...); + on recorder adds missing settings with their default and a comment.
1. Define Folders
Set the logical directories used by the system.
| Field | Description |
|---|---|
setups | Directory containing setup configuration files. |
tests | Directory containing test scenarios. |
{
"folders": {
"setups": "./setups",
"tests": "./tests"
}
}
setup/test command-line arguments — see CoreEngine Command-Line Arguments.
2. Configure the RealTime Thread
Control the main real-time processing thread.
| Field | Description |
|---|---|
affinity | CPU core binding (comma and range supported). |
priority | Thread scheduling priority (higher = more critical). |
bTimingFixTime | If true, enforces fixed-cycle timing compensation. |
"0,3,4-6" binds to cores 0, 3, 4, 5, 6.{
"RealTime": {
"affinity": "0,3,4-6",
"priority": 6,
"bTimingFixTime": true
}
}
3. Configure the Keyboard Thread
Handles interactive keyboard control.
| Field | Description |
|---|---|
affinity | Dedicated CPU core binding. |
priority | Thread priority. |
active | Enable/disable keyboard monitoring. |
{
"Keyboard": {
"affinity": "2",
"priority": 9,
"active": true
}
}
4. Configure the Reflector
This thread connects the CoreEngine out to a running Reflector app instance and streams this engine's shared memory to it for remote monitoring and interaction.
| Field | Description |
|---|---|
affinity | CPU binding. |
priority | Thread priority. |
{
"Reflector": {
"affinity": "1",
"priority": 9
}
}
5. Set the Startup Mode
Define the system boot behavior with the bootmode field:
"play"— start execution immediately."stop"— start paused.
{
"startup": {
"bootmode": "play"
}
}
6. Configure the Recorder
Control recording subsystem behavior.
| Field | Description |
|---|---|
priority | Recorder thread priority. |
path | Output directory for recordings. |
flushAfterFrames | Data older than N frames is written to the file. |
recordOnlyOnChange | Global setup — record only when data changes. |
{
"recorder": {
"priority": 9,
"path": "C:/temp/rec_test",
"flushAfterFrames": 5,
"recordOnlyOnChange": true
}
}
The recording itself never slows the simulation frame: the frame only copies the data, a writer thread writes the files.
The defaults pick the fastest way to write for the drive (unbuffered with 8 writes in flight on SSD/NVMe, through the OS cache on a hard disk).
To check a new PC or drive, set "environmentReport": true once: at start the console lists the drive type and the available I/O,
and tests every storage driver method (PASS/FAIL per line). To find the fastest write method and queue size for the drive, set
"benchmark": true once: at start it measures each ioMode / queue size, prints a table and the best result as
"recorder" keys to paste into config.json. "report" sets how much the recorder prints: 0 nothing (default),
1 the start / close summary of each recording, 2 also a table of every recorded item (sizes, rate, drives, MB/s) (then remove "benchmark"; how to read it). The other keys (ioMode, queueSize, ringMB,
onOverflow, capture, playbackPath, ...) are described in the config.json reference, section 7.
{
"recorder": {
"path": "D:/recordings",
"ioMode": "auto",
"report": 2,
"environmentReport": true,
"benchmark": true
}
}
7. (Optional) Fine-Tune the Recorded Items (coredb)
Use the optional coredb block inside recorder for fine-grained control over which signals are recorded and how, including wildcard patterns (the old name DBSim is not read).
| Field | Description |
|---|---|
engSize | -1 = use actual data size, 0 = disabled, >0 = bytes per record. |
rawSize | -1 = use actual data size, 0 = disabled, >0 = bytes per record. |
recordOnlyOnChange | true (default) = record only on value change; false = record every frame. |
{
"coredb": {
"CAM.cam.timestamp": {},
"IMU.*": {}, // Wildcard example: records all IMU signals with default settings
"CAM.cam.frame": {
"recordOnlyOnChange": true, //default
"engSize": -1
}
}
}
8. (Optional) Enable EngineSync
EngineSync synchronizes engine time using an external telemetry element, typically for deterministic replay or hardware-aligned simulation. It is disabled by default.
{
"EngineSync": {
"stream": "SocketTCPTLMStream",
"element": "LRU_KZ.TLMAiding.SystemEventNumber",
"syncPerMS": "1000",
"affinity": "0,1,3,4-6",
"priority": 6
}
}
9. Apply Threading & Design Guidelines
- Pin the RealTime thread to multiple cores for deterministic workload distribution.
- Isolate Keyboard and Reflector threads on dedicated cores.
- Reserve high priority (9) for latency-sensitive tasks.
- Configure the Recorder to minimize disk I/O overhead via buffered flushing.
- Use CPU affinity and explicit thread priority for deterministic, modular configuration (EngineSync and DBSim are optional subsystems).
priority settings needs root privilege (real-time scheduling). Start the application with sudo, otherwise the priorities are refused by the operating system. See config.html.