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:
-
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.
-
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.
-
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#
-
Establish a connection to an AES70 device.
-
Construct OCA object handles (e.g. OcaGain).
- In devices with fixed object numbers using the connection and the object number.
- In dynamic devices using role name and object type using e.g. path_observer.
-
Interact with these objects by: Calling control methods (e.g. GetGain, SetGain), Setting up subscriptions to observe property changes, Handling callbacks for asynchronous responses.