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