Skip to content

OcaSubscriptionManager#

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

Manager that collects and controls the event subscriptions of the device. Must be instantiated exactly once in every device., Object number must be 4.


Overview#

Class Declaration#

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

    // Control Methods
    // Calls AddSubscription and calls on_result or on_failure
    void AddSubscription(OcaEvent Event, OcaMethod Subscriber, OcaBlob SubscriberContext, OcaNotificationDeliveryMode NotificationDeliveryMode, OcaNetworkAddress DestinationInformation, auto on_result, failure_callback on_failure);
    // Calls AddSubscription and does not wait for the response
    void AddSubscription(OcaEvent Event, OcaMethod Subscriber, OcaBlob SubscriberContext, OcaNotificationDeliveryMode NotificationDeliveryMode, OcaNetworkAddress DestinationInformation);
    // Calls RemoveSubscription and calls on_result or on_failure
    void RemoveSubscription(OcaEvent Event, OcaMethod Subscriber, auto on_result, failure_callback on_failure);
    // Calls RemoveSubscription and does not wait for the response
    void RemoveSubscription(OcaEvent Event, OcaMethod Subscriber);
    // Calls DisableNotifications and calls on_result or on_failure
    void DisableNotifications(auto on_result, failure_callback on_failure);
    // Calls ReEnableNotifications and calls on_result or on_failure
    void ReEnableNotifications(auto on_result, failure_callback on_failure);
    // Calls AddPropertyChangeSubscription and calls on_result or on_failure
    void AddPropertyChangeSubscription(OcaONo Emitter, OcaPropertyID Property, OcaMethod Subscriber, OcaBlob SubscriberContext, OcaNotificationDeliveryMode NotificationDeliveryMode, OcaNetworkAddress DestinationInformation, auto on_result, failure_callback on_failure);
    // Calls AddPropertyChangeSubscription and does not wait for the response
    void AddPropertyChangeSubscription(OcaONo Emitter, OcaPropertyID Property, OcaMethod Subscriber, OcaBlob SubscriberContext, OcaNotificationDeliveryMode NotificationDeliveryMode, OcaNetworkAddress DestinationInformation);
    // Calls RemovePropertyChangeSubscription and calls on_result or on_failure
    void RemovePropertyChangeSubscription(OcaONo Emitter, OcaPropertyID Property, OcaMethod Subscriber, auto on_result, failure_callback on_failure);
    // Calls RemovePropertyChangeSubscription and does not wait for the response
    void RemovePropertyChangeSubscription(OcaONo Emitter, OcaPropertyID Property, OcaMethod Subscriber);
    // Calls GetMaximumSubscriberContextLength and calls on_result or on_failure
    void GetMaximumSubscriberContextLength(auto on_result, failure_callback on_failure);
    // Calls AddSubscription2 and calls on_result or on_failure
    void AddSubscription2(OcaEvent Event, OcaNotificationDeliveryMode NotificationDeliveryMode, OcaNetworkAddress DestinationInformation, auto on_result, failure_callback on_failure);
    // Calls AddSubscription2 and does not wait for the response
    void AddSubscription2(OcaEvent Event, OcaNotificationDeliveryMode NotificationDeliveryMode, OcaNetworkAddress DestinationInformation);
    // Calls RemoveSubscription2 and calls on_result or on_failure
    void RemoveSubscription2(OcaEvent Event, OcaNotificationDeliveryMode NotificationDeliveryMode, OcaNetworkAddress DestinationInformation, auto on_result, failure_callback on_failure);
    // Calls RemoveSubscription2 and does not wait for the response
    void RemoveSubscription2(OcaEvent Event, OcaNotificationDeliveryMode NotificationDeliveryMode, OcaNetworkAddress DestinationInformation);
    // Calls AddPropertyChangeSubscription2 and calls on_result or on_failure
    void AddPropertyChangeSubscription2(OcaONo Emitter, OcaPropertyID Property, OcaNotificationDeliveryMode NotificationDeliveryMode, OcaNetworkAddress DestinationInformation, auto on_result, failure_callback on_failure);
    // Calls AddPropertyChangeSubscription2 and does not wait for the response
    void AddPropertyChangeSubscription2(OcaONo Emitter, OcaPropertyID Property, OcaNotificationDeliveryMode NotificationDeliveryMode, OcaNetworkAddress DestinationInformation);
    // Calls RemovePropertyChangeSubscription2 and calls on_result or on_failure
    void RemovePropertyChangeSubscription2(OcaONo Emitter, OcaPropertyID Property, OcaNotificationDeliveryMode NotificationDeliveryMode, OcaNetworkAddress DestinationInformation, auto on_result, failure_callback on_failure);
    // Calls RemovePropertyChangeSubscription2 and does not wait for the response
    void RemovePropertyChangeSubscription2(OcaONo Emitter, OcaPropertyID Property, OcaNotificationDeliveryMode NotificationDeliveryMode, OcaNetworkAddress DestinationInformation);
    // Calls AddSubscription2List and calls on_result or on_failure
    void AddSubscription2List(OcaList<OcaEvent> Events, OcaNotificationDeliveryMode NotificationDeliveryMode, OcaNetworkAddress DestinationInformation, auto on_result, failure_callback on_failure);
    // Calls AddSubscription2List and does not wait for the response
    void AddSubscription2List(OcaList<OcaEvent> Events, OcaNotificationDeliveryMode NotificationDeliveryMode, OcaNetworkAddress DestinationInformation);
    // Calls RemoveSubscription2List and calls on_result or on_failure
    void RemoveSubscription2List(OcaList<OcaEvent> Events, OcaNotificationDeliveryMode NotificationDeliveryMode, OcaNetworkAddress DestinationInformation, auto on_result, failure_callback on_failure);
    // Calls RemoveSubscription2List and does not wait for the response
    void RemoveSubscription2List(OcaList<OcaEvent> Events, OcaNotificationDeliveryMode NotificationDeliveryMode, OcaNetworkAddress DestinationInformation);
    // Calls AddPropertyChangeSubscription2List and calls on_result or on_failure
    void AddPropertyChangeSubscription2List(OcaList<OcaONo> Emitters, OcaList<OcaPropertyID> Properties, OcaNotificationDeliveryMode NotificationDeliveryMode, OcaNetworkAddress DestinationInformation, OcaList<OcaStatus> ResultStatuses, auto on_result, failure_callback on_failure);
    // Calls AddPropertyChangeSubscription2List and does not wait for the response
    void AddPropertyChangeSubscription2List(OcaList<OcaONo> Emitters, OcaList<OcaPropertyID> Properties, OcaNotificationDeliveryMode NotificationDeliveryMode, OcaNetworkAddress DestinationInformation, OcaList<OcaStatus> ResultStatuses);
    // Calls RemovePropertyChangeSubscription2List and calls on_result or on_failure
    void RemovePropertyChangeSubscription2List(OcaList<OcaONo> Emitters, OcaList<OcaPropertyID> Properties, OcaNotificationDeliveryMode NotificationDeliveryMode, OcaNetworkAddress DestinationInformation, auto on_result, failure_callback on_failure);
    // Calls RemovePropertyChangeSubscription2List and does not wait for the response
    void RemovePropertyChangeSubscription2List(OcaList<OcaONo> Emitters, OcaList<OcaPropertyID> Properties, OcaNotificationDeliveryMode NotificationDeliveryMode, OcaNetworkAddress DestinationInformation);

    // Observing Properties
    subscription observeState(auto callback, failure_callback on_failure);

    // Property Changed Subscriptions
    subscription OnStateChanged(auto callback, failure_callback on_failure);
  };
}

