46 const uint8_t* in_p =
static_cast<const uint8_t*
>(fp16);
58 uint8_t* o =
static_cast<uint8_t*
>(fp16);
uint16_t float16_t
This type represents how velocity is seen on the wire (16 bit float).
This class provides a mechanism for working with velocity in different forms.
void set_wire(float16_t value)
Set the value based on the wire version of velocity.
float16_t get_wire() const
Get a wire version of the velocity.
#define DASSERT(x)
Debug assertion facility.
void speed_to_fp16(SpeedType speed, void *fp16)
Renders a SpeedType value to an unaligned memory address, typically to the output buffer.
SpeedType fp16_to_speed(const void *fp16)
Parses a SpeedType value from an unaligned memory address, typically from the input buffer.
static const uint64_t NODE_ID_DC_BLOCK
Node ID space allocated for DC blocks.
static const uint64_t NODE_ID_MTH_DCS
Node ID space allocated for the MTH DCS protocol.
static const uint64_t NODE_ID_DCC
Node ID space allocated for DCC locomotives.
static const uint64_t NODE_ID_MARKLIN_MOTOROLA
Node ID space allocated for the Marklin-Motorola protocol.
static const uint64_t IS_TRAIN_EVENT
This event should be produced by train nodes.
static const uint64_t IS_PROXY_EVENT
This event should be produced by traction proxy nodes.
static const uint64_t NODE_ID_TMCC
Node ID space allocated for TMCC protocol.