25 #include "ns3/simple-ref-count.h"
26 #include "ns3/buffer.h"
130 uint32_t
Serialize (uint32_t* buffer, uint32_t maxSize)
const;
141 uint32_t
Deserialize (
const uint32_t* buffer, uint32_t size);
151 uint32_t
BitCount (uint32_t numberOfNeighbors)
const;
204 void PrintDec2BinNix (uint32_t decimalNum, uint32_t bitCount, std::ostream &os)
const;
Neighbor-index data structure for nix-vector routing.
void AddNeighborIndex(uint32_t newBits, uint32_t numberOfBits)
Ptr< NixVector > Copy(void) const
uint32_t m_used
For tracking where we are in the nix-vector.
uint32_t m_epoch
Epoch of the Nix-vector creation.
friend std::ostream & operator<<(std::ostream &os, const NixVector &nix)
Stream insertion operator.
uint32_t GetRemainingBits(void) const
NixVector & operator=(const NixVector &o)
uint32_t m_totalBitSize
A counter of how total bits are in the nix-vector.
uint32_t GetSerializedSize(void) const
uint32_t Serialize(uint32_t *buffer, uint32_t maxSize) const
std::vector< uint32_t > NixBits_t
Typedef: the NixVector bits storage.
uint32_t ExtractNeighborIndex(uint32_t numberOfBits)
NixBits_t m_nixVector
the actual nix-vector
void SetEpoch(uint32_t epoch)
Set the NixVector Epoch.
void DumpNixVector(std::ostream &os) const
Print the NixVector.
uint32_t Deserialize(const uint32_t *buffer, uint32_t size)
uint32_t BitCount(uint32_t numberOfNeighbors) const
void PrintDec2BinNix(uint32_t decimalNum, uint32_t bitCount, std::ostream &os) const
Internal for pretty printing of nix-vector (no fill)
uint32_t GetEpoch() const
Get the NixVector Epoch.
A template-based reference counting class.
Every class exported by the ns3 library is enclosed in the ns3 namespace.