diff -r 34acfd7ad508 src/devices/wifi/qos-tag.cc --- a/src/devices/wifi/qos-tag.cc Tue Aug 25 08:52:57 2009 +0200 +++ b/src/devices/wifi/qos-tag.cc Tue Aug 25 19:04:08 2009 +0200 @@ -44,9 +44,9 @@ } QosTag::QosTag (): - m_tid (0) + m_tid (UP_BE) {} -QosTag::QosTag (uint8_t tid): +QosTag::QosTag (enum UserPriority tid): m_tid (tid) {} @@ -65,16 +65,16 @@ void QosTag::Deserialize (TagBuffer i) { - m_tid = i.ReadU8 (); + m_tid = (enum UserPriority) i.ReadU8 (); } void -QosTag::Set (uint8_t tid) +QosTag::Set (enum UserPriority tid) { m_tid = tid; } -uint8_t +enum UserPriority QosTag::Get () const { return m_tid; diff -r 34acfd7ad508 src/devices/wifi/qos-tag.h --- a/src/devices/wifi/qos-tag.h Tue Aug 25 08:52:57 2009 +0200 +++ b/src/devices/wifi/qos-tag.h Tue Aug 25 19:04:08 2009 +0200 @@ -26,6 +26,23 @@ class Tag; + +/** + * As per IEEE Std. 802.11-2007, Section 6.1.1.1.1, for QoS data the + * the Traffic ID (TID) value corresponds to one of the User Priority (UP) + * values defined by the IEEE Std. 802.1D-2004, Annex G, table G-2.. + */ +enum UserPriority { + UP_BK = 1, /**< background */ + UP_BE = 0, /**< best effort (default) */ + UP_EE = 3, /**< excellent effort */ + UP_CL = 4, /**< controlled load */ + UP_VI = 5, /**< video, < 100ms latency and jitter */ + UP_VO = 6, /**< voice, < 10ms latency and jitter */ + UP_NC = 7 /**< network control */ +}; + + class QosTag : public Tag { public: @@ -33,16 +50,16 @@ virtual TypeId GetInstanceTypeId (void) const; QosTag (); - QosTag (uint8_t tid); + QosTag (UserPriority tid); virtual void Serialize (TagBuffer i) const; virtual void Deserialize (TagBuffer i); virtual uint32_t GetSerializedSize () const; virtual void Print (std::ostream &os) const; - uint8_t Get (void) const; - void Set (uint8_t tid); + UserPriority Get (void) const; + void Set (UserPriority tid); private: - uint8_t m_tid; + UserPriority m_tid; }; } //namespace ns3