OcaGain#
This document describes the controller implementation of OcaGain. This class is documented in the AES70 standard as:
Gain (or attenuation) element.
Overview#
- ClassID: 1.1.1.5
- Header:
aes70/controller/OcaGain.hpp
- Namespace:
aes70::controller
- Inheritance: aes70::controller::OcaActuator, aes70::controller::OcaWorker, aes70::controller::OcaRoot, aes70::controller::object
Class Declaration#
namespace aes70::controller
{
class OcaGain : public OcaActuator
{
public:
OcaGain(std::shared_ptr<connection> connection,
uin32_t object_number);
OcaGain(const OcaGain &o);
// Control Methods
// Calls GetGain and calls on_result or on_failure
void GetGain(auto on_result, failure_callback on_failure);
// Calls SetGain and calls on_result or on_failure
void SetGain(OcaDB Gain, auto on_result, failure_callback on_failure);
// Calls SetGain and does not wait for the response
void SetGain(OcaDB Gain);
// Observing Properties
subscription observeGain(auto callback, failure_callback on_failure);
// Property Changed Subscriptions
subscription OnGainChanged(auto callback, failure_callback on_failure);
};
}
Methods#
GetGain#
void GetGain(auto on_result, failure_callback on_failure)
Calls the method GetGain in the remote device.
Parameters:#
auto on_result
: A callable (e.g. a lambda) with the following arguments:OcaDB Gain
OcaDB minGain
OcaDB maxGain
failure_callback on_failure
: A callback which is called on error.
SetGain#
void SetGain(OcaDB Gain, auto on_result, failure_callback on_failure)
Calls the method SetGain in the remote device. If no result and error callback is specified, the method will be called without requesting a response.
Parameters:#
OcaDB Gain
auto on_result
: A callable (e.g. a lambda) with 0 arguments.failure_callback on_failure
: A callback which is called on error.
observeGain#
subscription observeGain(auto callback, failure_callback on_failure)
Fetches the remote property Gain and subscribes for modifications. The callback is called with the initial values of Gain and whenever it changes.
Parameters:#
auto callback
: A callable (e.g. a lambda) with one argument:OcaDB Gain
failure_callback on_failure
: A callback which is called on error.
OnGainChanged#
subscription OnGainChanged(auto callback, failure_callback on_failure)
Parameters#
auto callback
: A callable (e.g. a lambda) with one argument:OcaDB Gain
failure_callback on_failure
: A callback which is called on error.