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;
206 void PrintDec2BinNix (uint32_t decimalNum, uint32_t bitCount, std::ostream &os)
const;
Neighbor-index data structure for nix-vector routing.
NixVector & operator=(const NixVector &o)
void PrintDec2BinNix(uint32_t decimalNum, uint32_t bitCount, std::ostream &os) const
Internal for pretty printing of nix-vector (no fill)
uint32_t m_totalBitSize
A counter of how total bits are in the nix-vector.
uint32_t GetRemainingBits(void)
uint32_t ExtractNeighborIndex(uint32_t numberOfBits)
uint32_t Serialize(uint32_t *buffer, uint32_t maxSize) const
NixBits_t m_nixVector
the actual nix-vector
uint32_t GetSerializedSize(void) const
std::vector< uint32_t > NixBits_t
Typedef: the NixVector bits storage.
void DumpNixVector(std::ostream &os) const
Print the NixVector.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
friend std::ostream & operator<<(std::ostream &os, const NixVector &nix)
Stream insertion operator.
Ptr< NixVector > Copy(void) const
uint32_t BitCount(uint32_t numberOfNeighbors) const
void PrintDec2BinNixFill(uint32_t decimalNum, uint32_t bitCount, std::ostream &os) const
Internal for pretty printing of nix-vector (fill)
uint32_t Deserialize(const uint32_t *buffer, uint32_t size)
uint32_t m_used
For tracking where we are in the nix-vector.
void AddNeighborIndex(uint32_t newBits, uint32_t numberOfBits)
uint32_t m_currentVectorBitSize
For tracking how many bits we have used in the current vector entry.
A template-based reference counting class.