Open Lighting Architecture  0.9.6
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Types | Public Member Functions | List of all members
ola::rdm::DiscoveryTargetInterface Class Reference

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.
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

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.

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

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::usbdmx::JaRuleWidgetImpl, and ola::plugin::usbpro::RobeWidgetImpl.

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::usbdmx::JaRuleWidgetImpl, and ola::plugin::usbpro::RobeWidgetImpl.

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::usbdmx::JaRuleWidgetImpl, and ola::plugin::usbpro::RobeWidgetImpl.


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