OLD | NEW |
1 /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */ | 1 /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */ |
2 /* | 2 /* |
3 * Copyright (c) 2011 Centre Tecnologic de Telecomunicacions de Catalunya (CTTC) | 3 * Copyright (c) 2011 Centre Tecnologic de Telecomunicacions de Catalunya (CTTC) |
4 * | 4 * |
5 * This program is free software; you can redistribute it and/or modify | 5 * This program is free software; you can redistribute it and/or modify |
6 * it under the terms of the GNU General Public License version 2 as | 6 * it under the terms of the GNU General Public License version 2 as |
7 * published by the Free Software Foundation; | 7 * published by the Free Software Foundation; |
8 * | 8 * |
9 * This program is distributed in the hope that it will be useful, | 9 * This program is distributed in the hope that it will be useful, |
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
(...skipping 30 matching lines...) Expand all Loading... |
41 public: | 41 public: |
42 | 42 |
43 /** | 43 /** |
44 * \brief Constructor | 44 * \brief Constructor |
45 * | 45 * |
46 * Creates a null header | 46 * Creates a null header |
47 */ | 47 */ |
48 LteRlcHeader (); | 48 LteRlcHeader (); |
49 ~LteRlcHeader (); | 49 ~LteRlcHeader (); |
50 | 50 |
| 51 /** |
| 52 * Set framing info |
| 53 * |
| 54 * \param framingInfo framing info |
| 55 */ |
51 void SetFramingInfo (uint8_t framingInfo); | 56 void SetFramingInfo (uint8_t framingInfo); |
| 57 /** |
| 58 * Set sequence number |
| 59 * |
| 60 * \param sequenceNumber sequence number |
| 61 */ |
52 void SetSequenceNumber (SequenceNumber10 sequenceNumber); | 62 void SetSequenceNumber (SequenceNumber10 sequenceNumber); |
53 | 63 |
| 64 /** |
| 65 * Get framing info |
| 66 * |
| 67 * \returns framing info |
| 68 */ |
54 uint8_t GetFramingInfo () const; | 69 uint8_t GetFramingInfo () const; |
| 70 /** |
| 71 * Get sequence number |
| 72 * |
| 73 * \returns sequence number |
| 74 */ |
55 SequenceNumber10 GetSequenceNumber () const; | 75 SequenceNumber10 GetSequenceNumber () const; |
56 | 76 |
| 77 /** |
| 78 * Push extension bit |
| 79 * |
| 80 * \param extensionBit the extension bit |
| 81 */ |
57 void PushExtensionBit (uint8_t extensionBit); | 82 void PushExtensionBit (uint8_t extensionBit); |
| 83 /** |
| 84 * Push length indicator |
| 85 * |
| 86 * \param lengthIndicator the length indicator |
| 87 */ |
58 void PushLengthIndicator (uint16_t lengthIndicator); | 88 void PushLengthIndicator (uint16_t lengthIndicator); |
59 | 89 |
| 90 /** |
| 91 * Pop extension bit |
| 92 * |
| 93 * \returns the extension bit |
| 94 */ |
60 uint8_t PopExtensionBit (void); | 95 uint8_t PopExtensionBit (void); |
| 96 /** |
| 97 * Pop length indicator |
| 98 * |
| 99 * \returns the length indicator |
| 100 */ |
61 uint16_t PopLengthIndicator (void); | 101 uint16_t PopLengthIndicator (void); |
62 | 102 |
| 103 /// ExtensionBit_t typedef |
63 typedef enum { | 104 typedef enum { |
64 DATA_FIELD_FOLLOWS = 0, | 105 DATA_FIELD_FOLLOWS = 0, |
65 E_LI_FIELDS_FOLLOWS = 1 | 106 E_LI_FIELDS_FOLLOWS = 1 |
66 } ExtensionBit_t; | 107 } ExtensionBit_t; ///< ExtensionBit_t enumeration |
67 | 108 |
| 109 /// FramingInfoFirstByte_t typedef |
68 typedef enum { | 110 typedef enum { |
69 FIRST_BYTE = 0x00, | 111 FIRST_BYTE = 0x00, |
70 NO_FIRST_BYTE = 0x02 | 112 NO_FIRST_BYTE = 0x02 |
71 } FramingInfoFirstByte_t; | 113 } FramingInfoFirstByte_t; ///< FramingInfoFirstByte_t enumeration |
72 | 114 |
| 115 /// FramingInfoLastByte_t tyedef |
73 typedef enum { | 116 typedef enum { |
74 LAST_BYTE = 0x00, | 117 LAST_BYTE = 0x00, |
75 NO_LAST_BYTE = 0x01 | 118 NO_LAST_BYTE = 0x01 |
76 } FramingInfoLastByte_t; | 119 } FramingInfoLastByte_t; ///< FramingInfoLastByte_t enumeration |
77 | 120 |
78 | 121 |
| 122 /** |
| 123 * \brief Get the type ID. |
| 124 * \return the object TypeId |
| 125 */ |
79 static TypeId GetTypeId (void); | 126 static TypeId GetTypeId (void); |
80 virtual TypeId GetInstanceTypeId (void) const; | 127 virtual TypeId GetInstanceTypeId (void) const; |
81 virtual void Print (std::ostream &os) const; | 128 virtual void Print (std::ostream &os) const; |
82 virtual uint32_t GetSerializedSize (void) const; | 129 virtual uint32_t GetSerializedSize (void) const; |
83 virtual void Serialize (Buffer::Iterator start) const; | 130 virtual void Serialize (Buffer::Iterator start) const; |
84 virtual uint32_t Deserialize (Buffer::Iterator start); | 131 virtual uint32_t Deserialize (Buffer::Iterator start); |
85 | 132 |
86 private: | 133 private: |
87 uint16_t m_headerLength; | 134 uint16_t m_headerLength; ///< header length |
88 uint8_t m_framingInfo; // 2 bits | 135 uint8_t m_framingInfo; ///< 2 bits |
89 SequenceNumber10 m_sequenceNumber; | 136 SequenceNumber10 m_sequenceNumber; ///< sequence number |
90 | 137 |
91 std::list <uint8_t> m_extensionBits; // Includes extensionBit of the fixed par
t | 138 std::list <uint8_t> m_extensionBits; ///< Includes extensionBit of the fixed p
art |
92 std::list <uint16_t> m_lengthIndicators; | 139 std::list <uint16_t> m_lengthIndicators; ///< length indicators |
93 | 140 |
94 }; | 141 }; |
95 | 142 |
96 }; // namespace ns3 | 143 }; // namespace ns3 |
97 | 144 |
98 #endif // LTE_RLC_HEADER_H | 145 #endif // LTE_RLC_HEADER_H |
OLD | NEW |