Skip to content

OcaSecurityManager#

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

Manager that collects and controls security settings (including security keys). Must be instantiated in every device that supports secure control and monitoring; otherwise, is optional., May be instantiated at most once in any device., If instantiated, object number must be 2.


Overview#

Class Declaration#

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

    // Control Methods
    // Calls EnableControlSecurity and calls on_result or on_failure
    void EnableControlSecurity(auto on_result, failure_callback on_failure);
    // Calls DisableControlSecurity and calls on_result or on_failure
    void DisableControlSecurity(auto on_result, failure_callback on_failure);
    // Calls ChangePreSharedKey and calls on_result or on_failure
    void ChangePreSharedKey(OcaString identity, OcaBlob newKey, auto on_result, failure_callback on_failure);
    // Calls ChangePreSharedKey and does not wait for the response
    void ChangePreSharedKey(OcaString identity, OcaBlob newKey);
    // Calls AddPreSharedKey and calls on_result or on_failure
    void AddPreSharedKey(OcaString identity, OcaBlob key, auto on_result, failure_callback on_failure);
    // Calls AddPreSharedKey and does not wait for the response
    void AddPreSharedKey(OcaString identity, OcaBlob key);
    // Calls DeletePreSharedKey and calls on_result or on_failure
    void DeletePreSharedKey(OcaString identity, auto on_result, failure_callback on_failure);
    // Calls DeletePreSharedKey and does not wait for the response
    void DeletePreSharedKey(OcaString identity);

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

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

Methods#

EnableControlSecurity#

void EnableControlSecurity(auto on_result, failure_callback on_failure)

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

DisableControlSecurity#

void DisableControlSecurity(auto on_result, failure_callback on_failure)

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

ChangePreSharedKey#

void ChangePreSharedKey(OcaString identity, OcaBlob newKey, auto on_result, failure_callback on_failure)

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

Parameters:#

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

AddPreSharedKey#

void AddPreSharedKey(OcaString identity, OcaBlob key, auto on_result, failure_callback on_failure)

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

Parameters:#

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

DeletePreSharedKey#

void DeletePreSharedKey(OcaString identity, auto on_result, failure_callback on_failure)

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

Parameters:#

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

observesecureControlData#

subscription observesecureControlData(auto callback, failure_callback on_failure)

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

Parameters:#

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

OnsecureControlDataChanged#

subscription OnsecureControlDataChanged(auto callback, failure_callback on_failure)

Parameters#

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