Methods#

AddSubscription#

void AddSubscription(OcaEvent Event, OcaMethod Subscriber, OcaBlob SubscriberContext, OcaNotificationDeliveryMode NotificationDeliveryMode, OcaNetworkAddress DestinationInformation, auto on_result, failure_callback on_failure)

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

Parameters:#

  • OcaEvent Event
  • OcaMethod Subscriber
  • OcaBlob SubscriberContext
  • OcaNotificationDeliveryMode NotificationDeliveryMode
  • OcaNetworkAddress DestinationInformation
  • auto on_result: A callable (e.g. a lambda) with 0 arguments.
  • failure_callback on_failure: A callback which is called on error.

RemoveSubscription#

void RemoveSubscription(OcaEvent Event, OcaMethod Subscriber, auto on_result, failure_callback on_failure)

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

Parameters:#

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

DisableNotifications#

void DisableNotifications(auto on_result, failure_callback on_failure)

Calls the method DisableNotifications 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.

ReEnableNotifications#

void ReEnableNotifications(auto on_result, failure_callback on_failure)

Calls the method ReEnableNotifications 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.

AddPropertyChangeSubscription#

void AddPropertyChangeSubscription(OcaONo Emitter, OcaPropertyID Property, OcaMethod Subscriber, OcaBlob SubscriberContext, OcaNotificationDeliveryMode NotificationDeliveryMode, OcaNetworkAddress DestinationInformation, auto on_result, failure_callback on_failure)

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

Parameters:#

  • OcaONo Emitter
  • OcaPropertyID Property
  • OcaMethod Subscriber
  • OcaBlob SubscriberContext
  • OcaNotificationDeliveryMode NotificationDeliveryMode
  • OcaNetworkAddress DestinationInformation
  • auto on_result: A callable (e.g. a lambda) with 0 arguments.
  • failure_callback on_failure: A callback which is called on error.

RemovePropertyChangeSubscription#

void RemovePropertyChangeSubscription(OcaONo Emitter, OcaPropertyID Property, OcaMethod Subscriber, auto on_result, failure_callback on_failure)

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

Parameters:#

  • OcaONo Emitter
  • OcaPropertyID Property
  • OcaMethod Subscriber
  • auto on_result: A callable (e.g. a lambda) with 0 arguments.
  • failure_callback on_failure: A callback which is called on error.

GetMaximumSubscriberContextLength#

void GetMaximumSubscriberContextLength(auto on_result, failure_callback on_failure)

