A Discrete-Event Network Simulator
API
mac-low-transmission-parameters.h
Go to the documentation of this file.
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2 /*
3  * Copyright (c) 2005, 2006 INRIA
4  * Copyright (c) 2009 MIRKO BANCHI
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License version 2 as
8  * published by the Free Software Foundation;
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program; if not, write to the Free Software
17  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18  *
19  * Authors: Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
20  * Mirko Banchi <mk.banchi@gmail.com>
21  */
22 
23 #ifndef MAC_LOW_TRANSMISSION_PARAMETERS_H
24 #define MAC_LOW_TRANSMISSION_PARAMETERS_H
25 
26 #include "ns3/nstime.h"
27 #include "ns3/uinteger.h"
28 
29 namespace ns3 {
30 
40 {
41 public:
43 
49  void EnableAck (void);
63  void EnableFastAck (void);
70  void EnableSuperFastAck (void);
74  void EnableBasicBlockAck (void);
78  void EnableCompressedBlockAck (void);
82  void EnableMultiTidBlockAck (void);
89  void EnableRts (void);
99  void EnableNextData (uint32_t size);
104  void DisableAck (void);
108  void DisableRts (void);
112  void DisableNextData (void);
120  bool MustWaitAck (void) const;
127  bool MustWaitNormalAck (void) const;
134  bool MustWaitFastAck (void) const;
141  bool MustWaitSuperFastAck (void) const;
147  bool MustWaitBasicBlockAck (void) const;
153  bool MustWaitCompressedBlockAck (void) const;
159  bool MustWaitMultiTidBlockAck (void) const;
164  bool MustSendRts (void) const;
168  bool HasNextPacket (void) const;
172  uint32_t GetNextPacketSize (void) const;
173 
174 private:
175  friend std::ostream &operator << (std::ostream &os, const MacLowTransmissionParameters &params);
176  uint32_t m_nextSize;
177  enum
179  {
187  } m_waitAck;
188  bool m_sendRts;
189 };
190 
198 std::ostream &operator << (std::ostream &os, const MacLowTransmissionParameters &params);
199 
200 } //namespace ns3
201 
202 #endif /* MAC_LOW_TRANSMISSION_PARAMETERS_H */
void EnableBasicBlockAck(void)
Wait BASICBLOCKACKTimeout for a Basic Block Ack Response frame.
friend std::ostream & operator<<(std::ostream &os, const MacLowTransmissionParameters &params)
Serialize MacLowTransmissionParameters to ostream in a human-readable form.
control how a packet is transmitted.
std::ostream & operator<<(std::ostream &os, const Angles &a)
print a struct Angles to output
Definition: angles.cc:42
void EnableCompressedBlockAck(void)
Wait COMPRESSEDBLOCKACKTimeout for a Compressed Block Ack Response frame.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
void EnableAck(void)
Wait ACKTimeout for an ACK.
void DisableRts(void)
Do not send rts and wait for cts before sending data.
void EnableMultiTidBlockAck(void)
NOT IMPLEMENTED FOR NOW.
enum ns3::MacLowTransmissionParameters::@73 m_waitAck
wait ack enumerated type
void EnableRts(void)
Send a RTS, and wait CTSTimeout for a CTS.
void DisableNextData(void)
Do not attempt to send data burst after current transmission.
void DisableAck(void)
Do not wait for Ack after data transmission.