Open Lighting Architecture
0.10.4
|
An asyncronous RDM Discovery algorithm.
This implements the binary search algorithm from the E1.20 standard. The implementation is asyncronous 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 forver.
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... | |
|
explicit |
Create a new DiscoveryAgent.
target | the DiscoveryTargetInterface to use for sending commands. |
void ola::rdm::DiscoveryAgent::StartFullDiscovery | ( | DiscoveryCompleteCallback * | on_complete | ) |
Initiate a full discovery operation.
on_complete | the callback to run once discovery completes. |
void ola::rdm::DiscoveryAgent::StartIncrementalDiscovery | ( | DiscoveryCompleteCallback * | on_complete | ) |
Initiate an incremental discovery operation.
on_complete | the callback to run once discovery completes. |