29 #ifndef INCLUDE_OLA_RDM_DISCOVERYAGENT_H_
30 #define INCLUDE_OLA_RDM_DISCOVERYAGENT_H_
64 virtual void MuteDevice(
const UID &target,
70 virtual void Branch(
const UID &lower,
96 UIDRange(
const UID &lower,
const UID &upper, UIDRange *parent)
103 branch_corrupt(
false) {
108 unsigned int attempt;
109 unsigned int failures;
110 unsigned int uids_discovered;
114 typedef std::stack<UIDRange*> UIDRanges;
122 std::queue<UID> m_uids_to_mute;
129 UIDRanges m_uid_ranges;
131 unsigned int m_mute_attempts;
137 void UnMuteComplete();
138 void MaybeMuteNextDevice();
139 void IncrementalMuteComplete(
bool status);
140 void SendDiscovery();
142 void BranchComplete(
const uint8_t *data,
unsigned int length);
143 void BranchMuteComplete(
bool status);
144 void HandleCollision();
145 void FreeCurrentRange();
147 static const unsigned int MAX_DUB_RESPONSE_SIZE = 24;
148 static const unsigned int MIN_DUB_RESPONSE_SIZE = 17;
153 static const unsigned int MAX_EMPTY_BRANCH_ATTEMPTS = 5;
158 static const unsigned int MAX_BRANCH_FAILURES = 5;
160 static const unsigned int MAX_MUTE_ATTEMPTS = 5;
164 #endif // INCLUDE_OLA_RDM_DISCOVERYAGENT_H_