Skip to content

OcaMute#

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

Signal mute.


Overview#

Class Declaration#

namespace aes70::controller
{
  class OcaMute : public OcaActuator
  {
  public:
    OcaMute(std::shared_ptr<connection> connection,
            uin32_t object_number);
    OcaMute(const OcaMute &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(OcaMuteState state, auto on_result, failure_callback on_failure);
    // Calls SetState and does not wait for the response
    void SetState(OcaMuteState 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:
    • OcaMuteState state
  • failure_callback on_failure: A callback which is called on error.

SetState#

void SetState(OcaMuteState 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:#

  • OcaMuteState 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: OcaMuteState 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: OcaMuteState State
  • failure_callback on_failure: A callback which is called on error.