5#include "roo_collections/hash.h"
6#include "roo_collections/small_string.h"
7#include "roo_logging.h"
14using DeviceId = roo_collections::SmallString<24>;
16using SensorId = roo_collections::SmallString<24>;
156 return roo_collections::murmur3_32(schema.c_str(), strlen(schema.c_str()),
164 return roo_collections::murmur3_32(
166 std::hash<roo_transceivers::DeviceSchema>()(loc.
schema()));
173 return roo_collections::murmur3_32(
175 std::hash<roo_transceivers::DeviceLocator>()(loc.
device_locator()));
182 return roo_collections::murmur3_32(
184 std::hash<roo_transceivers::DeviceLocator>()(loc.
device_locator()));
190roo_logging::Stream&
operator<<(roo_logging::Stream& s,
194roo_logging::Stream&
operator<<(roo_logging::Stream& s,
198roo_logging::Stream&
operator<<(roo_logging::Stream& s,
202roo_logging::Stream&
operator<<(roo_logging::Stream& s,
Identifies actuator within a transceiver device.
const DeviceLocator & device_locator() const
Returns the device locator.
const DeviceSchema & schema() const
Returns the device schema.
const DeviceId & device_id() const
Returns the device id.
void write_cstr(char *buf) const
Writes a null-terminated string representation into buf.
std::string toString() const
Returns a string representation.
bool isDefined() const
Returns true if the locator is defined.
const ActuatorId & actuator_id() const
Returns the actuator id.
Identifies a transceiver device by schema and device id.
bool isDefined() const
Returns true if schema or device id is set.
const DeviceId & device_id() const
Returns the device id.
const DeviceSchema & schema() const
Returns the device schema.
std::string toString() const
Returns a string representation.
void write_cstr(char *buf) const
Writes a null-terminated string representation into buf.
Identifies sensor within a transceiver device.
const SensorId & sensor_id() const
Returns the sensor id.
const DeviceLocator & device_locator() const
Returns the device locator.
const DeviceSchema & schema() const
Returns the device schema.
const DeviceId & device_id() const
Returns the device id.
std::string toString() const
Returns a string representation.
bool isDefined() const
Returns true if the locator is defined.
void write_cstr(char *buf) const
Writes a null-terminated string representation into buf.
roo_logging::Stream & operator<<(roo_logging::Stream &s, const roo_transceivers::DeviceSchema &schema)
roo_collections::SmallString< 24 > SensorId
Sensor identifier (short string).
bool operator!=(const DeviceLocator &a, const DeviceLocator &b)
bool operator==(const DeviceLocator &a, const DeviceLocator &b)
roo_collections::SmallString< 16 > DeviceSchema
Device schema identifier (short string).
roo_collections::SmallString< 24 > ActuatorId
Actuator identifier (short string).
roo_collections::SmallString< 24 > DeviceId
Device identifier (short string).