author | Vedran Miletić <rivanvx@gmail.com> |
Tue, 02 Aug 2011 17:42:33 -0400 | |
changeset 7385 | 10beb0e53130 |
parent 6882 | 20221fbd189e |
child 7386 | 2310ed220a61 |
permissions | -rw-r--r-- |
7385
10beb0e53130
standardize emacs c++ mode comments
Vedran Miletić <rivanvx@gmail.com>
parents:
6882
diff
changeset
|
1 |
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ |
4793 | 2 |
/* |
3 |
* Copyright (c) 2008,2009 IITP RAS |
|
4 |
* |
|
5 |
* This program is free software; you can redistribute it and/or modify |
|
4812
adcb26652e1d
Coding style changes: indentation, spaces.
Andrey Mazo <mazo@iitp.ru>
parents:
4811
diff
changeset
|
6 |
* it under the terms of the GNU General Public License version 2 as |
4793 | 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 |
* |
|
4811
080b8f23fa4a
Added license information to some files.
Andrey Mazo <mazo@iitp.ru>
parents:
4810
diff
changeset
|
18 |
* Author: Kirill Andreev <andreev@iitp.ru> |
4793 | 19 |
*/ |
20 |
||
21 |
#ifndef RANN_INFORMATION_ELEMENT_H |
|
22 |
#define RANN_INFORMATION_ELEMENT_H |
|
23 |
||
4812
adcb26652e1d
Coding style changes: indentation, spaces.
Andrey Mazo <mazo@iitp.ru>
parents:
4811
diff
changeset
|
24 |
#include "ns3/mac48-address.h" |
6378
57485ed01268
Bug 881: Extract WifiInformationElement(Vector) core to wifi module
Dean Armstrong <deanarm@gmail.com>
parents:
5162
diff
changeset
|
25 |
#include "ns3/mesh-information-element-vector.h" |
4793 | 26 |
|
5132
aee541a30256
Restored newline at namespace
Kirill Andreev <andreev@iitp.ru>
parents:
5129
diff
changeset
|
27 |
namespace ns3 { |
aee541a30256
Restored newline at namespace
Kirill Andreev <andreev@iitp.ru>
parents:
5129
diff
changeset
|
28 |
namespace dot11s { |
4807
a1f43e372f9f
1. HIDE_UNDOC_CLASSES is temporary set to NO in doxygen.conf
Pavel Boyko <boyko@iitp.ru>
parents:
4793
diff
changeset
|
29 |
/** |
4851
44a5075d854e
11s information elements commented as "\ingroup dot11s" for doxygen
Pavel Boyko <boyko@iitp.ru>
parents:
4850
diff
changeset
|
30 |
* \ingroup dot11s |
4850
c3ee1deaa07a
Code refactoring: fixed names, added references to draft
Kirill Andreev <andreev@iitp.ru>
parents:
4841
diff
changeset
|
31 |
* \brief See 7.3.2.95 of 802.11s draft 2.07 |
4807
a1f43e372f9f
1. HIDE_UNDOC_CLASSES is temporary set to NO in doxygen.conf
Pavel Boyko <boyko@iitp.ru>
parents:
4793
diff
changeset
|
32 |
*/ |
4902
754465c7e6a8
Unit test for RANN information element
Pavel Boyko <boyko@iitp.ru>
parents:
4899
diff
changeset
|
33 |
class IeRann : public WifiInformationElement |
4793 | 34 |
{ |
4812
adcb26652e1d
Coding style changes: indentation, spaces.
Andrey Mazo <mazo@iitp.ru>
parents:
4811
diff
changeset
|
35 |
public: |
4876
d78f1b978dac
Rstructured file names: IeDot11s* no is Ie, because it is in namespace dot11s
Kirill Andreev <andreev@iitp.ru>
parents:
4872
diff
changeset
|
36 |
IeRann (); |
d78f1b978dac
Rstructured file names: IeDot11s* no is Ie, because it is in namespace dot11s
Kirill Andreev <andreev@iitp.ru>
parents:
4872
diff
changeset
|
37 |
virtual ~IeRann (); |
4852
123dc54d734e
Coding style changes: indentation (some fixes), spaces in operators, function
Andrey Mazo <mazo@iitp.ru>
parents:
4851
diff
changeset
|
38 |
void SetFlags (uint8_t flags); |
123dc54d734e
Coding style changes: indentation (some fixes), spaces in operators, function
Andrey Mazo <mazo@iitp.ru>
parents:
4851
diff
changeset
|
39 |
void SetHopcount (uint8_t hopcount); |
123dc54d734e
Coding style changes: indentation (some fixes), spaces in operators, function
Andrey Mazo <mazo@iitp.ru>
parents:
4851
diff
changeset
|
40 |
void SetTTL (uint8_t ttl); |
123dc54d734e
Coding style changes: indentation (some fixes), spaces in operators, function
Andrey Mazo <mazo@iitp.ru>
parents:
4851
diff
changeset
|
41 |
void SetOriginatorAddress (Mac48Address originator_address); |
123dc54d734e
Coding style changes: indentation (some fixes), spaces in operators, function
Andrey Mazo <mazo@iitp.ru>
parents:
4851
diff
changeset
|
42 |
void SetDestSeqNumber (uint32_t dest_seq_number); |
123dc54d734e
Coding style changes: indentation (some fixes), spaces in operators, function
Andrey Mazo <mazo@iitp.ru>
parents:
4851
diff
changeset
|
43 |
void SetMetric (uint32_t metric); |
123dc54d734e
Coding style changes: indentation (some fixes), spaces in operators, function
Andrey Mazo <mazo@iitp.ru>
parents:
4851
diff
changeset
|
44 |
uint8_t GetFlags (); |
123dc54d734e
Coding style changes: indentation (some fixes), spaces in operators, function
Andrey Mazo <mazo@iitp.ru>
parents:
4851
diff
changeset
|
45 |
uint8_t GetHopcount (); |
4902
754465c7e6a8
Unit test for RANN information element
Pavel Boyko <boyko@iitp.ru>
parents:
4899
diff
changeset
|
46 |
uint8_t GetTtl (); |
4852
123dc54d734e
Coding style changes: indentation (some fixes), spaces in operators, function
Andrey Mazo <mazo@iitp.ru>
parents:
4851
diff
changeset
|
47 |
Mac48Address GetOriginatorAddress (); |
123dc54d734e
Coding style changes: indentation (some fixes), spaces in operators, function
Andrey Mazo <mazo@iitp.ru>
parents:
4851
diff
changeset
|
48 |
uint32_t GetDestSeqNumber (); |
123dc54d734e
Coding style changes: indentation (some fixes), spaces in operators, function
Andrey Mazo <mazo@iitp.ru>
parents:
4851
diff
changeset
|
49 |
uint32_t GetMetric (); |
123dc54d734e
Coding style changes: indentation (some fixes), spaces in operators, function
Andrey Mazo <mazo@iitp.ru>
parents:
4851
diff
changeset
|
50 |
void DecrementTtl (); |
123dc54d734e
Coding style changes: indentation (some fixes), spaces in operators, function
Andrey Mazo <mazo@iitp.ru>
parents:
4851
diff
changeset
|
51 |
void IncrementMetric (uint32_t metric); |
5159
7e0731625f67
Removed inheritance from Header in WifiInformationElement. TODO: restore unit
Kirill Andreev <andreev@iitp.ru>
parents:
5132
diff
changeset
|
52 |
/** |
7e0731625f67
Removed inheritance from Header in WifiInformationElement. TODO: restore unit
Kirill Andreev <andreev@iitp.ru>
parents:
5132
diff
changeset
|
53 |
* \name Inherited from WifiInformationElement |
7e0731625f67
Removed inheritance from Header in WifiInformationElement. TODO: restore unit
Kirill Andreev <andreev@iitp.ru>
parents:
5132
diff
changeset
|
54 |
* \{ |
7e0731625f67
Removed inheritance from Header in WifiInformationElement. TODO: restore unit
Kirill Andreev <andreev@iitp.ru>
parents:
5132
diff
changeset
|
55 |
*/ |
6379
f1031f074dbd
Bug 881: Change WifiElementId to WifiInformationElementId
Dean Armstrong <deanarm@gmail.com>
parents:
6378
diff
changeset
|
56 |
virtual WifiInformationElementId ElementId () const; |
6382
9e5768e48981
Bug 881: WifiInformationElement method renaming
Dean Armstrong <deanarm@gmail.com>
parents:
6379
diff
changeset
|
57 |
virtual void SerializeInformationField (Buffer::Iterator i) const; |
9e5768e48981
Bug 881: WifiInformationElement method renaming
Dean Armstrong <deanarm@gmail.com>
parents:
6379
diff
changeset
|
58 |
virtual uint8_t DeserializeInformationField (Buffer::Iterator start, uint8_t length); |
9e5768e48981
Bug 881: WifiInformationElement method renaming
Dean Armstrong <deanarm@gmail.com>
parents:
6379
diff
changeset
|
59 |
virtual uint8_t GetInformationFieldSize () const; |
5162
35963e5411c0
PrintInformation replaced with Prin in information elements, added operator
Kirill Andreev <andreev@iitp.ru>
parents:
5161
diff
changeset
|
60 |
virtual void Print (std::ostream &os) const; |
5159
7e0731625f67
Removed inheritance from Header in WifiInformationElement. TODO: restore unit
Kirill Andreev <andreev@iitp.ru>
parents:
5132
diff
changeset
|
61 |
///\} |
7e0731625f67
Removed inheritance from Header in WifiInformationElement. TODO: restore unit
Kirill Andreev <andreev@iitp.ru>
parents:
5132
diff
changeset
|
62 |
private: |
4812
adcb26652e1d
Coding style changes: indentation, spaces.
Andrey Mazo <mazo@iitp.ru>
parents:
4811
diff
changeset
|
63 |
uint8_t m_flags; |
adcb26652e1d
Coding style changes: indentation, spaces.
Andrey Mazo <mazo@iitp.ru>
parents:
4811
diff
changeset
|
64 |
uint8_t m_hopcount; |
adcb26652e1d
Coding style changes: indentation, spaces.
Andrey Mazo <mazo@iitp.ru>
parents:
4811
diff
changeset
|
65 |
uint8_t m_ttl; |
adcb26652e1d
Coding style changes: indentation, spaces.
Andrey Mazo <mazo@iitp.ru>
parents:
4811
diff
changeset
|
66 |
Mac48Address m_originatorAddress; |
adcb26652e1d
Coding style changes: indentation, spaces.
Andrey Mazo <mazo@iitp.ru>
parents:
4811
diff
changeset
|
67 |
uint32_t m_destSeqNumber; |
adcb26652e1d
Coding style changes: indentation, spaces.
Andrey Mazo <mazo@iitp.ru>
parents:
4811
diff
changeset
|
68 |
uint32_t m_metric; |
5129 | 69 |
|
4902
754465c7e6a8
Unit test for RANN information element
Pavel Boyko <boyko@iitp.ru>
parents:
4899
diff
changeset
|
70 |
friend bool operator== (const IeRann & a, const IeRann & b); |
4793 | 71 |
}; |
4902
754465c7e6a8
Unit test for RANN information element
Pavel Boyko <boyko@iitp.ru>
parents:
4899
diff
changeset
|
72 |
|
754465c7e6a8
Unit test for RANN information element
Pavel Boyko <boyko@iitp.ru>
parents:
4899
diff
changeset
|
73 |
bool operator== (const IeRann & a, const IeRann & b); |
5162
35963e5411c0
PrintInformation replaced with Prin in information elements, added operator
Kirill Andreev <andreev@iitp.ru>
parents:
5161
diff
changeset
|
74 |
std::ostream &operator << (std::ostream &os, const IeRann &rann); |
4872 | 75 |
} // namespace dot11s |
76 |
} //namespace ns3 |
|
4902
754465c7e6a8
Unit test for RANN information element
Pavel Boyko <boyko@iitp.ru>
parents:
4899
diff
changeset
|
77 |
|
4793 | 78 |
#endif |