VR-Vantage 3.1 API Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Types | Public Member Functions
jrm::MacAddress Struct Reference

Type representing a Media Access Control (MAC) address. More...

Inheritance diagram for jrm::MacAddress:
Inheritance graph
[legend]

Public Types

enum  Size { Size_Undefined = -1, Size_Eui48 = 6, Size_Eui64 = 8 }
 The size in bytes of a Media Access Control (MAC) address by format type, e.g. More...
typedef MacAddressBase Base
typedef MacValueType ValueType
typedef unsigned int NumericValueType

Public Member Functions

bool valid () const
 Returns a flag indicating if the MAC address represented by this object is valid or not.
int compare (const MacAddress &rhs) const
 Compares the given object with this object and returns a value: < 0 if this "comes before" the given object.
bool fromString (const std::string &in)
 Parses the given string representation of a MAC address, and makes this object equivalent.
std::string string (const std::string &delim="-") const
 Returns a human-readable string representation of this object.
 static_assert (sizeof(NumericValueType) >=sizeof(ValueType),"native numeric type used for MAC value stream I/O is not large enough")

Additional Inherited Members

- Public Attributes inherited from std::vector< T >
elements
 STL member.

Detailed Description

Type representing a Media Access Control (MAC) address.

Suitable for representing a MAC address of either type EUI-48 or EUI-64. Individual values may be accessed via operator[]() or at() methods.

Member Typedef Documentation

Member Enumeration Documentation

The size in bytes of a Media Access Control (MAC) address by format type, e.g.

IEEE formats for Extended Unique Identifier (EUI) 48-bit and 64-bit.

Enumerator:
Size_Undefined 

Initialization value.

Size_Eui48 
Size_Eui64 

Member Function Documentation

bool jrm::MacAddress::valid ( ) const

Returns a flag indicating if the MAC address represented by this object is valid or not.

    The only current cause for returning an invalid status is that the size is incorrect,
    i.e. it is not a valid Size enum value.
Returns
True iff the MAC address is valid.
int jrm::MacAddress::compare ( const MacAddress rhs) const

Compares the given object with this object and returns a value: < 0 if this "comes before" the given object.

0 if this "comes after" the given object.

== 0 if this is the same as the given object.

Referenced by jrm::EthAdapterInfo::FindByMacAddress::operator()().

bool jrm::MacAddress::fromString ( const std::string in)

Parses the given string representation of a MAC address, and makes this object equivalent.

std::string jrm::MacAddress::string ( const std::string &  delim = "-") const

Returns a human-readable string representation of this object.

jrm::MacAddress::static_assert ( sizeof(NumericValueType) >=sizeof(ValueType ,
"native numeric type used for MAC value stream I/O is not large enough"   
)

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


Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)