Skip to content

OcaSignalGenerator#

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

Multiwaveform signal generator with optional sweep capability.


Overview#

Class Declaration#

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

    // Control Methods
    // Calls GetFrequency1 and calls on_result or on_failure
    void GetFrequency1(auto on_result, failure_callback on_failure);
    // Calls SetFrequency1 and calls on_result or on_failure
    void SetFrequency1(OcaFrequency Frequency, auto on_result, failure_callback on_failure);
    // Calls SetFrequency1 and does not wait for the response
    void SetFrequency1(OcaFrequency Frequency);
    // Calls GetFrequency2 and calls on_result or on_failure
    void GetFrequency2(auto on_result, failure_callback on_failure);
    // Calls SetFrequency2 and calls on_result or on_failure
    void SetFrequency2(OcaFrequency frequency, auto on_result, failure_callback on_failure);
    // Calls SetFrequency2 and does not wait for the response
    void SetFrequency2(OcaFrequency frequency);
    // Calls GetLevel and calls on_result or on_failure
    void GetLevel(auto on_result, failure_callback on_failure);
    // Calls SetLevel and calls on_result or on_failure
    void SetLevel(OcaDBz Level, auto on_result, failure_callback on_failure);
    // Calls SetLevel and does not wait for the response
    void SetLevel(OcaDBz Level);
    // Calls GetWaveform and calls on_result or on_failure
    void GetWaveform(auto on_result, failure_callback on_failure);
    // Calls SetWaveform and calls on_result or on_failure
    void SetWaveform(OcaWaveformType waveform, auto on_result, failure_callback on_failure);
    // Calls SetWaveform and does not wait for the response
    void SetWaveform(OcaWaveformType waveform);
    // Calls GetSweepType and calls on_result or on_failure
    void GetSweepType(auto on_result, failure_callback on_failure);
    // Calls SetSweepType and calls on_result or on_failure
    void SetSweepType(OcaSweepType sweepType, auto on_result, failure_callback on_failure);
    // Calls SetSweepType and does not wait for the response
    void SetSweepType(OcaSweepType sweepType);
    // Calls GetSweepTime and calls on_result or on_failure
    void GetSweepTime(auto on_result, failure_callback on_failure);
    // Calls SetSweepTime and calls on_result or on_failure
    void SetSweepTime(OcaTimeInterval sweepTime, auto on_result, failure_callback on_failure);
    // Calls SetSweepTime and does not wait for the response
    void SetSweepTime(OcaTimeInterval sweepTime);
    // Calls GetSweepRepeat and calls on_result or on_failure
    void GetSweepRepeat(auto on_result, failure_callback on_failure);
    // Calls SetSweepRepeat and calls on_result or on_failure
    void SetSweepRepeat(OcaBoolean sweepRepeat, auto on_result, failure_callback on_failure);
    // Calls SetSweepRepeat and does not wait for the response
    void SetSweepRepeat(OcaBoolean sweepRepeat);
    // Calls GetGenerating and calls on_result or on_failure
    void GetGenerating(auto on_result, failure_callback on_failure);
    // Calls Start and calls on_result or on_failure
    void Start(auto on_result, failure_callback on_failure);
    // Calls Stop and calls on_result or on_failure
    void Stop(auto on_result, failure_callback on_failure);
    // Calls SetMultiple and calls on_result or on_failure
    void SetMultiple(OcaParameterMask Mask, OcaFrequency Frequency1, OcaFrequency Frequency2, OcaDBz Level, OcaWaveformType Waveform, OcaSweepType SweepType, OcaTimeInterval SweepTime, OcaBoolean SweepRepeat, auto on_result, failure_callback on_failure);
    // Calls SetMultiple and does not wait for the response
    void SetMultiple(OcaParameterMask Mask, OcaFrequency Frequency1, OcaFrequency Frequency2, OcaDBz Level, OcaWaveformType Waveform, OcaSweepType SweepType, OcaTimeInterval SweepTime, OcaBoolean SweepRepeat);

    // Observing Properties
    subscription observeFrequency1(auto callback, failure_callback on_failure);
    subscription observeFrequency2(auto callback, failure_callback on_failure);
    subscription observeLevel(auto callback, failure_callback on_failure);
    subscription observeWaveform(auto callback, failure_callback on_failure);
    subscription observeSweepType(auto callback, failure_callback on_failure);
    subscription observeSweepTime(auto callback, failure_callback on_failure);
    subscription observeSweepRepeat(auto callback, failure_callback on_failure);
    subscription observeGenerating(auto callback, failure_callback on_failure);

    // Property Changed Subscriptions
    subscription OnFrequency1Changed(auto callback, failure_callback on_failure);
    subscription OnFrequency2Changed(auto callback, failure_callback on_failure);
    subscription OnLevelChanged(auto callback, failure_callback on_failure);
    subscription OnWaveformChanged(auto callback, failure_callback on_failure);
    subscription OnSweepTypeChanged(auto callback, failure_callback on_failure);
    subscription OnSweepTimeChanged(auto callback, failure_callback on_failure);
    subscription OnSweepRepeatChanged(auto callback, failure_callback on_failure);
    subscription OnGeneratingChanged(auto callback, failure_callback on_failure);
  };
}

