src/wifi/model/capability-information.h
author Junling Bu <linlinjavaer@gmail.com>
Tue, 03 Dec 2013 11:25:59 -0800
changeset 10459 f2e90c12a44f
parent 7385 10beb0e53130
child 10483 e3a02ed14587
permissions -rw-r--r--
base implementation of the IEEE 802.11p standard
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
7385
10beb0e53130 standardize emacs c++ mode comments
Vedran Miletić <rivanvx@gmail.com>
parents: 7141
diff changeset
     1
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
1937
996383a87ae3 add new code to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
     2
/*
996383a87ae3 add new code to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
     3
 * Copyright (c) 2006 INRIA
996383a87ae3 add new code to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
     4
 *
996383a87ae3 add new code to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
     5
 * This program is free software; you can redistribute it and/or modify
7141
072fb225b714 run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents: 7139
diff changeset
     6
 * it under the terms of the GNU General Public License version 2 as
1937
996383a87ae3 add new code to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
     7
 * published by the Free Software Foundation;
996383a87ae3 add new code to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
     8
 *
996383a87ae3 add new code to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
     9
 * This program is distributed in the hope that it will be useful,
996383a87ae3 add new code to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    10
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
996383a87ae3 add new code to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    11
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
996383a87ae3 add new code to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    12
 * GNU General Public License for more details.
996383a87ae3 add new code to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    13
 *
996383a87ae3 add new code to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    14
 * You should have received a copy of the GNU General Public License
996383a87ae3 add new code to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    15
 * along with this program; if not, write to the Free Software
996383a87ae3 add new code to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    16
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
996383a87ae3 add new code to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    17
 *
996383a87ae3 add new code to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    18
 * Author: Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
996383a87ae3 add new code to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    19
 */
996383a87ae3 add new code to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    20
#ifndef CAPABILITY_INFORMATION_H
996383a87ae3 add new code to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    21
#define CAPABILITY_INFORMATION_H
996383a87ae3 add new code to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    22
996383a87ae3 add new code to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    23
#include <stdint.h>
1939
40af0232df83 add management frame implementations
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1937
diff changeset
    24
#include "ns3/buffer.h"
1937
996383a87ae3 add new code to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    25
996383a87ae3 add new code to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    26
namespace ns3 {
996383a87ae3 add new code to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    27
7139
79dd02ed46ec doxygen wifi module grouping all wifi classes
Nicola Baldo <nbaldo@cttc.es>
parents: 6852
diff changeset
    28
/**
79dd02ed46ec doxygen wifi module grouping all wifi classes
Nicola Baldo <nbaldo@cttc.es>
parents: 6852
diff changeset
    29
 * \ingroup wifi
7141
072fb225b714 run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents: 7139
diff changeset
    30
 *
072fb225b714 run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents: 7139
diff changeset
    31
 *
7139
79dd02ed46ec doxygen wifi module grouping all wifi classes
Nicola Baldo <nbaldo@cttc.es>
parents: 6852
diff changeset
    32
 */
7141
072fb225b714 run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents: 7139
diff changeset
    33
class CapabilityInformation
1939
40af0232df83 add management frame implementations
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1937
diff changeset
    34
{
1937
996383a87ae3 add new code to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    35
public:
996383a87ae3 add new code to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    36
  CapabilityInformation ();
996383a87ae3 add new code to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    37
1939
40af0232df83 add management frame implementations
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1937
diff changeset
    38
  void SetEss (void);
40af0232df83 add management frame implementations
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1937
diff changeset
    39
  void SetIbss (void);
40af0232df83 add management frame implementations
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1937
diff changeset
    40
40af0232df83 add management frame implementations
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1937
diff changeset
    41
  bool IsEss (void) const;
40af0232df83 add management frame implementations
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1937
diff changeset
    42
  bool IsIbss (void) const;
40af0232df83 add management frame implementations
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1937
diff changeset
    43
40af0232df83 add management frame implementations
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1937
diff changeset
    44
  uint32_t GetSerializedSize (void) const;
40af0232df83 add management frame implementations
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1937
diff changeset
    45
  Buffer::Iterator Serialize (Buffer::Iterator start) const;
40af0232df83 add management frame implementations
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1937
diff changeset
    46
  Buffer::Iterator Deserialize (Buffer::Iterator start);
40af0232df83 add management frame implementations
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1937
diff changeset
    47
private:
40af0232df83 add management frame implementations
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1937
diff changeset
    48
  bool Is (uint8_t n) const;
40af0232df83 add management frame implementations
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1937
diff changeset
    49
  void Set (uint8_t n);
40af0232df83 add management frame implementations
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1937
diff changeset
    50
  void Clear (uint8_t n);
40af0232df83 add management frame implementations
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1937
diff changeset
    51
  uint16_t m_capability;
1937
996383a87ae3 add new code to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    52
};
996383a87ae3 add new code to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    53
996383a87ae3 add new code to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    54
} // namespace ns3
996383a87ae3 add new code to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    55
996383a87ae3 add new code to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    56
#endif /* CAPABILITY_INFORMATION_H */