Skip to content

OcaCommandSetAgent#

This document describes the controller implementation of OcaCommandSetAgent. This class is documented in the AES70 standard as:

Agent for immediate execution of commandsets.

This agent provides a mechanism for simple execution of commandsets in cases where the application does not require the more advanced storage and scheduling features provided by the OcaCommandSet, OcaTaskAgent, and OcaTaskScheduler classes.


Overview#

Class Declaration#

namespace aes70::controller
{
  class OcaCommandSetAgent : public OcaAgent
  {
  public:
    OcaCommandSetAgent(std::shared_ptr<connection> connection,
            uin32_t object_number);
    OcaCommandSetAgent(const OcaCommandSetAgent &o);

    // Control Methods
    // Calls Execute and calls on_result or on_failure
    void Execute(OcaList32<OcaCommand> Commands, auto on_result, failure_callback on_failure);
    // Calls Execute and does not wait for the response
    void Execute(OcaList32<OcaCommand> Commands);

    // Observing Properties

    // Property Changed Subscriptions
  };
}

Methods#

Execute#

void Execute(OcaList32<OcaCommand> Commands, auto on_result, failure_callback on_failure)

Calls the method Execute in the remote device. If no result and error callback is specified, the method will be called without requesting a response.

Parameters:#

  • OcaList32<OcaCommand> Commands
  • auto on_result: A callable (e.g. a lambda) with the following arguments:
    • OcaList32<OcaCommandResult> Results
  • failure_callback on_failure: A callback which is called on error.