Methods#

GetFrequency1#

void GetFrequency1(auto on_result, failure_callback on_failure)

Calls the method GetFrequency1 in the remote device.

Parameters:#

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

SetFrequency1#

void SetFrequency1(OcaFrequency Frequency, auto on_result, failure_callback on_failure)

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

Parameters:#

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

GetFrequency2#

void GetFrequency2(auto on_result, failure_callback on_failure)

Calls the method GetFrequency2 in the remote device.

Parameters:#

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

SetFrequency2#

void SetFrequency2(OcaFrequency frequency, auto on_result, failure_callback on_failure)

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

Parameters:#

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

GetLevel#

void GetLevel(auto on_result, failure_callback on_failure)

Calls the method GetLevel in the remote device.

Parameters:#

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

SetLevel#

void SetLevel(OcaDBz Level, auto on_result, failure_callback on_failure)

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

Parameters:#

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

GetWaveform#

void GetWaveform(auto on_result, failure_callback on_failure)

Calls the method GetWaveform in the remote device.

Parameters:#

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

SetWaveform#

void SetWaveform(OcaWaveformType waveform, auto on_result, failure_callback on_failure)

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

Parameters:#

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

GetSweepType#

void GetSweepType(auto on_result, failure_callback on_failure)

Calls the method GetSweepType in the remote device.

Parameters:#

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

SetSweepType#

void SetSweepType(OcaSweepType sweepType, auto on_result, failure_callback on_failure)

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

Parameters:#

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

GetSweepTime#

void GetSweepTime(auto on_result, failure_callback on_failure)

Calls the method GetSweepTime in the remote device.

Parameters:#

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

SetSweepTime#

void SetSweepTime(OcaTimeInterval sweepTime, auto on_result, failure_callback on_failure)

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

Parameters:#

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

GetSweepRepeat#

void GetSweepRepeat(auto on_result, failure_callback on_failure)

Calls the method GetSweepRepeat in the remote device.

Parameters:#

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

SetSweepRepeat#

void SetSweepRepeat(OcaBoolean sweepRepeat, auto on_result, failure_callback on_failure)

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

Parameters:#

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

GetGenerating#

void GetGenerating(auto on_result, failure_callback on_failure)

Calls the method GetGenerating in the remote device.

Parameters:#

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

Start#

void Start(auto on_result, failure_callback on_failure)

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

Stop#

void Stop(auto on_result, failure_callback on_failure)

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

SetMultiple#

void SetMultiple(OcaParameterMask Mask, OcaFrequency Frequency1, OcaFrequency Frequency2, OcaDBz Level, OcaWaveformType Waveform, OcaSweepType SweepType, OcaTimeInterval SweepTime, OcaBoolean SweepRepeat, auto on_result, failure_callback on_failure)

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

Parameters:#

  • OcaParameterMask Mask
  • OcaFrequency Frequency1
  • OcaFrequency Frequency2
  • OcaDBz Level
  • OcaWaveformType Waveform
  • OcaSweepType SweepType
  • OcaTimeInterval SweepTime
  • OcaBoolean SweepRepeat
  • auto on_result: A callable (e.g. a lambda) with 0 arguments.
  • failure_callback on_failure: A callback which is called on error.

observeFrequency1#

subscription observeFrequency1(auto callback, failure_callback on_failure)

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

Parameters:#

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

observeFrequency2#

subscription observeFrequency2(auto callback, failure_callback on_failure)

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

Parameters:#

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

observeLevel#

subscription observeLevel(auto callback, failure_callback on_failure)

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

Parameters:#

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

observeWaveform#

subscription observeWaveform(auto callback, failure_callback on_failure)

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

Parameters:#

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

observeSweepType#

subscription observeSweepType(auto callback, failure_callback on_failure)

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

Parameters:#

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

observeSweepTime#

subscription observeSweepTime(auto callback, failure_callback on_failure)

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

Parameters:#

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

observeSweepRepeat#

subscription observeSweepRepeat(auto callback, failure_callback on_failure)

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

Parameters:#

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

observeGenerating#

subscription observeGenerating(auto callback, failure_callback on_failure)

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

Parameters:#

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

OnFrequency1Changed#

subscription OnFrequency1Changed(auto callback, failure_callback on_failure)

Parameters#

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

OnFrequency2Changed#

subscription OnFrequency2Changed(auto callback, failure_callback on_failure)

Parameters#

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

OnLevelChanged#

subscription OnLevelChanged(auto callback, failure_callback on_failure)

Parameters#

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

OnWaveformChanged#

subscription OnWaveformChanged(auto callback, failure_callback on_failure)

Parameters#

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

OnSweepTypeChanged#

subscription OnSweepTypeChanged(auto callback, failure_callback on_failure)

Parameters#

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

OnSweepTimeChanged#

subscription OnSweepTimeChanged(auto callback, failure_callback on_failure)

Parameters#

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

OnSweepRepeatChanged#

subscription OnSweepRepeatChanged(auto callback, failure_callback on_failure)

Parameters#

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

OnGeneratingChanged#

subscription OnGeneratingChanged(auto callback, failure_callback on_failure)

Parameters#

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