A Discrete-Event Network Simulator
API
dsss-parameter-set.cc
Go to the documentation of this file.
1/*
2 * Copyright (c) 2016 S├ębastien Deronne
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation;
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16 *
17 * Author: S├ębastien Deronne <sebastien.deronne@gmail.com>
18 */
19
20#include "dsss-parameter-set.h"
21
22namespace ns3
23{
24
26 : m_currentChannel(0)
27{
28}
29
32{
34}
35
36void
38{
39 m_currentChannel = currentChannel;
40}
41
42uint16_t
44{
45 return 1;
46}
47
48void
50{
51 start.WriteU8(m_currentChannel);
52}
53
54uint16_t
56{
59 return length;
60}
61
62} // namespace ns3
iterator in a Buffer instance
Definition: buffer.h:100
uint8_t ReadU8()
Definition: buffer.h:1027
uint8_t m_currentChannel
current channel number
uint16_t DeserializeInformationField(Buffer::Iterator start, uint16_t length) override
Deserialize information (i.e., the body of the IE, not including the Element ID and length octets)
void SetCurrentChannel(uint8_t currentChannel)
Set the Current Channel field in the DsssParameterSet information element.
uint16_t GetInformationFieldSize() const override
Length of serialized information (i.e., the length of the body of the IE, not including the Element I...
WifiInformationElementId ElementId() const override
Get the wifi information element ID.
void SerializeInformationField(Buffer::Iterator start) const override
Serialize information (i.e., the body of the IE, not including the Element ID and length octets)
Every class exported by the ns3 library is enclosed in the ns3 namespace.
uint8_t WifiInformationElementId
This type is used to represent an Information Element ID.
def start()
Definition: core.py:1864
#define IE_DSSS_PARAMETER_SET