A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
dsss-parameter-set.h
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#ifndef DSSS_PARAMETER_SET_H
10#define DSSS_PARAMETER_SET_H
11
12#include "ns3/wifi-information-element.h"
13
14namespace ns3
15{
16
17/**
18 * \brief The DSSS Parameter Set
19 * \ingroup wifi
20 *
21 * This class knows how to serialise and deserialise the DSSS Parameter Set.
22 */
24{
25 public:
27
28 // Implementations of pure virtual methods of WifiInformationElement
29 WifiInformationElementId ElementId() const override;
30
31 /**
32 * Set the Current Channel field in the DsssParameterSet information element.
33 *
34 * \param currentChannel the CurrentChannel field in the DsssParameterSet information element
35 */
36 void SetCurrentChannel(uint8_t currentChannel);
37
38 private:
39 uint16_t GetInformationFieldSize() const override;
40 void SerializeInformationField(Buffer::Iterator start) const override;
41 uint16_t DeserializeInformationField(Buffer::Iterator start, uint16_t length) override;
42
43 uint8_t m_currentChannel; ///< current channel number
44};
45
46} // namespace ns3
47
48#endif /* DSSS_PARAMETER_SET_H */
iterator in a Buffer instance
Definition buffer.h:89
The DSSS Parameter Set.
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)
Information element, as defined in 802.11-2007 standard.
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.