|
26 |
|
26 |
|
27 |
class Tag; |
27 |
class Tag; |
28 |
|
28 |
|
|
|
29 |
|
30 |
/** |
31 |
* As per IEEE Std. 802.11-2007, Section 6.1.1.1.1, for QoS data the |
32 |
* the Traffic ID (TID) value corresponds to one of the User Priority (UP) |
33 |
* values defined by the IEEE Std. 802.1D-2004, Annex G, table G-2.. |
34 |
*/ |
35 |
enum UserPriority { |
36 |
UP_BK = 1, /**< background */ |
37 |
UP_BE = 0, /**< best effort (default) */ |
38 |
UP_EE = 3, /**< excellent effort */ |
39 |
UP_CL = 4, /**< controlled load */ |
40 |
UP_VI = 5, /**< video, < 100ms latency and jitter */ |
41 |
UP_VO = 6, /**< voice, < 10ms latency and jitter */ |
42 |
UP_NC = 7 /**< network control */ |
43 |
}; |
44 |
|
45 |
|
29 |
class QosTag : public Tag |
46 |
class QosTag : public Tag |
30 |
{ |
47 |
{ |
31 |
public: |
48 |
public: |
|
33 |
virtual TypeId GetInstanceTypeId (void) const; |
50 |
virtual TypeId GetInstanceTypeId (void) const; |
34 |
|
51 |
|
35 |
QosTag (); |
52 |
QosTag (); |
36 |
QosTag (uint8_t tid); |
53 |
QosTag (UserPriority tid); |
37 |
virtual void Serialize (TagBuffer i) const; |
54 |
virtual void Serialize (TagBuffer i) const; |
38 |
virtual void Deserialize (TagBuffer i); |
55 |
virtual void Deserialize (TagBuffer i); |
39 |
virtual uint32_t GetSerializedSize () const; |
56 |
virtual uint32_t GetSerializedSize () const; |
40 |
virtual void Print (std::ostream &os) const; |
57 |
virtual void Print (std::ostream &os) const; |
41 |
|
58 |
|
42 |
uint8_t Get (void) const; |
59 |
UserPriority Get (void) const; |
43 |
void Set (uint8_t tid); |
60 |
void Set (UserPriority tid); |
44 |
private: |
61 |
private: |
45 |
uint8_t m_tid; |
62 |
UserPriority m_tid; |
46 |
}; |
63 |
}; |
47 |
|
64 |
|
48 |
} //namespace ns3 |
65 |
} //namespace ns3 |