The Pedigree Project 0.1
Public Member Functions | Private Attributes | List of all members
MacAddress Class Reference

#include <MacAddress.h>

+ Collaboration diagram for MacAddress:

Public Member Functions

 MacAddress (const MacAddress &other)
 
bool valid () const
 
void setMac (uint8_t byte, size_t element)
 
void setMac (uint8_t element)
 
void setMac (const uint16_t *data, bool bSwap=false)
 
uint8_t getMac (size_t element) const
 
const uint16_t * getMac () const
 
uint8_t operator[] (size_t offset) const
 
MacAddress & operator= (const MacAddress &a)
 
MacAddress & operator= (const uint16_t *a)
 
String toString ()
 

Private Attributes

uint16_t m_Mac [3]
 
bool m_Valid
 

Detailed Description

A MAC address

Definition at line 28 of file MacAddress.h.

Constructor & Destructor Documentation

◆ MacAddress() [1/2]

MacAddress::MacAddress ( )

Definition at line 24 of file MacAddress.cc.

◆ MacAddress() [2/2]

MacAddress::MacAddress ( const MacAddress &  other)

Definition at line 28 of file MacAddress.cc.

Member Function Documentation

◆ getMac() [1/2]

const uint16_t * MacAddress::getMac ( ) const

Definition at line 77 of file MacAddress.cc.

◆ getMac() [2/2]

uint8_t MacAddress::getMac ( size_t  element) const

Definition at line 65 of file MacAddress.cc.

◆ operator=() [1/2]

MacAddress & MacAddress::operator= ( const MacAddress &  a)

Definition at line 88 of file MacAddress.cc.

◆ operator=() [2/2]

MacAddress & MacAddress::operator= ( const uint16_t *  a)

Definition at line 94 of file MacAddress.cc.

◆ operator[]()

uint8_t MacAddress::operator[] ( size_t  offset) const

Definition at line 81 of file MacAddress.cc.

◆ setMac() [1/3]

void MacAddress::setMac ( const uint16_t *  data,
bool  bSwap = false 
)

Definition at line 54 of file MacAddress.cc.

◆ setMac() [2/3]

void MacAddress::setMac ( uint8_t  byte,
size_t  element 
)

Definition at line 35 of file MacAddress.cc.

◆ setMac() [3/3]

void MacAddress::setMac ( uint8_t  element)

Useful for setting a broadcast MAC

Definition at line 49 of file MacAddress.cc.

◆ toString()

String MacAddress::toString ( )

Definition at line 99 of file MacAddress.cc.

◆ valid()

bool MacAddress::valid ( ) const
inline

Definition at line 33 of file MacAddress.h.

Member Data Documentation

◆ m_Mac

uint16_t MacAddress::m_Mac[3]
private

Definition at line 57 of file MacAddress.h.

◆ m_Valid

bool MacAddress::m_Valid
private

Definition at line 58 of file MacAddress.h.


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