Skip to content

OcaLibraryManager#

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

Optional manager for handling device presets -- Patch and ParamSet libraries. May be instantiated once in any device., If instantiated, object number must be 8.


Overview#

Class Declaration#

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

    // Control Methods
    // Calls AddLibrary and calls on_result or on_failure
    void AddLibrary(OcaLibVolType Type, auto on_result, failure_callback on_failure);
    // Calls AddLibrary and does not wait for the response
    void AddLibrary(OcaLibVolType Type);
    // Calls DeleteLibrary and calls on_result or on_failure
    void DeleteLibrary(OcaONo ID, auto on_result, failure_callback on_failure);
    // Calls DeleteLibrary and does not wait for the response
    void DeleteLibrary(OcaONo ID);
    // Calls GetLibraryCount and calls on_result or on_failure
    void GetLibraryCount(OcaLibVolType Type, auto on_result, failure_callback on_failure);
    // Calls GetLibraryCount and does not wait for the response
    void GetLibraryCount(OcaLibVolType Type);
    // Calls GetLibraryList and calls on_result or on_failure
    void GetLibraryList(OcaLibVolType Type, auto on_result, failure_callback on_failure);
    // Calls GetLibraryList and does not wait for the response
    void GetLibraryList(OcaLibVolType Type);
    // Calls GetCurrentPatch and calls on_result or on_failure
    void GetCurrentPatch(auto on_result, failure_callback on_failure);
    // Calls ApplyPatch and calls on_result or on_failure
    void ApplyPatch(OcaLibVolIdentifier ID, auto on_result, failure_callback on_failure);
    // Calls ApplyPatch and does not wait for the response
    void ApplyPatch(OcaLibVolIdentifier ID);

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

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

Methods#

AddLibrary#

void AddLibrary(OcaLibVolType Type, auto on_result, failure_callback on_failure)

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

Parameters:#

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

DeleteLibrary#

void DeleteLibrary(OcaONo ID, auto on_result, failure_callback on_failure)

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

Parameters:#

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

GetLibraryCount#

void GetLibraryCount(OcaLibVolType Type, auto on_result, failure_callback on_failure)

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

Parameters:#

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

GetLibraryList#

void GetLibraryList(OcaLibVolType Type, auto on_result, failure_callback on_failure)

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

Parameters:#

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

GetCurrentPatch#

void GetCurrentPatch(auto on_result, failure_callback on_failure)

Calls the method GetCurrentPatch in the remote device.

Parameters:#

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

ApplyPatch#

void ApplyPatch(OcaLibVolIdentifier ID, auto on_result, failure_callback on_failure)

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

Parameters:#

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

observeLibraries#

subscription observeLibraries(auto callback, failure_callback on_failure)

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

Parameters:#

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

observeCurrentPatch#

subscription observeCurrentPatch(auto callback, failure_callback on_failure)

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

Parameters:#

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

OnLibrariesChanged#

subscription OnLibrariesChanged(auto callback, failure_callback on_failure)

Parameters#

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

OnCurrentPatchChanged#

subscription OnCurrentPatchChanged(auto callback, failure_callback on_failure)

Parameters#

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