How to Get Started with the Core Engine

Check prerequisites, understand the frame loop, and learn the engine states before building your first simulation.

This guide gets you oriented with the Core Engine: what it is, what you need to run it, and how its frame loop, scheduler, states, and threading model fit together.

Ready to build a real system? See How to Build an APIC System for Software Engineers for the full step-by-step workflow.

1. Understand What the Core Engine Does

The Core Engine is a modular real-time execution system that runs simulations in fixed-rate frames. It lets you:

It is used for embedded simulation, signal generation, hardware-in-the-loop (HIL), control-loop testing, and high-frequency data processing.

2. Check System Requirements

3. Learn the Frame Loop

At the heart of the Core Engine is the Frame Loop, a high-precision, fixed-period execution cycle. Every frame is one "tick" of simulation time, and each tick:

  1. Sleeps/spins until the next frame start.
  2. Executes all tasks registered for this frame.
  3. Processes recording/IO operations.
  4. Reports timing information.
  5. Returns to waiting for the next frame boundary.

This produces a stable "heartbeat" for your simulation, giving time-critical algorithms stable sampling intervals, keeping hardware interfaces consistent, and enabling repeatable, debuggable simulations.

4. Write Correct Work Section Code

Each frame is composed of these sections:

Treat the Work Section like a real-time ISR: fast, predictable, and isolated. Follow these rules:

5. Understand the Scheduler

The Scheduler manages and executes tasks during each simulation frame. It:

The Scheduler typically manages these task types: core tasks (system internal), user tasks (defined by the simulation developer), I/O tasks (network or device interactions), and recording tasks (data capture).

6. Know the Engine States

The Core Engine uses a simple state machine to control execution:

StateMeaning
RunContinuous real-time execution
StepExecute exactly one frame and then pause
StopTerminate simulation immediately
InitSend Init signal to all the Drivers and the Models
ResetReset all IO drivers and send Reset signal to all Models

7. Understand the Multi-Threading Model

Although the Frame Loop is single-threaded for determinism, the engine internally uses additional threads so high-frequency execution is not blocked by slower tasks like disk I/O:

8. Review an Example Setup

See the reference documentation for a worked example of an AH-60 device development setup, illustrating how the pieces above come together in a real project.