Skip to content

OcaMediaClock#

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

DEPRECATED CLASS Replaced by OcaMediaClock3

A media clock, internal or external.


Overview#

Class Declaration#

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

    // Control Methods
    // Calls GetType and calls on_result or on_failure
    void GetType(auto on_result, failure_callback on_failure);
    // Calls SetType and calls on_result or on_failure
    void SetType(OcaMediaClockType Type, auto on_result, failure_callback on_failure);
    // Calls SetType and does not wait for the response
    void SetType(OcaMediaClockType Type);
    // Calls GetDomainID and calls on_result or on_failure
    void GetDomainID(auto on_result, failure_callback on_failure);
    // Calls SetDomainID and calls on_result or on_failure
    void SetDomainID(OcaUint16 ID, auto on_result, failure_callback on_failure);
    // Calls SetDomainID and does not wait for the response
    void SetDomainID(OcaUint16 ID);
    // Calls GetSupportedRates and calls on_result or on_failure
    void GetSupportedRates(auto on_result, failure_callback on_failure);
    // Calls GetRate and calls on_result or on_failure
    void GetRate(auto on_result, failure_callback on_failure);
    // Calls SetRate and calls on_result or on_failure
    void SetRate(OcaMediaClockRate rate, auto on_result, failure_callback on_failure);
    // Calls SetRate and does not wait for the response
    void SetRate(OcaMediaClockRate rate);
    // Calls GetLockState and calls on_result or on_failure
    void GetLockState(auto on_result, failure_callback on_failure);

    // Observing Properties
    subscription observeType(auto callback, failure_callback on_failure);
    subscription observeDomainID(auto callback, failure_callback on_failure);
    subscription observeRatesSupported(auto callback, failure_callback on_failure);
    subscription observeCurrentRate(auto callback, failure_callback on_failure);
    subscription observeLockState(auto callback, failure_callback on_failure);

    // Property Changed Subscriptions
    subscription OnTypeChanged(auto callback, failure_callback on_failure);
    subscription OnDomainIDChanged(auto callback, failure_callback on_failure);
    subscription OnRatesSupportedChanged(auto callback, failure_callback on_failure);
    subscription OnCurrentRateChanged(auto callback, failure_callback on_failure);
    subscription OnLockStateChanged(auto callback, failure_callback on_failure);
  };
}

Methods#

GetType#

void GetType(auto on_result, failure_callback on_failure)

Calls the method GetType in the remote device.

Parameters:#

  • auto on_result: A callable (e.g. a lambda) with the following arguments:
    • OcaMediaClockType Type
  • failure_callback on_failure: A callback which is called on error.

SetType#

void SetType(OcaMediaClockType Type, auto on_result, failure_callback on_failure)

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

Parameters:#

  • OcaMediaClockType Type
  • auto on_result: A callable (e.g. a lambda) with 0 arguments.
  • failure_callback on_failure: A callback which is called on error.

GetDomainID#

void GetDomainID(auto on_result, failure_callback on_failure)

Calls the method GetDomainID in the remote device.

Parameters:#

  • auto on_result: A callable (e.g. a lambda) with the following arguments:
    • OcaUint16 ID
  • failure_callback on_failure: A callback which is called on error.

SetDomainID#

void SetDomainID(OcaUint16 ID, auto on_result, failure_callback on_failure)

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

Parameters:#

  • OcaUint16 ID
  • auto on_result: A callable (e.g. a lambda) with 0 arguments.
  • failure_callback on_failure: A callback which is called on error.

GetSupportedRates#

void GetSupportedRates(auto on_result, failure_callback on_failure)

Calls the method GetSupportedRates in the remote device.

Parameters:#

  • auto on_result: A callable (e.g. a lambda) with the following arguments:
    • OcaList<OcaMediaClockRate> ID
  • failure_callback on_failure: A callback which is called on error.

GetRate#

void GetRate(auto on_result, failure_callback on_failure)

Calls the method GetRate in the remote device.

