Skip to content

Building Controllers#

The controller portion of libaes70 provides a lightweight, callback-driven interface for communicating with AES70/OCA devices. It is designed around three key principles:

  1. Single-threaded event loop All operations run in a cooperative event loop. Callbacks are always invoked from within this loop, which simplifies concurrency and avoids the need for user-side locking.

  2. Asynchronous communication Remote method calls and property queries are non-blocking. Each request accepts success and failure callbacks, allowing applications to remain responsive while interacting with devices.

  3. Stateless OCA object handles OCA objects such as OcaGain, OcaMute, or OcaLevelSensor are implemented as simple value types. They do not store state locally — all runtime state is maintained in the associated connection. This makes object instances cheap to create, copy, and discard.

Typical Workflow#

  1. Establish a connection to an AES70 device.

  2. Construct OCA object handles (e.g. OcaGain).

    1. In devices with fixed object numbers using the connection and the object number.
    2. In dynamic devices using role name and object type using e.g. path_observer.
  3. Interact with these objects by: Calling control methods (e.g. GetGain, SetGain), Setting up subscriptions to observe property changes, Handling callbacks for asynchronous responses.