View | Details | Raw Unified | Return to bug 668
Collapse All | Expand All

(-)a/src/devices/wifi/qos-tag.cc (-5 / +5 lines)
 Lines 44-52    Link Here 
44
}
44
}
45
45
46
QosTag::QosTag ():
46
QosTag::QosTag ():
47
  m_tid (0)
47
  m_tid (UP_BE)
48
{}
48
{}
49
QosTag::QosTag (uint8_t tid):
49
QosTag::QosTag (enum UserPriority tid):
50
  m_tid (tid)
50
  m_tid (tid)
51
{}
51
{}
52
52
 Lines 65-80    Link Here 
65
void
65
void
66
QosTag::Deserialize (TagBuffer i)
66
QosTag::Deserialize (TagBuffer i)
67
{
67
{
68
  m_tid = i.ReadU8 ();
68
  m_tid = (enum UserPriority) i.ReadU8 ();
69
}
69
}
70
70
71
void
71
void
72
QosTag::Set (uint8_t tid)
72
QosTag::Set (enum UserPriority tid)
73
{
73
{
74
  m_tid = tid;
74
  m_tid = tid;
75
}
75
}
76
76
77
uint8_t
77
enum UserPriority
78
QosTag::Get () const
78
QosTag::Get () const
79
{
79
{
80
  return m_tid;
80
  return m_tid;
(-)a/src/devices/wifi/qos-tag.h (-4 / +21 lines)
 Lines 26-31    Link Here 
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:
 Lines 33-48    Link Here 
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

Return to bug 668