21 #include "ns3/assert.h"
29 #ifndef TAG_BUFFER_USE_INLINE
75 uint16_t data = byte1;
88 uint32_t data = byte3;
118 uint8_t *buf = (uint8_t *)&v;
119 for (uint32_t i = 0; i <
sizeof (double); ++i, ++buf)
128 for (uint32_t i = 0; i < size; ++i, ++buffer)
137 uint8_t byte0 =
ReadU8 ();
138 uint8_t byte1 =
ReadU8 ();
139 uint8_t byte2 =
ReadU8 ();
140 uint8_t byte3 =
ReadU8 ();
141 uint8_t byte4 =
ReadU8 ();
142 uint8_t byte5 =
ReadU8 ();
143 uint8_t byte6 =
ReadU8 ();
144 uint8_t byte7 =
ReadU8 ();
145 uint64_t data = byte7;
168 uint8_t *buf = (uint8_t *)&v;
169 for (uint32_t i = 0; i <
sizeof (double); ++i, ++buf)
179 for (uint32_t i = 0; i < size; ++i, ++buffer)
void Write(const uint8_t *buffer, uint32_t size)
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by "...
void WriteU64(uint64_t v)
void WriteDouble(double v)
#define NS_ASSERT(condition)
At runtime, in debugging builds, if this condition is not true, the program prints the source file...
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
void TrimAtEnd(uint32_t trim)
Trim some space from the end.
uint8_t * m_current
current TagBuffer position
TAG_BUFFER_INLINE uint32_t ReadU32(void)
TAG_BUFFER_INLINE uint8_t ReadU8(void)
uint8_t * m_end
end TagBuffer position
TAG_BUFFER_INLINE void WriteU32(uint32_t v)
TAG_BUFFER_INLINE void WriteU16(uint16_t v)
TAG_BUFFER_INLINE void WriteU8(uint8_t v)
TagBuffer(uint8_t *start, uint8_t *end)
Constructor.
void Read(uint8_t *buffer, uint32_t size)
TAG_BUFFER_INLINE uint16_t ReadU16(void)
void CopyFrom(TagBuffer o)
Copy the nternal structure of another TagBuffer.