Skip to content

OcaLog#

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

A log object. Child of OcaDataSet.


Overview#

Class Declaration#

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

    // Control Methods
    // Calls AddLogRecord and calls on_result or on_failure
    void AddLogRecord(OcaLogRecord Entry, auto on_result, failure_callback on_failure);
    // Calls AddLogRecord and does not wait for the response
    void AddLogRecord(OcaLogRecord Entry);
    // Calls GetSeverityThreshold and calls on_result or on_failure
    void GetSeverityThreshold(auto on_result, failure_callback on_failure);
    // Calls SetSeverityThreshold and calls on_result or on_failure
    void SetSeverityThreshold(OcaLogSeverityLevel Severity, auto on_result, failure_callback on_failure);
    // Calls SetSeverityThreshold and does not wait for the response
    void SetSeverityThreshold(OcaLogSeverityLevel Severity);
    // Calls OpenRetrievalSession and calls on_result or on_failure
    void OpenRetrievalSession(OcaLockState LockType, OcaLogFilter Filter, auto on_result, failure_callback on_failure);
    // Calls OpenRetrievalSession and does not wait for the response
    void OpenRetrievalSession(OcaLockState LockType, OcaLogFilter Filter);
    // Calls CloseRetrievalSession and calls on_result or on_failure
    void CloseRetrievalSession(OcaIOSessionHandle Handle, auto on_result, failure_callback on_failure);
    // Calls CloseRetrievalSession and does not wait for the response
    void CloseRetrievalSession(OcaIOSessionHandle Handle);
    // Calls RetrieveRecords and calls on_result or on_failure
    void RetrieveRecords(OcaIOSessionHandle Handle, OcaUint64 RecStartNo, OcaUint16 RecCount, OcaUint64 MaxDataLength, auto on_result, failure_callback on_failure);
    // Calls RetrieveRecords and does not wait for the response
    void RetrieveRecords(OcaIOSessionHandle Handle, OcaUint64 RecStartNo, OcaUint16 RecCount, OcaUint64 MaxDataLength);
    // Calls GetEnabled and calls on_result or on_failure
    void GetEnabled(auto on_result, failure_callback on_failure);
    // Calls SetEnabled and calls on_result or on_failure
    void SetEnabled(OcaBoolean Enabled, auto on_result, failure_callback on_failure);
    // Calls SetEnabled and does not wait for the response
    void SetEnabled(OcaBoolean Enabled);

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

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

Methods#

AddLogRecord#

void AddLogRecord(OcaLogRecord Entry, auto on_result, failure_callback on_failure)

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

Parameters:#

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

GetSeverityThreshold#

void GetSeverityThreshold(auto on_result, failure_callback on_failure)

Calls the method GetSeverityThreshold in the remote device.

Parameters:#

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

SetSeverityThreshold#

void SetSeverityThreshold(OcaLogSeverityLevel Severity, auto on_result, failure_callback on_failure)

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

Parameters:#

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

OpenRetrievalSession#

void OpenRetrievalSession(OcaLockState LockType, OcaLogFilter Filter, auto on_result, failure_callback on_failure)

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

Parameters:#

  • OcaLockState LockType
  • OcaLogFilter Filter
  • auto on_result: A callable (e.g. a lambda) with the following arguments:
    • OcaIOSessionHandle Handle
  • failure_callback on_failure: A callback which is called on error.

CloseRetrievalSession#

void CloseRetrievalSession(OcaIOSessionHandle Handle, auto on_result, failure_callback on_failure)

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

Parameters:#

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

RetrieveRecords#

void RetrieveRecords(OcaIOSessionHandle Handle, OcaUint64 RecStartNo, OcaUint16 RecCount, OcaUint64 MaxDataLength, auto on_result, failure_callback on_failure)

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

Parameters:#

  • OcaIOSessionHandle Handle
  • OcaUint64 RecStartNo
  • OcaUint16 RecCount
  • OcaUint64 MaxDataLength
  • auto on_result: A callable (e.g. a lambda) with the following arguments:
    • OcaBoolean EndOfData
    • OcaUint64 LengthOfRequestedData
    • OcaList<OcaLogRecord> Records
  • failure_callback on_failure: A callback which is called on error.

GetEnabled#

void GetEnabled(auto on_result, failure_callback on_failure)

Calls the method GetEnabled in the remote device.

Parameters:#

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

SetEnabled#

void SetEnabled(OcaBoolean Enabled, auto on_result, failure_callback on_failure)

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

Parameters:#

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

observeEnabled#

subscription observeEnabled(auto callback, failure_callback on_failure)

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

Parameters:#

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

observeSeverityThreshold#

subscription observeSeverityThreshold(auto callback, failure_callback on_failure)

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

Parameters:#

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

OnEnabledChanged#

subscription OnEnabledChanged(auto callback, failure_callback on_failure)

Parameters#

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

OnSeverityThresholdChanged#

subscription OnSeverityThresholdChanged(auto callback, failure_callback on_failure)

Parameters#

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