A Discrete-Event Network Simulator
API
wifi-preamble.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,2007 INRIA
4  *
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
7  * published by the Free Software Foundation;
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program; if not, write to the Free Software
16  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17  *
18  * Author: Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
19  */
20 
21 #ifndef WIFI_PREAMBLE_H
22 #define WIFI_PREAMBLE_H
23 
24 #include "ns3/fatal-error.h"
25 
26 namespace ns3 {
27 
33 {
44 };
45 
53 inline std::ostream& operator<< (std::ostream& os, WifiPreamble preamble)
54 {
55  switch (preamble)
56  {
57  case WIFI_PREAMBLE_LONG:
58  return (os << "LONG");
60  return (os << "SHORT");
62  return (os << "HT_MF");
64  return (os << "HT_GF");
66  return (os << "VHT_SU");
68  return (os << "VHT_MU");
70  return (os << "HE_SU");
72  return (os << "HE_ER_SU");
74  return (os << "HE_MU");
76  return (os << "HE_TB");
77  default:
78  NS_FATAL_ERROR ("Invalid preamble");
79  return (os << "INVALID");
80  }
81 }
82 
83 } //namespace ns3
84 
85 #endif /* WIFI_PREAMBLE_H */
#define NS_FATAL_ERROR(msg)
Report a fatal error with a message and terminate.
Definition: fatal-error.h:165
WifiPreamble
The type of preamble to be used by an IEEE 802.11 transmission.
Definition: wifi-preamble.h:32
std::ostream & operator<<(std::ostream &os, const Angles &a)
print a struct Angles to output
Definition: angles.cc:42
Every class exported by the ns3 library is enclosed in the ns3 namespace.