OpFlex Framework 1.7.0
opflex::modb::MAC Class Reference

A MAC address is used to identify devices on an ethernet network. More...

#include <opflex/modb/MAC.h>

Public Member Functions

 MAC ()
 Construct a MAC consisting of all zeroes.
 
 MAC (const std::string &mac)
 Construct a MAC using the given string representation.
 
 MAC (uint8_t mac[6])
 Construct a MAC using an array of 6 bytes, in network byte order.
 
 ~MAC ()
 Destroy the MAC.
 
std::string toString () const
 Get the MAC represented as a string.
 
void toUIntArray (uint8_t mac[6]) const
 Get the MAC represented as an array of 6 bytes in network byte order.
 

Friends

bool operator== (const MAC &lhs, const MAC &rhs)
 Check for MAC equality.
 
bool operator!= (const MAC &lhs, const MAC &rhs)
 Check for MAC inequality.
 
size_t hash_value (MAC const &mac)
 Compute a hash value for the MAC, making MAC suitable as a key in a boost::unordered_map.
 

Detailed Description

A MAC address is used to identify devices on an ethernet network.

The string representation is a set of 6 hex-encoded bytes separated by colon characters.


The documentation for this class was generated from the following file: