20 #ifndef MAC8_ADDRESS_H
21 #define MAC8_ADDRESS_H
23 #include "ns3/address.h"
91 void CopyFrom(
const uint8_t* pBuffer);
98 void CopyTo(uint8_t* pBuffer)
const;
158 bool operator<(
const Mac8Address& a,
const Mac8Address& b);
167 bool operator==(
const Mac8Address& a,
const Mac8Address& b);
176 bool operator!=(
const Mac8Address& a,
const Mac8Address& b);
a polymophic address class
A class used for addressing MAC8 MAC's.
friend bool operator<(const Mac8Address &a, const Mac8Address &b)
Address comparison, less than.
static Mac8Address GetBroadcast()
Get the broadcast address (255).
static Mac8Address ConvertFrom(const Address &address)
Convert a generic address to a Mac8Address.
static void ResetAllocationIndex()
Reset the Mac8Address allocation index.
Address ConvertTo() const
Convert to a generic Address.
static bool IsMatchingType(const Address &address)
Check that a generic Address is compatible with Mac8Address.
static uint8_t GetType()
Get the Mac8Address type.
uint8_t m_address
The address.
static uint8_t m_allocationIndex
Address allocation index.
void CopyTo(uint8_t *pBuffer) const
Writes address to buffer parameter.
static Mac8Address Allocate()
Allocates Mac8Address from 0-254.
friend bool operator==(const Mac8Address &a, const Mac8Address &b)
Address comparison, equality.
friend bool operator!=(const Mac8Address &a, const Mac8Address &b)
Address comparison, unequal.
friend std::istream & operator>>(std::istream &is, Mac8Address &address)
Read address from stream is as 8 bit integer.
friend std::ostream & operator<<(std::ostream &os, const Mac8Address &address)
Write address to stream os as 8 bit integer.
void CopyFrom(const uint8_t *pBuffer)
Sets address to address stored in parameter.
virtual ~Mac8Address()
Destructor.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
bool operator!=(Callback< R, Args... > a, Callback< R, Args... > b)
Inequality test.
bool operator==(const EventId &a, const EventId &b)
bool operator<(const EventId &a, const EventId &b)
std::istream & operator>>(std::istream &is, Angles &a)
std::ostream & operator<<(std::ostream &os, const Angles &a)