Container for the parameters describing a single experiment. More...
Public Member Functions | |
| Experiment () | |
| Default constructor. | |
| void | CreateDualModes (uint32_t fc) |
| Create m_numRates matching control and data modes. | |
| UanTxMode | CreateMode (uint32_t kass, uint32_t fc, bool upperblock, std::string name) const |
| Create a UanTxMode. | |
| void | ReceivePacket (Ptr< Socket > socket) |
| Callback to receive a packet. | |
| uint32_t | Run (uint32_t param) |
| Run a parametrized experiment. | |
Public Attributes | |
| uint32_t | m_bytesTotal |
| Total number of bytes received in a simulation run. | |
| UanModesList | m_controlModes |
| List of UanTxModes used for control channels. | |
| UanModesList | m_dataModes |
| List of UanTxModes used for data channels. | |
| bool | m_doNode |
| 1 for do max nodes simulation (invalidates AMin and AMax values). | |
| std::string | m_gnuplotfile |
| Filename for GnuPlot. | |
| uint32_t | m_maxRange |
| Maximum range between gateway and acoustic node. | |
| uint32_t | m_numNodes |
| Number of nodes (invalid for m_doNode true). | |
| uint32_t | m_numRates |
| Number of divided rates ( (NumberRates+1)TotalRate should be 0). | |
| uint32_t | m_pktSize |
| Packet size in bytes. | |
| Time | m_sifs |
| SIFS time duration. | |
| uint32_t | m_simMax |
| Maximum parameter to test. | |
| uint32_t | m_simMin |
| Minimum parameter to test. | |
| uint32_t | m_simStep |
| Amount to increment param per trial. | |
| Time | m_simTime |
| Simulation time per trial. | |
| uint32_t | m_totalRate |
| Total channel capacity. | |
Container for the parameters describing a single experiment.
An experiment samples a range of parameter values. The parameter controls the number of nodes (if m_doNode is true), or the UanMacRcGw MaxReservations attribute.
Definition at line 75 of file uan-rc-example.cc.
| anonymous_namespace{uan-rc-example.cc}::Experiment::Experiment | ( | ) |
Default constructor.
Definition at line 147 of file uan-rc-example.cc.
References m_bytesTotal, m_doNode, m_gnuplotfile, m_maxRange, m_numNodes, m_numRates, m_pktSize, m_sifs, m_simMax, m_simMin, m_simStep, m_simTime, m_totalRate, and ns3::Seconds().
| void anonymous_namespace{uan-rc-example.cc}::Experiment::CreateDualModes | ( | uint32_t | fc | ) |
Create m_numRates matching control and data modes.
| fc | Mode center frequency offset. |
Definition at line 202 of file uan-rc-example.cc.
References CreateMode(), m_controlModes, m_dataModes, and m_numRates.
| UanTxMode anonymous_namespace{uan-rc-example.cc}::Experiment::CreateMode | ( | uint32_t | kass, |
| uint32_t | fc, | ||
| bool | upperblock, | ||
| std::string | name ) const |
Create a UanTxMode.
The mode physical rate is set equal to m_totalRate. The data rate and bandwidth are set to
![\[{\rm{rate, bandwidth}} = {\rm{kass}}\frac{{{\rm{m\_totalRate}}}}{{{\rm{m\_numRates}} +
1}}\]](../../form_236.png)
The center frequency is set to
![\[{f_{center}} = {\rm{fc}} + \frac{{ \pm {\rm{m\_totalRate}} \mp {\rm{rate}}}}{2}\]](../../form_237.png)
where the upper sign is taken if upperblock is true.
| kass | Fraction of total bandwidth assigned to mode. |
| fc | Mode center frequency offset. |
| upperblock | Sign choice in setting the center frequency. |
| name | Mode name. |
Definition at line 175 of file uan-rc-example.cc.
References ns3::UanTxModeFactory::CreateMode(), m_numRates, m_totalRate, and ns3::UanTxMode::OTHER.
Referenced by CreateDualModes().
Callback to receive a packet.
| socket | The socket receiving packets. |
Definition at line 165 of file uan-rc-example.cc.
References m_bytesTotal.
Referenced by Run().
Run a parametrized experiment.
The parameter sets either the number of nodes (if m_doNode is true) or the "a" parameter, which controls the UanMacRcGw MaxReservations attribute.
| param | The parameter value. |
Definition at line 215 of file uan-rc-example.cc.
References ns3::CreateObject(), ns3::Socket::CreateSocket(), ns3::Simulator::Destroy(), ns3::NetDeviceContainer::Get(), ns3::PacketSocketHelper::Install(), ns3::UanHelper::Install(), ns3::TypeId::LookupByName(), m_bytesTotal, m_controlModes, m_dataModes, m_doNode, m_maxRange, m_numNodes, m_numRates, m_pktSize, m_sifs, m_simTime, m_totalRate, ns3::MakeCallback(), nodes, r, ReceivePacket(), ns3::Simulator::Run(), ns3::Seconds(), ns3::UanHelper::SetMac(), ns3::UanHelper::SetPhy(), ns3::PacketSocketAddress::SetPhysicalAddress(), ns3::PacketSocketAddress::SetProtocol(), ns3::PacketSocketAddress::SetSingleDevice(), sink, ns3::ApplicationContainer::Start(), ns3::ApplicationContainer::Stop(), ns3::Simulator::Stop(), and x.
| uint32_t anonymous_namespace{uan-rc-example.cc}::Experiment::m_bytesTotal |
Total number of bytes received in a simulation run.
Definition at line 92 of file uan-rc-example.cc.
Referenced by Experiment(), ReceivePacket(), and Run().
| UanModesList anonymous_namespace{uan-rc-example.cc}::Experiment::m_controlModes |
List of UanTxModes used for control channels.
Definition at line 95 of file uan-rc-example.cc.
Referenced by CreateDualModes(), and Run().
| UanModesList anonymous_namespace{uan-rc-example.cc}::Experiment::m_dataModes |
List of UanTxModes used for data channels.
Definition at line 94 of file uan-rc-example.cc.
Referenced by CreateDualModes(), and Run().
| bool anonymous_namespace{uan-rc-example.cc}::Experiment::m_doNode |
1 for do max nodes simulation (invalidates AMin and AMax values).
Definition at line 86 of file uan-rc-example.cc.
Referenced by Experiment(), and Run().
| std::string anonymous_namespace{uan-rc-example.cc}::Experiment::m_gnuplotfile |
| uint32_t anonymous_namespace{uan-rc-example.cc}::Experiment::m_maxRange |
Maximum range between gateway and acoustic node.
Definition at line 83 of file uan-rc-example.cc.
Referenced by Experiment(), and Run().
| uint32_t anonymous_namespace{uan-rc-example.cc}::Experiment::m_numNodes |
Number of nodes (invalid for m_doNode true).
Definition at line 84 of file uan-rc-example.cc.
Referenced by Experiment(), and Run().
| uint32_t anonymous_namespace{uan-rc-example.cc}::Experiment::m_numRates |
Number of divided rates ( (NumberRates+1)TotalRate should be 0).
Definition at line 81 of file uan-rc-example.cc.
Referenced by Experiment(), CreateDualModes(), CreateMode(), and Run().
| uint32_t anonymous_namespace{uan-rc-example.cc}::Experiment::m_pktSize |
Packet size in bytes.
Definition at line 85 of file uan-rc-example.cc.
Referenced by Experiment(), and Run().
| Time anonymous_namespace{uan-rc-example.cc}::Experiment::m_sifs |
SIFS time duration.
Definition at line 87 of file uan-rc-example.cc.
Referenced by Experiment(), and Run().
| uint32_t anonymous_namespace{uan-rc-example.cc}::Experiment::m_simMax |
Maximum parameter to test.
Definition at line 79 of file uan-rc-example.cc.
Referenced by Experiment().
| uint32_t anonymous_namespace{uan-rc-example.cc}::Experiment::m_simMin |
Minimum parameter to test.
Definition at line 78 of file uan-rc-example.cc.
Referenced by Experiment().
| uint32_t anonymous_namespace{uan-rc-example.cc}::Experiment::m_simStep |
Amount to increment param per trial.
Definition at line 80 of file uan-rc-example.cc.
Referenced by Experiment().
| Time anonymous_namespace{uan-rc-example.cc}::Experiment::m_simTime |
Simulation time per trial.
Definition at line 88 of file uan-rc-example.cc.
Referenced by Experiment(), and Run().
| uint32_t anonymous_namespace{uan-rc-example.cc}::Experiment::m_totalRate |
Total channel capacity.
Definition at line 82 of file uan-rc-example.cc.
Referenced by Experiment(), CreateMode(), and Run().