59 const bit_mask_pos_type bit_pos{};
79 return (std::strcmp(name, rhs.name) == 0) && bit_pos == rhs.bit_pos;
89 return !((*this) == rhs);
118 os <<
"Name: " << p.name <<
", Bit mask position: " << p.bit_pos;
129#ifdef CORELINK_USE_TCP
135#ifdef CORELINK_USE_UDP
141#ifdef CORELINK_USE_WEBSOCKET
static constexpr protocol unknown
Marker for unknown protocol to mark default protocol values.
Definition corelink_network_constants.hpp:126
static constexpr protocol udp
UDP protocol object for corelink protocols.
Definition corelink_network_constants.hpp:139
static constexpr protocol tcp
TCP protocol object for corelink protocols.
Definition corelink_network_constants.hpp:133
static constexpr protocol websocket
Websocket protocol object for corelink protocols.
Definition corelink_network_constants.hpp:145
CORELINK_CPP_ATTR_MAYBE_UNUSED constexpr CORELINK_EXPORT ptr_to_const_val< char > IPV6_LOOP_BACK_ADDRESS
Loop back address IPv6 representation.
Definition corelink_network_constants.hpp:26
CORELINK_CPP_ATTR_MAYBE_UNUSED constexpr CORELINK_EXPORT ptr_to_const_val< char > IPV4_LOOP_BACK_ADDRESS
Loop back address IPv4 representation.
Definition corelink_network_constants.hpp:21
state
Corelink channel states. Each value denotes a unique position in the bitmask.
Definition corelink_network_constants.hpp:154
Definition reader_writer_lock_shim.hpp:7
t const * ptr_to_const_val
Typedef native pointer-to-const-value type.
Definition typedefs.hpp:34
A short protocol wrapper to allow for string representation of corelink supported protocols,...
Definition corelink_network_constants.hpp:40
friend std::ostream & operator<<(std::ostream &os, const protocol &p)
overloaded ostream operator
Definition corelink_network_constants.hpp:116
uint16_t bit_mask_pos_type
Bit mask position type.
Definition corelink_network_constants.hpp:45
std::bitset< sizeof(bit_mask_pos_type) *8 > bit_mask_type
Bit mask value type.
Definition corelink_network_constants.hpp:49
ptr_to_const_val< char > proto_name() const
Type conversion operator.
Definition corelink_network_constants.hpp:105
bool operator==(const protocol &rhs) const
Equality comparison. check if 2 protocol objects are similar.
Definition corelink_network_constants.hpp:77
constexpr protocol(const char(&s)[sz], bit_mask_pos_type pos)
constructor
Definition corelink_network_constants.hpp:69
bool operator!=(const protocol &rhs) const
Definition corelink_network_constants.hpp:87
constexpr bit_mask_pos_type operator()() const
Overloaded () operator.
Definition corelink_network_constants.hpp:96