@@ -7,13 +7,13 @@ namespace RDMSharp
77{
88 internal class RDMDiscoveryContext
99 {
10- private readonly HashSet < RDMUID > _foundUids = new HashSet < RDMUID > ( ) ;
11- private readonly HashSet < RDMUID > _falseOnUids = new HashSet < RDMUID > ( ) ;
10+ private readonly HashSet < UID > _foundUids = new HashSet < UID > ( ) ;
11+ private readonly HashSet < UID > _falseOnUids = new HashSet < UID > ( ) ;
1212 private readonly ConcurrentDictionary < ulong , RemovedUIDRange > removedRange = new ConcurrentDictionary < ulong , RemovedUIDRange > ( ) ;
13- private ulong rangeToSearch = ( ulong ) ( RDMUID . Broadcast - 1 ) ;
13+ private ulong rangeToSearch = ( ulong ) ( UID . Broadcast - 1 ) ;
1414 private string _statusString ;
1515 private RDMDiscoveryStatus _status = new RDMDiscoveryStatus ( ) ;
16- private RDMUID ? lastFoundUid ;
16+ private UID ? lastFoundUid ;
1717 private ulong messageCount ;
1818
1919
@@ -24,35 +24,35 @@ public RDMDiscoveryContext(IProgress<RDMDiscoveryStatus> progress = null)
2424 this . _progress = progress ;
2525 }
2626
27- internal bool AlreadyFound ( RDMUID uid ) => _foundUids . Contains ( uid ) ;
27+ internal bool AlreadyFound ( UID uid ) => _foundUids . Contains ( uid ) ;
2828
29- internal void AddFound ( RDMUID uid )
29+ internal void AddFound ( UID uid )
3030 {
3131 _foundUids . Add ( uid ) ;
3232 lastFoundUid = uid ;
3333 UpdateReport ( ) ;
3434 }
3535
36- internal void AddFound ( IEnumerable < RDMUID > uid )
36+ internal void AddFound ( IEnumerable < UID > uid )
3737 {
3838 _foundUids . UnionWith ( uid ) ;
3939 lastFoundUid = uid . LastOrDefault ( ) ;
4040 UpdateReport ( ) ;
4141 }
42- internal void AddFalseOn ( RDMUID uid )
42+ internal void AddFalseOn ( UID uid )
4343 {
4444 _falseOnUids . Add ( uid ) ;
4545 }
46- internal bool IsFalseOn ( RDMUID uid )
46+ internal bool IsFalseOn ( UID uid )
4747 {
4848 return _falseOnUids . Contains ( uid ) ;
4949 }
5050
5151 internal int FoundCount => _foundUids . Count ;
5252
53- internal IReadOnlyCollection < RDMUID > FoundUIDs => _foundUids . ToList ( ) ;
53+ internal IReadOnlyCollection < UID > FoundUIDs => _foundUids . ToList ( ) ;
5454
55- internal void RemoveRange ( RDMUID uidStart , RDMUID uidEnd )
55+ internal void RemoveRange ( UID uidStart , UID uidEnd )
5656 {
5757 var newRemovedRange = new RemovedUIDRange ( uidStart , uidEnd ) ;
5858 var overlap = removedRange . FirstOrDefault ( r => areRangesOverlapping ( r . Value . StartUID , r . Value . EndUID , newRemovedRange . StartUID , newRemovedRange . EndUID ) ) ;
@@ -90,10 +90,10 @@ internal void RemoveRange(RDMUID uidStart, RDMUID uidEnd)
9090 foreach ( var r in removedRange )
9191 sumDelta += ( ulong ) r . Value . Delta ;
9292
93- rangeToSearch = ( ulong ) ( RDMUID . Broadcast - 1 ) - sumDelta ;
93+ rangeToSearch = ( ulong ) ( UID . Broadcast - 1 ) - sumDelta ;
9494 UpdateReport ( ) ;
9595
96- static bool areRangesOverlapping ( RDMUID start1 , RDMUID end1 , RDMUID start2 , RDMUID end2 )
96+ static bool areRangesOverlapping ( UID start1 , UID end1 , UID start2 , UID end2 )
9797 {
9898 if ( start1 <= end2 && end1 >= start2 ) // Check for overlap
9999 return true ;
@@ -144,19 +144,19 @@ private RDMDiscoveryStatus GetStatus()
144144 }
145145 internal class RemovedUIDRange
146146 {
147- public readonly RDMUID StartUID ;
148- public readonly RDMUID EndUID ;
149- public readonly RDMUID Delta ;
147+ public readonly UID StartUID ;
148+ public readonly UID EndUID ;
149+ public readonly UID Delta ;
150150
151- public RemovedUIDRange ( in RDMUID startUID , in RDMUID endUID )
151+ public RemovedUIDRange ( in UID startUID , in UID endUID )
152152 {
153153 StartUID = startUID ;
154154 EndUID = endUID ;
155155 Delta = EndUID - StartUID ;
156156 }
157157 public static RemovedUIDRange Merge ( RemovedUIDRange one , RemovedUIDRange other )
158158 {
159- return new RemovedUIDRange ( new RDMUID ( Math . Min ( ( ulong ) one . StartUID , ( ulong ) other . StartUID ) ) , new RDMUID ( Math . Max ( ( ulong ) one . EndUID , ( ulong ) other . EndUID ) ) ) ;
159+ return new RemovedUIDRange ( new UID ( Math . Min ( ( ulong ) one . StartUID , ( ulong ) other . StartUID ) ) , new UID ( Math . Max ( ( ulong ) one . EndUID , ( ulong ) other . EndUID ) ) ) ;
160160 }
161161 public override string ToString ( )
162162 {
0 commit comments