23 #include "ns3/lte-rlc-am-header.h"
33 m_dataControlBit (0xff),
34 m_resegmentationFlag (0xff),
37 m_sequenceNumber (0xfffa),
38 m_segmentOffset (0xffff),
39 m_lastOffset (0xffff),
40 m_controlPduType (0xff),
147 return lengthIndicator;
220 "method allowed only for STATUS PDUs");
236 "method allowed only for STATUS PDUs");
254 "method allowed only for STATUS PDUs");
255 for (std::list<int>::iterator nackIt =
m_nackSnList.begin ();
272 "method allowed only for STATUS PDUs");
314 std::list <int>::const_iterator it3 =
m_nackSnList.begin ();
324 os <<
" E=" << (uint16_t)(*it1);
336 os << (uint16_t)(*it1);
346 os << (uint16_t)(*it2) <<
" ";
356 os <<
" NACK_SN=" << (int)(*it3);
375 std::list <int>::const_iterator it3 =
m_nackSnList.begin ();
383 (((*it1) << 2) & 0x04) |
394 uint16_t oddLi, evenLi;
409 i.
WriteU8 ( ((oddE << 7) & 0x80) | ((oddLi >> 4) & 0x007F) );
410 i.
WriteU8 ( ((oddLi << 4) & 0x00F0) | ((evenE << 3) & 0x08) | ((evenLi >> 8) & 0x0007) );
418 i.
WriteU8 ( ((oddE << 7) & 0x80) | ((oddLi >> 4) & 0x007F) );
419 i.
WriteU8 ( ((oddLi << 4) & 0x00F0) );
451 | ((*it3 >> 9) & 0x01));
459 i.
WriteU8( ((oddNack >> 1) & 0xFF) );
468 i.
WriteU8( ((oddNack << 7) & 0x80)
470 | ( (evenNack >> 5) & 0x1F) );
481 i.
WriteU8 ( ((evenNack << 3) & 0xF8)
483 | ((oddNack >> 9) & 0x01));
488 i.
WriteU8 ( ((evenNack << 3) & 0xF8) );
494 i.
WriteU8 ( ((oddNack << 7) & 0x80) );
509 uint8_t extensionBit;
530 extensionBit = (byte_1 & 0x04) >> 2;
538 uint16_t oddLi, evenLi;
547 oddE = (byte_1 & 0x80) >> 7;
548 oddLi = ((byte_1 & 0x7F) << 4) | ((byte_2 & 0xF0) >> 4);
559 evenE = (byte_2 & 0x08) >> 3;
560 evenLi = ((byte_2 & 0x07) << 8) | (byte_3 & 0xFF);
580 m_ackSn = ((byte_1 & 0x0F) << 6 ) | ((byte_2 & 0xFC) >> 2);
582 int moreNacks = (byte_2 & 0x02) >> 1;
585 if ( moreNacks == 1 )
592 ((byte_2 & 0x01) << 9)
594 | ((byte_4 & 0x80) >> 7)
598 moreNacks = ((byte_4 & 0x40) >> 6);
599 uint8_t
byte = byte_4;
602 while (moreNacks == 1)
608 | ((nextByte & 0xF8) >> 3)
613 moreNacks = (nextByte & 0x04) >> 2;
623 | ((finalByte & 0x80) >> 7)
626 moreNacks = ((finalByte & 0x40) >> 6);
iterator in a Buffer instance
void WriteU8(uint8_t data)
uint16_t GetValue() const
Extracts the numeric value of the sequence number.
a unique identifier for an interface.
TypeId SetParent(TypeId tid)
Set the parent TypeId.
#define NS_ASSERT_MSG(condition, message)
At runtime, in debugging builds, if this condition is not true, the program prints the message to out...
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
#define NS_LOG_LOGIC(msg)
Use NS_LOG to output a message of level LOG_LOGIC.
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by ",...
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register an Object subclass with the TypeId system.
Every class exported by the ns3 library is enclosed in the ns3 namespace.