LEFT | RIGHT |
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) 2009 CTTC | 3 * Copyright (c) 2009 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 22 matching lines...) Expand all Loading... |
33 | 33 |
34 TypeId | 34 TypeId |
35 WifiPhyTag::GetInstanceTypeId (void) const | 35 WifiPhyTag::GetInstanceTypeId (void) const |
36 { | 36 { |
37 return GetTypeId (); | 37 return GetTypeId (); |
38 } | 38 } |
39 | 39 |
40 uint32_t | 40 uint32_t |
41 WifiPhyTag::GetSerializedSize (void) const | 41 WifiPhyTag::GetSerializedSize (void) const |
42 { | 42 { |
43 return (sizeof (WifiTxVector) + 2); | 43 return (sizeof (WifiTxVector) + 2 + 1); |
44 } | 44 } |
45 | 45 |
46 void | 46 void |
47 WifiPhyTag::Serialize (TagBuffer i) const | 47 WifiPhyTag::Serialize (TagBuffer i) const |
48 { | 48 { |
49 i.Write ((uint8_t *)&m_wifiTxVector, sizeof (WifiTxVector)); | 49 i.Write ((uint8_t *)&m_wifiTxVector, sizeof (WifiTxVector)); |
50 i.WriteU16 (static_cast<uint16_t>(m_mpduType)); | 50 i.WriteU16 (static_cast<uint16_t> (m_mpduType)); |
| 51 i.WriteU8 (m_frameComplete); |
51 } | 52 } |
52 | 53 |
53 void | 54 void |
54 WifiPhyTag::Deserialize (TagBuffer i) | 55 WifiPhyTag::Deserialize (TagBuffer i) |
55 { | 56 { |
56 i.Read ((uint8_t *)&m_wifiTxVector, sizeof (WifiTxVector)); | 57 i.Read ((uint8_t *)&m_wifiTxVector, sizeof (WifiTxVector)); |
57 m_mpduType = static_cast<MpduType> (i.ReadU16 ()); | 58 m_mpduType = static_cast<MpduType> (i.ReadU16 ()); |
| 59 m_frameComplete = i.ReadU8 (); |
58 } | 60 } |
| 61 |
59 void | 62 void |
60 WifiPhyTag::Print (std::ostream &os) const | 63 WifiPhyTag::Print (std::ostream &os) const |
61 { | 64 { |
62 os << m_wifiTxVector << " " << m_mpduType; | 65 os << m_wifiTxVector << " " << m_mpduType << " " << m_frameComplete; |
63 } | 66 } |
64 | 67 |
65 WifiPhyTag::WifiPhyTag () | 68 WifiPhyTag::WifiPhyTag () |
66 { | 69 { |
67 } | 70 } |
68 | 71 |
69 WifiPhyTag::WifiPhyTag (WifiTxVector txVector, MpduType mpdutype) | 72 WifiPhyTag::WifiPhyTag (WifiTxVector txVector, MpduType mpdutype, uint8_t frameC
omplete) |
70 : m_wifiTxVector (txVector), | 73 : m_wifiTxVector (txVector), |
71 m_mpduType (mpdutype) | 74 m_mpduType (mpdutype), |
| 75 m_frameComplete (frameComplete) |
72 { | 76 { |
73 } | 77 } |
74 | 78 |
75 WifiTxVector | 79 WifiTxVector |
76 WifiPhyTag::GetWifiTxVector (void) const | 80 WifiPhyTag::GetWifiTxVector (void) const |
77 { | 81 { |
78 return m_wifiTxVector; | 82 return m_wifiTxVector; |
79 } | 83 } |
80 | 84 |
81 MpduType | 85 MpduType |
82 WifiPhyTag::GetMpduType (void) const | 86 WifiPhyTag::GetMpduType (void) const |
83 { | 87 { |
84 return m_mpduType; | 88 return m_mpduType; |
85 } | 89 } |
86 | 90 |
| 91 uint8_t |
| 92 WifiPhyTag::GetFrameComplete (void) const |
| 93 { |
| 94 return m_frameComplete; |
| 95 } |
| 96 |
87 } // namespace ns3 | 97 } // namespace ns3 |
LEFT | RIGHT |