Open Lighting Architecture  Latest Git
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:
Inheritance graph
[legend]

Public Types

typedef ola::BaseCallback1< void, bool > MuteDeviceCallback
 The callback run when a mute command completes. More...
 
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. More...
 

Public Member Functions

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

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
dataThe DUB response, if any was received. Otherwise pass NULL.
lengthThe length of the DUB response.

◆ MuteDeviceCallback

The callback run when a mute command completes.

Template Parameters
oktrue 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
lowerthe lower bound UID.
upperthe upper bound UID.
callbackthe 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
targetthe device to mute
mute_completethe 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_completethe 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: