Open Lighting Architecture: ola::rdm::DiscoveryTargetInterface Class Reference

| Open Lighting Architecture 0.10.9

Loading...
Searching...
No Matches
Public Types | Public Member Functions | List of all members
ola::rdm::DiscoveryTargetInterface Class Referenceabstract

## Detailed Description

The interface used by the DiscoveryTarget to send RDM commands.

This class abstracts away the method of sending RDM commands from the discovery algorithm in DiscoveryAgent.

For each of the MuteDevice, UnMuteAll and Branch methods, the implementation should send the appropriate RDM command and then run the provided callback when the command has been sent.

Inheritance diagram for ola::rdm::DiscoveryTargetInterface:

## Public Types
typedef ola::BaseCallback1< void, bool > | MuteDeviceCallback
| The callback run when a mute command completes.
typedef ola::BaseCallback0< void > | UnMuteDeviceCallback
| The callback run when an unmute command completes.
typedef ola::BaseCallback2< void, const uint8_t *, unsigned int > | BranchCallback
| The callback run when a DUB command completes.

## Public Member Functions
virtual void | MuteDevice (const UID &target, MuteDeviceCallback *mute_complete)=0
| Mute a device.
virtual void | UnMuteAll (UnMuteDeviceCallback *unmute_complete)=0
| Unmute all devices.
virtual void | Branch (const UID &lower, const UID &upper, BranchCallback *callback)=0
| Send a DUB command.

## Member Typedef Documentation

## ◆ BranchCallback

typedef ola::BaseCallback2<void, const uint8_t*, unsigned int> ola::rdm::DiscoveryTargetInterface::BranchCallback

The callback run when a DUB command completes.

Template Parameters

  data | The DUB response, if any was received. Otherwise pass NULL.
  length | The length of the DUB response.

## ◆ MuteDeviceCallback

typedef ola::BaseCallback1<void, bool> ola::rdm::DiscoveryTargetInterface::MuteDeviceCallback

The callback run when a mute command completes.

Template Parameters

  ok | true if the device muted correctly, false if the device failed to ack the mute.

## Member Function Documentation

## ◆ Branch()

virtual void ola::rdm::DiscoveryTargetInterface::Branch | ( | const UID & | lower,
|  | const UID & | upper,
|  | BranchCallback * | callback )
| pure virtual

Send a DUB command.

Parameters

  lower | the lower bound UID.
  upper | the upper bound UID.
  callback | the callback to run when the DUB completes.

Any data received in response to the DUB command should be passed back when the callback is run.

Implemented in ola::plugin::usbpro::EnttecPortImpl, ola::plugin::usbpro::RobeWidgetImpl, and ola::usb::JaRulePortHandleImpl.

## ◆ MuteDevice()

virtual void ola::rdm::DiscoveryTargetInterface::MuteDevice | ( | const UID & | target,
|  | MuteDeviceCallback * | mute_complete )
| pure virtual

Mute a device.

Parameters

  target | the device to mute
  mute_complete | the callback to run when the mute operations completes.

Implemented in ola::plugin::usbpro::EnttecPortImpl, ola::plugin::usbpro::RobeWidgetImpl, and ola::usb::JaRulePortHandleImpl.

## ◆ UnMuteAll()

virtual void ola::rdm::DiscoveryTargetInterface::UnMuteAll | ( | UnMuteDeviceCallback * | unmute_complete | ) |
| pure virtual

Unmute all devices.

Parameters

  unmute_complete | the callback to run when the unmute operation completes.

Implemented in ola::plugin::usbpro::EnttecPortImpl, ola::plugin::usbpro::RobeWidgetImpl, and ola::usb::JaRulePortHandleImpl.

The documentation for this class was generated from the following file:

- include/ola/rdm/DiscoveryAgent.h