Open Model Railroad Network (OpenMRN)
Loading...
Searching...
No Matches
RoutingLogic.cxx
Go to the documentation of this file.
1
36
#include "
openlcb/RoutingLogic.hxx
"
37
38
namespace
openlcb
{
39
49
uint8_t
event_range_to_bit_count
(EventId* event) {
50
EventId e = *event;
51
EventId mask = 1;
52
uint8_t ret = 0;
53
EventId value = e & mask;
54
while
(ret < 64 && ((e & mask) == value)) {
55
mask <<= 1;
56
value <<= 1;
57
++ret;
58
}
59
*
event
&= ~(mask - 1);
60
return
ret;
61
}
62
63
}
// namespace openlcb
RoutingLogic.hxx
openlcb
Definition
RailcomPortDebug.hxx:202
openlcb::event_range_to_bit_count
uint8_t event_range_to_bit_count(EventId *event)
Decodes an event range, encoded according to the Event Transport protocol specification.
Definition
RoutingLogic.cxx:49
src
openlcb
RoutingLogic.cxx
Generated on Sun Feb 2 2025 21:18:14 for Open Model Railroad Network (OpenMRN) by
1.9.8