Calls the method GetMaximumSubscriberContextLength in the remote device.

Parameters:#

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

AddSubscription2#

void AddSubscription2(OcaEvent Event, OcaNotificationDeliveryMode NotificationDeliveryMode, OcaNetworkAddress DestinationInformation, auto on_result, failure_callback on_failure)

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

Parameters:#

  • OcaEvent Event
  • OcaNotificationDeliveryMode NotificationDeliveryMode
  • OcaNetworkAddress DestinationInformation
  • auto on_result: A callable (e.g. a lambda) with 0 arguments.
  • failure_callback on_failure: A callback which is called on error.

RemoveSubscription2#

void RemoveSubscription2(OcaEvent Event, OcaNotificationDeliveryMode NotificationDeliveryMode, OcaNetworkAddress DestinationInformation, auto on_result, failure_callback on_failure)

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

Parameters:#

  • OcaEvent Event
  • OcaNotificationDeliveryMode NotificationDeliveryMode
  • OcaNetworkAddress DestinationInformation
  • auto on_result: A callable (e.g. a lambda) with 0 arguments.
  • failure_callback on_failure: A callback which is called on error.

AddPropertyChangeSubscription2#

void AddPropertyChangeSubscription2(OcaONo Emitter, OcaPropertyID Property, OcaNotificationDeliveryMode NotificationDeliveryMode, OcaNetworkAddress DestinationInformation, auto on_result, failure_callback on_failure)

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

Parameters:#

  • OcaONo Emitter
  • OcaPropertyID Property
  • OcaNotificationDeliveryMode NotificationDeliveryMode
  • OcaNetworkAddress DestinationInformation
  • auto on_result: A callable (e.g. a lambda) with 0 arguments.
  • failure_callback on_failure: A callback which is called on error.

RemovePropertyChangeSubscription2#

void RemovePropertyChangeSubscription2(OcaONo Emitter, OcaPropertyID Property, OcaNotificationDeliveryMode NotificationDeliveryMode, OcaNetworkAddress DestinationInformation, auto on_result, failure_callback on_failure)

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

Parameters:#

  • OcaONo Emitter
  • OcaPropertyID Property
  • OcaNotificationDeliveryMode NotificationDeliveryMode
  • OcaNetworkAddress DestinationInformation
  • auto on_result: A callable (e.g. a lambda) with 0 arguments.
  • failure_callback on_failure: A callback which is called on error.

AddSubscription2List#

void AddSubscription2List(OcaList<OcaEvent> Events, OcaNotificationDeliveryMode NotificationDeliveryMode, OcaNetworkAddress DestinationInformation, auto on_result, failure_callback on_failure)

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

Parameters:#

  • OcaList<OcaEvent> Events
  • OcaNotificationDeliveryMode NotificationDeliveryMode
  • OcaNetworkAddress DestinationInformation
  • auto on_result: A callable (e.g. a lambda) with the following arguments:
    • OcaList<OcaStatus> ResultStatuses
  • failure_callback on_failure: A callback which is called on error.

RemoveSubscription2List#

void RemoveSubscription2List(OcaList<OcaEvent> Events, OcaNotificationDeliveryMode NotificationDeliveryMode, OcaNetworkAddress DestinationInformation, auto on_result, failure_callback on_failure)

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

Parameters:#

  • OcaList<OcaEvent> Events
  • OcaNotificationDeliveryMode NotificationDeliveryMode
  • OcaNetworkAddress DestinationInformation
  • auto on_result: A callable (e.g. a lambda) with 0 arguments.
  • failure_callback on_failure: A callback which is called on error.

AddPropertyChangeSubscription2List#

void AddPropertyChangeSubscription2List(OcaList<OcaONo> Emitters, OcaList<OcaPropertyID> Properties, OcaNotificationDeliveryMode NotificationDeliveryMode, OcaNetworkAddress DestinationInformation, OcaList<OcaStatus> ResultStatuses, auto on_result, failure_callback on_failure)

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

Parameters:#

  • OcaList<OcaONo> Emitters
  • OcaList<OcaPropertyID> Properties
  • OcaNotificationDeliveryMode NotificationDeliveryMode
  • OcaNetworkAddress DestinationInformation
  • OcaList<OcaStatus> ResultStatuses
  • auto on_result: A callable (e.g. a lambda) with 0 arguments.
  • failure_callback on_failure: A callback which is called on error.

RemovePropertyChangeSubscription2List#

void RemovePropertyChangeSubscription2List(OcaList<OcaONo> Emitters, OcaList<OcaPropertyID> Properties, OcaNotificationDeliveryMode NotificationDeliveryMode, OcaNetworkAddress DestinationInformation, auto on_result, failure_callback on_failure)

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

Parameters:#

  • OcaList<OcaONo> Emitters
  • OcaList<OcaPropertyID> Properties
  • OcaNotificationDeliveryMode NotificationDeliveryMode
  • OcaNetworkAddress DestinationInformation
  • 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: OcaSubscriptionManagerState 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: OcaSubscriptionManagerState State
  • failure_callback on_failure: A callback which is called on error.