A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Documentation ▼
Installation
Manual
Models
Contributing
Wiki
Development ▼
API Docs
Issue Tracker
Merge Requests
API
Loading...
Searching...
No Matches
dsss-parameter-set.cc
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2016 Sébastien Deronne
3
*
4
* SPDX-License-Identifier: GPL-2.0-only
5
*
6
* Author: Sébastien Deronne <sebastien.deronne@gmail.com>
7
*/
8
9
#include "
dsss-parameter-set.h
"
10
11
namespace
ns3
12
{
13
14
DsssParameterSet::DsssParameterSet
()
15
: m_currentChannel(0)
16
{
17
}
18
19
WifiInformationElementId
20
DsssParameterSet::ElementId
()
const
21
{
22
return
IE_DSSS_PARAMETER_SET
;
23
}
24
25
void
26
DsssParameterSet::SetCurrentChannel
(uint8_t currentChannel)
27
{
28
m_currentChannel
= currentChannel;
29
}
30
31
uint16_t
32
DsssParameterSet::GetInformationFieldSize
()
const
33
{
34
return
1;
35
}
36
37
void
38
DsssParameterSet::SerializeInformationField
(
Buffer::Iterator
start)
const
39
{
40
start.WriteU8(
m_currentChannel
);
41
}
42
43
uint16_t
44
DsssParameterSet::DeserializeInformationField
(
Buffer::Iterator
start, uint16_t length)
45
{
46
Buffer::Iterator
i = start;
47
m_currentChannel
= i.
ReadU8
();
48
return
length;
49
}
50
51
}
// namespace ns3
ns3::Buffer::Iterator
iterator in a Buffer instance
Definition
buffer.h:89
ns3::Buffer::Iterator::ReadU8
uint8_t ReadU8()
Definition
buffer.h:1016
ns3::DsssParameterSet::m_currentChannel
uint8_t m_currentChannel
current channel number
Definition
dsss-parameter-set.h:43
ns3::DsssParameterSet::DeserializeInformationField
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)
Definition
dsss-parameter-set.cc:44
ns3::DsssParameterSet::SetCurrentChannel
void SetCurrentChannel(uint8_t currentChannel)
Set the Current Channel field in the DsssParameterSet information element.
Definition
dsss-parameter-set.cc:26
ns3::DsssParameterSet::DsssParameterSet
DsssParameterSet()
Definition
dsss-parameter-set.cc:14
ns3::DsssParameterSet::GetInformationFieldSize
uint16_t GetInformationFieldSize() const override
Length of serialized information (i.e., the length of the body of the IE, not including the Element I...
Definition
dsss-parameter-set.cc:32
ns3::DsssParameterSet::ElementId
WifiInformationElementId ElementId() const override
Get the wifi information element ID.
Definition
dsss-parameter-set.cc:20
ns3::DsssParameterSet::SerializeInformationField
void SerializeInformationField(Buffer::Iterator start) const override
Serialize information (i.e., the body of the IE, not including the Element ID and length octets)
Definition
dsss-parameter-set.cc:38
dsss-parameter-set.h
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
ns3::WifiInformationElementId
uint8_t WifiInformationElementId
This type is used to represent an Information Element ID.
Definition
wifi-information-element.h:34
IE_DSSS_PARAMETER_SET
#define IE_DSSS_PARAMETER_SET
Definition
wifi-information-element.h:44
src
wifi
model
non-ht
dsss-parameter-set.cc
Generated on Fri Nov 8 2024 13:59:07 for ns-3 by
1.11.0