Base Framework
Public Member Functions | Static Protected Member Functions | List of all members
EUI64 Class Reference

IEEE EUI-64 identifier. More...

#include <base/communication/EUI64.h>

Public Member Functions

 EUI64 () noexcept
 
 EUI64 (const uint8 value[8]) noexcept
 
 EUI64 (const String &value)
 
 EUI64 (const EUI64 &copy) noexcept
 
EUI64operator= (const EUI64 &assign) noexcept
 
bool operator== (const EUI64 &compare) const noexcept
 
bool operator!= (const EUI64 &compare) const noexcept
 
unsigned int getCompanyId () const noexcept
 
void setCompanyId (unsigned int companyId)
 
uint64 getExtensionId () const noexcept
 
void setExtensionId (uint64 extensionId)
 
bool isInvalid () const noexcept
 
bool isEUI48 () const noexcept
 
bool isMAC48 () const noexcept
 
bool isIndividual () const noexcept
 
bool isGlobal () const noexcept
 
void makeGlobal () noexcept
 
void makeLocal () noexcept
 
void getEUI48 (uint8 *eui48) const noexcept
 
void setEUI48 (const uint8 *eui48) noexcept
 
void getMAC48 (uint8 *mac) const noexcept
 
void setMAC48 (const uint8 *mac) noexcept
 
const uint8 * getBytes () const noexcept
 

Static Protected Member Functions

static uint8 swapNibbles (uint8 value) noexcept
 

Detailed Description

IEEE EUI-64 identifier.

A 64 bit globally unique identifier (GUID) composed of a 24 bit company id and an 48 bit extension identifier. See http://standards.ieee.org/regauth/oui/tutorials/EUI64.html and RFC 2373.

Version
1.0
Examples
testsuite/IEEE1394.cpp.

Constructor & Destructor Documentation

◆ EUI64() [1/4]

EUI64::EUI64 ( )
noexcept

Initializes identifier as ff:ff:ff-00:00:00:00:00.

◆ EUI64() [2/4]

EUI64::EUI64 ( const uint8  value[8])
noexcept

Initializes identifier from array.

◆ EUI64() [3/4]

EUI64::EUI64 ( const String value)

Initializes identifier from string.

◆ EUI64() [4/4]

EUI64::EUI64 ( const EUI64 copy)
noexcept

Initializes identifier from other identifier.

Member Function Documentation

◆ getBytes()

const uint8* EUI64::getBytes ( ) const
inlinenoexcept

Returns the identifier.

◆ getCompanyId()

unsigned int EUI64::getCompanyId ( ) const
noexcept

Returns the 24 bit company id.

◆ getEUI48()

void EUI64::getEUI48 ( uint8 *  eui48) const
noexcept

Fills the specified array with the EUI-48 identifier.

◆ getExtensionId()

uint64 EUI64::getExtensionId ( ) const
noexcept

Returns the extension identifier of this EUI-64 id.

◆ getMAC48()

void EUI64::getMAC48 ( uint8 *  mac) const
noexcept

Fills specified array with the MAC idenfier.

◆ isEUI48()

bool EUI64::isEUI48 ( ) const
inlinenoexcept

Returns true if the id is an encapsulated EUI-48 identifier.

◆ isGlobal()

bool EUI64::isGlobal ( ) const
inlinenoexcept

Returns true if the universal/local bit is set.

◆ isIndividual()

bool EUI64::isIndividual ( ) const
inlinenoexcept

Returns true if the individual/group bit is set.

◆ isInvalid()

bool EUI64::isInvalid ( ) const
noexcept

Returns true if the identifier is ff:ff:ff-00:00:00:00:00.

Examples
testsuite/IEEE1394.cpp.

◆ isMAC48()

bool EUI64::isMAC48 ( ) const
inlinenoexcept

Returns true if the id is an encapsulated MAC-48 identifier.

◆ makeGlobal()

void EUI64::makeGlobal ( )
inlinenoexcept

Resets the universal/local bit.

◆ makeLocal()

void EUI64::makeLocal ( )
inlinenoexcept

Sets the universal/local bit.

◆ operator!=()

bool EUI64::operator!= ( const EUI64 compare) const
noexcept

Returns true if the identifiers are different.

◆ operator=()

EUI64& EUI64::operator= ( const EUI64 assign)
noexcept

Assignment of identifier by identifier.

◆ operator==()

bool EUI64::operator== ( const EUI64 compare) const
noexcept

Returns true if the identifiers are identical.

◆ setCompanyId()

void EUI64::setCompanyId ( unsigned int  companyId)

Sets the 24 bit company id.

◆ setEUI48()

void EUI64::setEUI48 ( const uint8 *  eui48)
noexcept

Sets the identifier by an EUI-48 identifier.

◆ setExtensionId()

void EUI64::setExtensionId ( uint64  extensionId)

Sets the extension identifier of this EUI-64 id.

◆ setMAC48()

void EUI64::setMAC48 ( const uint8 *  mac)
noexcept

Sets the identifier by an MAC-48 identifier.

◆ swapNibbles()

static uint8 EUI64::swapNibbles ( uint8  value)
inlinestaticprotectednoexcept

Swaps the 4 bit nibbles of a 8 bit word.