Open Lighting Architecture  Latest Git
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

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

Public Member Functions

 DiscoveryAgent (DiscoveryTargetInterface *target)
 Create a new DiscoveryAgent. More...
 
 ~DiscoveryAgent ()
 Destructor.
 
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

◆ DiscoveryAgent()

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

Create a new DiscoveryAgent.

Parameters
targetthe DiscoveryTargetInterface to use for sending commands.

Member Function Documentation

◆ StartFullDiscovery()

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

Initiate a full discovery operation.

Parameters
on_completethe callback to run once discovery completes.

◆ StartIncrementalDiscovery()

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

Initiate an incremental discovery operation.

Parameters
on_completethe callback to run once discovery completes.

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