Parameters:#

  • auto on_result: A callable (e.g. a lambda) with the following arguments:
    • OcaMediaClockRate rate
  • failure_callback on_failure: A callback which is called on error.

SetRate#

void SetRate(OcaMediaClockRate rate, auto on_result, failure_callback on_failure)

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

Parameters:#

  • OcaMediaClockRate rate
  • auto on_result: A callable (e.g. a lambda) with 0 arguments.
  • failure_callback on_failure: A callback which is called on error.

GetLockState#

void GetLockState(auto on_result, failure_callback on_failure)

Calls the method GetLockState in the remote device.

Parameters:#

  • auto on_result: A callable (e.g. a lambda) with the following arguments:
    • OcaMediaClockLockState state
  • failure_callback on_failure: A callback which is called on error.

observeType#

subscription observeType(auto callback, failure_callback on_failure)

Fetches the remote property Type and subscribes for modifications. The callback is called with the initial values of Type and whenever it changes.

Parameters:#

  • auto callback: A callable (e.g. a lambda) with one argument: OcaMediaClockType Type
  • failure_callback on_failure: A callback which is called on error.

observeDomainID#

subscription observeDomainID(auto callback, failure_callback on_failure)

Fetches the remote property DomainID and subscribes for modifications. The callback is called with the initial values of DomainID and whenever it changes.

Parameters:#

  • auto callback: A callable (e.g. a lambda) with one argument: OcaUint16 DomainID
  • failure_callback on_failure: A callback which is called on error.

observeRatesSupported#

subscription observeRatesSupported(auto callback, failure_callback on_failure)

Fetches the remote property RatesSupported and subscribes for modifications. The callback is called with the initial values of RatesSupported and whenever it changes.

Parameters:#

  • auto callback: A callable (e.g. a lambda) with one argument: OcaList<OcaMediaClockRate> RatesSupported
  • failure_callback on_failure: A callback which is called on error.

observeCurrentRate#

subscription observeCurrentRate(auto callback, failure_callback on_failure)

Fetches the remote property CurrentRate and subscribes for modifications. The callback is called with the initial values of CurrentRate and whenever it changes.

Parameters:#

  • auto callback: A callable (e.g. a lambda) with one argument: OcaMediaClockRate CurrentRate
  • failure_callback on_failure: A callback which is called on error.

observeLockState#

subscription observeLockState(auto callback, failure_callback on_failure)

Fetches the remote property LockState and subscribes for modifications. The callback is called with the initial values of LockState and whenever it changes.

Parameters:#

  • auto callback: A callable (e.g. a lambda) with one argument: OcaMediaClockLockState LockState
  • failure_callback on_failure: A callback which is called on error.

OnTypeChanged#

subscription OnTypeChanged(auto callback, failure_callback on_failure)

Parameters#

  • auto callback: A callable (e.g. a lambda) with one argument: OcaMediaClockType Type
  • failure_callback on_failure: A callback which is called on error.

OnDomainIDChanged#

subscription OnDomainIDChanged(auto callback, failure_callback on_failure)

Parameters#

  • auto callback: A callable (e.g. a lambda) with one argument: OcaUint16 DomainID
  • failure_callback on_failure: A callback which is called on error.

OnRatesSupportedChanged#

subscription OnRatesSupportedChanged(auto callback, failure_callback on_failure)

Parameters#

  • auto callback: A callable (e.g. a lambda) with one argument: OcaList<OcaMediaClockRate> RatesSupported
  • failure_callback on_failure: A callback which is called on error.

OnCurrentRateChanged#

subscription OnCurrentRateChanged(auto callback, failure_callback on_failure)

Parameters#

  • auto callback: A callable (e.g. a lambda) with one argument: OcaMediaClockRate CurrentRate
  • failure_callback on_failure: A callback which is called on error.

OnLockStateChanged#

subscription OnLockStateChanged(auto callback, failure_callback on_failure)

Parameters#

  • auto callback: A callable (e.g. a lambda) with one argument: OcaMediaClockLockState LockState
  • failure_callback on_failure: A callback which is called on error.