A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
send-params.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2007,2008 INRIA
3 *
4 * SPDX-License-Identifier: GPL-2.0-only
5 *
6 * Author: Jahanzeb Farooq <jahanzeb.farooq@sophia.inria.fr>
7 */
8
9#ifndef SEND_PARAMS_H
10#define SEND_PARAMS_H
11
12#include <stdint.h>
13
14namespace ns3
15{
16
17class WimaxPhy;
18
19/**
20 * \ingroup wimax
21 * \brief The SendParams class defines the parameters with which Send() function of
22 * a particular PHY is called. The sole purpose of this class is to allow
23 * defining the pure virtual Send() function in the PHY base-class (WimaxPhy).
24 * This class shall be sub-classed every time a new PHY is integrated (i.e.,
25 * a new sub-class of WimaxPhy is created) which requires different or
26 * additional parameters to call its Send() function. For example as it is
27 * seen here, it has been sub-classed for the OFDM PHY layer since its Send()
28 * function requires two additional parameters.
29 */
31{
32 public:
33 SendParams();
34 virtual ~SendParams();
35
36 private:
37};
38
39} // namespace ns3
40
41#endif /* SEND_PARAMS_H */
42
43#ifndef OFDM_SEND_PARAMS_H
44#define OFDM_SEND_PARAMS_H
45
46#include "ns3/packet-burst.h"
47
48#include <stdint.h>
49
50namespace ns3
51{
52
53/**
54 * OfdmSendParams class
55 */
57{
58 public:
59 /**
60 * Constructor
61 *
62 * \param burst packet burst object
63 * \param modulationType modulation type
64 * \param direction the direction
65 */
66 OfdmSendParams(Ptr<PacketBurst> burst, uint8_t modulationType, uint8_t direction);
67 ~OfdmSendParams() override;
68
69 /**
70 * \return the packet burst
71 */
73 {
74 return m_burst;
75 }
76
77 /**
78 * \return the modulation type
79 */
80 uint8_t GetModulationType() const
81 {
82 return m_modulationType;
83 }
84
85 /**
86 * \return the direction
87 */
88 uint8_t GetDirection() const
89 {
90 return m_direction;
91 }
92
93 private:
94 Ptr<PacketBurst> m_burst; ///< packet burst
95 uint8_t m_modulationType; ///< modulation type
96 uint8_t m_direction; ///< direction
97};
98
99} // namespace ns3
100
101#endif /* OFDM_SEND_PARAMS_H */
OfdmSendParams class.
Definition send-params.h:57
Ptr< PacketBurst > GetBurst() const
Definition send-params.h:72
uint8_t GetModulationType() const
Definition send-params.h:80
Ptr< PacketBurst > m_burst
packet burst
Definition send-params.h:94
~OfdmSendParams() override
uint8_t m_modulationType
modulation type
Definition send-params.h:95
uint8_t GetDirection() const
Definition send-params.h:88
uint8_t m_direction
direction
Definition send-params.h:96
OfdmSendParams(Ptr< PacketBurst > burst, uint8_t modulationType, uint8_t direction)
Constructor.
Smart pointer class similar to boost::intrusive_ptr.
The SendParams class defines the parameters with which Send() function of a particular PHY is called.
Definition send-params.h:31
virtual ~SendParams()
Every class exported by the ns3 library is enclosed in the ns3 namespace.