12#ifndef WSFCOMMNETWORKADHOC_HPP
13#define WSFCOMMNETWORKADHOC_HPP
15#include "wsf_export.h"
44 using NamedRateMap = std::unordered_map<NamedComm, WsfRandomVariable>;
71 bool RemoveNamedRate(
const NamedComm& aComm);
72 bool RemoveAddressRate(
const Address& aAddress);
85 bool ProcessNamedRate(UtInput& aInput);
86 bool ProcessAddressRate(UtInput& aInput);
107 std::numeric_limits<double>::max(),
115 NamedRateMap mNamedRate{};
116 AddressRateMap mAddressRate{};
119 std::shared_ptr<int> mEvents{std::make_shared<int>(0)};
127 void*
Create(
const UtScriptContext& aInstance)
override;
128 void Destroy(
void* aNetworkPtr)
override;
aObjectPtr Update(simTime)
#define WSF_EXPORT
Definition WsfXIO_Export.hpp:35
Definition WsfRandomVariable.hpp:33
@ cCONSTANT
The random values will always have a constant value.
Definition WsfRandomVariable.hpp:38
@ cPOSITIVE
Value must be greater than zero.
Definition WsfRandomVariable.hpp:49
The main controller for a simulation.
Definition WsfSimulation.hpp:109
Definition WsfCommAddress.hpp:57
NetworkAdHoc & operator=(const NetworkAdHoc &aRhs)
Definition WsfCommNetworkAdHoc.cpp:45
NetworkAdHoc * Clone() const override
Definition WsfCommNetworkAdHoc.cpp:60
~NetworkAdHoc() override=default
std::unordered_map< NamedComm, WsfRandomVariable > NamedRateMap
Definition WsfCommNetworkAdHoc.hpp:44
std::unordered_map< Address, WsfRandomVariable > AddressRateMap
Definition WsfCommNetworkAdHoc.hpp:45
const char * GetScriptClassName() const override
Definition WsfCommNetworkAdHoc.hpp:55
bool ProcessInput(UtInput &aInput) override
Definition WsfCommNetworkAdHoc.cpp:117
UT_DECLARE_SCRIPT_METHOD(RemoveMemberUpdateRate)
void Destroy(void *aNetworkPtr) override
Definition WsfCommNetworkAdHoc.cpp:453
UT_DECLARE_SCRIPT_METHOD(ChangeUpdateRate)
void * Create(const UtScriptContext &aInstance) override
Definition WsfCommNetworkAdHoc.cpp:447
ScriptNetworkAdHocClass(const std::string &aClassName, UtScriptTypes *aTypesPtr)
Definition WsfCommNetworkAdHoc.cpp:435
UT_DECLARE_SCRIPT_METHOD(AddMemberUpdateRate)
ScriptNetworkGenericClass(const std::string &aClassName, UtScriptTypes *aTypesPtr)
Definition WsfCommNetworkGeneric.cpp:131
Definition WsfComm.cpp:34
Function definitions for those who need run-time access to the version.
Definition WsfComm.cpp:32