22 #include "ns3/address.h"
94 static uint8_t nextAllocated = 0;
96 uint8_t
address = nextAllocated++;
97 if (nextAllocated == 255)
a polymophic address class
static uint8_t Register(void)
Allocate a new type id for a new type of address.
A class used for addressing MAC8 MAC's.
static Mac8Address GetBroadcast(void)
Get the broadcast address (255).
Address ConvertTo(void) const
Convert to a generic Address.
static Mac8Address ConvertFrom(const Address &address)
Convert a generic address to a Mac8Address.
static bool IsMatchingType(const Address &address)
Check that a generic Address is compatible with Mac8Address.
uint8_t m_address
The address.
static uint8_t GetType(void)
Get the Mac8Address type.
void CopyTo(uint8_t *pBuffer) const
Writes address to buffer parameter.
static Mac8Address Allocate()
Allocates Mac8Address from 0-254.
void CopyFrom(const uint8_t *pBuffer)
Sets address to address stored in parameter.
virtual ~Mac8Address()
Destructor.
Mac8Address()
Constructor.
#define NS_ASSERT(condition)
At runtime, in debugging builds, if this condition is not true, the program prints the source file,...
Every class exported by the ns3 library is enclosed in the ns3 namespace.
bool operator==(const EventId &a, const EventId &b)
bool operator<(const EventId &a, const EventId &b)
bool operator!=(Callback< R, T1, T2, T3, T4, T5, T6, T7, T8, T9 > a, Callback< R, T1, T2, T3, T4, T5, T6, T7, T8, T9 > b)
Inequality test.
std::istream & operator>>(std::istream &is, Angles &a)
std::ostream & operator<<(std::ostream &os, const Angles &a)
list x
Random number samples.