OcaCommandSet#
This document describes the controller implementation of OcaCommandSet. This class is documented in the AES70 standard as:
A command set. Child of OcaProgram.
Overview#
- ClassID: 1.5.2.1
- Header:
aes70/controller/OcaCommandSet.hpp
- Namespace:
aes70::controller
- Inheritance: aes70::controller::OcaProgram, aes70::controller::OcaDataset, aes70::controller::OcaRoot, aes70::controller::object
Class Declaration#
namespace aes70::controller
{
class OcaCommandSet : public OcaProgram
{
public:
OcaCommandSet(std::shared_ptr<connection> connection,
uin32_t object_number);
OcaCommandSet(const OcaCommandSet &o);
// Control Methods
// Calls GetCommands and calls on_result or on_failure
void GetCommands(auto on_result, failure_callback on_failure);
// Calls SetCommands and calls on_result or on_failure
void SetCommands(OcaList<OcaCommand> Commands, auto on_result, failure_callback on_failure);
// Calls SetCommands and does not wait for the response
void SetCommands(OcaList<OcaCommand> Commands);
// Calls GetCommand and calls on_result or on_failure
void GetCommand(OcaUint16 Index, auto on_result, failure_callback on_failure);
// Calls GetCommand and does not wait for the response
void GetCommand(OcaUint16 Index);
// Calls SetCommand and calls on_result or on_failure
void SetCommand(OcaUint16 Index, OcaCommand Command, auto on_result, failure_callback on_failure);
// Calls SetCommand and does not wait for the response
void SetCommand(OcaUint16 Index, OcaCommand Command);
// Calls InsertCommand and calls on_result or on_failure
void InsertCommand(OcaUint16 Index, OcaCommand Command, auto on_result, failure_callback on_failure);
// Calls InsertCommand and does not wait for the response
void InsertCommand(OcaUint16 Index, OcaCommand Command);
// Calls DeleteCommand and calls on_result or on_failure
void DeleteCommand(OcaUint16 Index, auto on_result, failure_callback on_failure);
// Calls DeleteCommand and does not wait for the response
void DeleteCommand(OcaUint16 Index);
// Calls Clear and calls on_result or on_failure
void Clear(auto on_result, failure_callback on_failure);
// Observing Properties
subscription observeCommands(auto callback, failure_callback on_failure);
// Property Changed Subscriptions
subscription OnCommandsChanged(auto callback, failure_callback on_failure);
};
}
Methods#
GetCommands#
void GetCommands(auto on_result, failure_callback on_failure)
Calls the method GetCommands in the remote device.
Parameters:#
auto on_result
: A callable (e.g. a lambda) with the following arguments:OcaList<OcaCommand> Commands
failure_callback on_failure
: A callback which is called on error.
SetCommands#
void SetCommands(OcaList<OcaCommand> Commands, auto on_result, failure_callback on_failure)
Calls the method SetCommands in the remote device. If no result and error callback is specified, the method will be called without requesting a response.
Parameters:#
OcaList<OcaCommand> Commands
auto on_result
: A callable (e.g. a lambda) with 0 arguments.failure_callback on_failure
: A callback which is called on error.
GetCommand#
void GetCommand(OcaUint16 Index, auto on_result, failure_callback on_failure)
Calls the method GetCommand in the remote device. If no result and error callback is specified, the method will be called without requesting a response.
Parameters:#
OcaUint16 Index
auto on_result
: A callable (e.g. a lambda) with the following arguments:OcaCommand Command
failure_callback on_failure
: A callback which is called on error.
SetCommand#
void SetCommand(OcaUint16 Index, OcaCommand Command, auto on_result, failure_callback on_failure)
Calls the method SetCommand in the remote device. If no result and error callback is specified, the method will be called without requesting a response.
Parameters:#
OcaUint16 Index
OcaCommand Command
auto on_result
: A callable (e.g. a lambda) with 0 arguments.failure_callback on_failure
: A callback which is called on error.
InsertCommand#
void InsertCommand(OcaUint16 Index, OcaCommand Command, auto on_result, failure_callback on_failure)
Calls the method InsertCommand in the remote device. If no result and error callback is specified, the method will be called without requesting a response.
Parameters:#
OcaUint16 Index
OcaCommand Command
auto on_result
: A callable (e.g. a lambda) with 0 arguments.failure_callback on_failure
: A callback which is called on error.
DeleteCommand#
void DeleteCommand(OcaUint16 Index, auto on_result, failure_callback on_failure)
Calls the method DeleteCommand in the remote device. If no result and error callback is specified, the method will be called without requesting a response.
Parameters:#
OcaUint16 Index
auto on_result
: A callable (e.g. a lambda) with 0 arguments.failure_callback on_failure
: A callback which is called on error.
Clear#
void Clear(auto on_result, failure_callback on_failure)
Calls the method Clear in the remote device.
Parameters:#
auto on_result
: A callable (e.g. a lambda) with 0 arguments.failure_callback on_failure
: A callback which is called on error.
observeCommands#
subscription observeCommands(auto callback, failure_callback on_failure)
Fetches the remote property Commands and subscribes for modifications. The callback is called with the initial values of Commands and whenever it changes.
Parameters:#
auto callback
: A callable (e.g. a lambda) with one argument:OcaList<OcaCommand> Commands
failure_callback on_failure
: A callback which is called on error.
OnCommandsChanged#
subscription OnCommandsChanged(auto callback, failure_callback on_failure)
Parameters#
auto callback
: A callable (e.g. a lambda) with one argument:OcaList<OcaCommand> Commands
failure_callback on_failure
: A callback which is called on error.