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

Detailed Description

An asynchronous RDM Discovery algorithm.

This implements the binary search algorithm from the E1.20 standard. The implementation is asynchronous and relies on callbacks to indicate when each step completes.

To use the DiscoveryAgent, one should write a class that implements the DiscoveryTargetInterface interface and then pass a pointer to that object to the DiscoveryAgent.

The discovery process goes something like this:

We also track responders that fail to ack a mute request (we attempt to mute MAX_MUTE_ATTEMPTS times) and branches that contain responders which continue to respond once muted. The latter causes a branch to be marked as corrupt, which prevents us from looping forever.

Public Types

ola::SingleUseCallback2< void,
bool, const UIDSet & > 

Public Member Functions

 DiscoveryAgent (DiscoveryTargetInterface *target)
 Create a new DiscoveryAgent. More...
 ~DiscoveryAgent ()
void Abort ()
 Cancel any in-progress discovery operation. If a discovery operation is running, this will result in the callback being run.
void StartFullDiscovery (DiscoveryCompleteCallback *on_complete)
 Initiate a full discovery operation. More...
void StartIncrementalDiscovery (DiscoveryCompleteCallback *on_complete)
 Initiate an incremental discovery operation. More...

Constructor & Destructor Documentation

ola::rdm::DiscoveryAgent::DiscoveryAgent ( DiscoveryTargetInterface target)

Create a new DiscoveryAgent.

targetthe DiscoveryTargetInterface to use for sending commands.

Member Function Documentation

void ola::rdm::DiscoveryAgent::StartFullDiscovery ( DiscoveryCompleteCallback on_complete)

Initiate a full discovery operation.

on_completethe callback to run once discovery completes.
void ola::rdm::DiscoveryAgent::StartIncrementalDiscovery ( DiscoveryCompleteCallback on_complete)

Initiate an incremental discovery operation.

on_completethe callback to run once discovery completes.

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