15#include "sensorring/platform/SensorringExport.hpp"
85template <>
struct hash<eduart::sensorring::com::ComInterfaceID> {
92 auto h1 = std::hash<int>{}(
static_cast<int>(
id.type));
93 auto h2 = std::hash<std::string>{}(
id.name);
94 return h1 ^ (h2 << 1);
SENSORRING_EXPORT std::ostream & operator<<(std::ostream &os, const InterfaceType type) noexcept
Stream interface type as string.
InterfaceType
Type of the communication interface.
Definition ComInterfaceID.hpp:27
@ UsbTingo
USBtingo CAN adapter.
Definition ComInterfaceID.hpp:30
@ SocketCan
Linux SocketCAN interface (e.g. can0).
Definition ComInterfaceID.hpp:29
@ Undefined
Type not yet assigned.
Definition ComInterfaceID.hpp:28
SENSORRING_EXPORT std::string toString(InterfaceType type) noexcept
Format interface type as string.
Uniquely identifies a communication interface by type and name.
Definition ComInterfaceID.hpp:51
InterfaceType type
Type of the communication interface.
Definition ComInterfaceID.hpp:53
bool operator!=(const ComInterfaceID &other) const
Inequality operator for ComInterfaceID.
Definition ComInterfaceID.hpp:69
bool operator==(const ComInterfaceID &other) const
Equality operator for ComInterfaceID.
Definition ComInterfaceID.hpp:65
std::string name
Name of the communication interface.
Definition ComInterfaceID.hpp:56
std::size_t operator()(const eduart::sensorring::com::ComInterfaceID &id) const noexcept
Compute hash value for a ComInterfaceID.
Definition ComInterfaceID.hpp:91