INET Framework for OMNeT++/OMNEST
|
Namespaces | |
filters | |
Functions | |
std::string | ltostr (long i) |
Converts an integer to string. More... | |
std::string | dtostr (double d) |
Converts a double to string. More... | |
double | atod (const char *s) |
Converts string to double. More... | |
unsigned long | atoul (const char *s) |
Converts string to unsigned long. More... | |
std::string | stripnonalnum (const char *s) |
Removes non-alphanumeric characters from the given string. More... | |
std::string | stringf (const char *fmt,...) |
Accepts a printf-like argument list, and returns the result in a string. More... | |
std::string | vstringf (const char *fmt, va_list &args) |
Accepts a vprintf-like argument list, and returns the result in a string. More... | |
cObject * | createOneIfClassIsKnown (const char *className, const char *defaultNamespace=getSimulation() ->getContext() ->getClassName()) |
Like cObjectFactory::createOneIfClassIsKnown(), except it starts searching for the class in the given namespace. More... | |
cObject * | createOne (const char *className, const char *defaultNamespace=getSimulation() ->getContext() ->getClassName()) |
Like cObjectFactory::createOne(), except it starts searching for the class in the given namespace. More... | |
int | roundUp (int numToRound, int multiple) |
Rounding up to the nearest multiple of a number. More... | |
template<typename T > | |
T * | dupPacketAndControlInfo (T *packet) |
Duplicate a packet together with its control info. More... | |
cNEDValue | nedf_hasVisualizer (cComponent *context, cNEDValue argv[], int argc) |
Define_NED_Function2 (nedf_hasVisualizer,"bool hasVisualizer()","","Returns true if the visualizer feature is available") | |
cNEDValue | nedf_hasModule (cComponent *context, cNEDValue argv[], int argc) |
Define_NED_Function2 (nedf_hasModule,"bool hasModule(string nedTypeName)","string","Returns true if the given NED type exists") | |
cNEDValue | nedf_haveClass (cComponent *context, cNEDValue argv[], int argc) |
Define_NED_Function2 (nedf_haveClass,"bool haveClass(string className)","string","Returns true if the given C++ class exists") | |
cNEDValue | nedf_moduleListByPath (cComponent *context, cNEDValue argv[], int argc) |
Define_NED_Function2 (nedf_moduleListByPath,"string moduleListByPath(string modulePath,...)","string","Returns a space-separated list of the modules at the given path(s). ""See cTopology::extractByModulePath().") | |
cNEDValue | nedf_moduleListByNedType (cComponent *context, cNEDValue argv[], int argc) |
Define_NED_Function2 (nedf_moduleListByNedType,"string moduleListByNedType(string nedTypeName,...)","string","Returns a space-separated list of the modules with the given NED type(s). ""See cTopology::extractByNedTypeName().") | |
cNEDValue | nedf_select (cComponent *context, cNEDValue argv[], int argc) |
Define_NED_Function2 (nedf_select,"any select(int index, ...)","misc","Returns the <index>th item from the rest of the argument list; numbering starts from 0.") | |
cNEDValue | nedf_absPath (cComponent *context, cNEDValue argv[], int argc) |
Define_NED_Function2 (nedf_absPath,"string absPath(string modulePath)","string","Returns absolute path of given module") | |
cNEDValue | nedf_firstAvailableOrEmpty (cComponent *context, cNEDValue argv[], int argc) |
Define_NED_Function2 (nedf_firstAvailableOrEmpty,"string firstAvailableOrEmpty(...)","misc","Accepts any number of strings, interprets them as NED type names ""(qualified or unqualified), and returns the first one that exists and ""its C++ implementation class is also available. Returns empty string if ""none of the types are available.") | |
cNEDValue | nedf_nanToZero (cComponent *context, cNEDValue argv[], int argc) |
Define_NED_Function2 (nedf_nanToZero,"quantity nanToZero(quantity x)","math","Returns the argument if it is not NaN, otherwise returns 0.") | |
INET_API double inet::utils::atod | ( | const char * | s | ) |
Converts string to double.
Referenced by inet::REDDropper::initialize(), IndexedImageFigure::parse(), IndicatorLabelFigure::parse(), IndicatorTextFigure::parse(), ProgressMeterFigure::parse(), LinearGaugeFigure::parse(), ThermometerFigure::parse(), CounterFigure::parse(), and GaugeFigure::parse().
INET_API unsigned long inet::utils::atoul | ( | const char * | s | ) |
Converts string to unsigned long.
Referenced by inet::DelegateSignalConfigurator::configureDisplaySignal(), inet::IPv6RoutingTable::configureInterfaceFromXML(), inet::FigureRecorder::init(), and inet::WRRScheduler::initialize().
INET_API cObject * inet::utils::createOne | ( | const char * | className, |
const char * | defaultNamespace | ||
) |
Like cObjectFactory::createOne(), except it starts searching for the class in the given namespace.
Referenced by inet::sctp::SCTPAssociation::cloneAssociation(), inet::tcp::TCPConnection::cloneListeningConnection(), inet::tcp::TCP_NSC::handleIpInputMessage(), inet::TCPSrvHostApp::handleMessage(), inet::sctp::SCTPAssociation::initAssociation(), inet::tcp::TCPConnection::initConnection(), inet::LifecycleController::processCommand(), and roundUp().
INET_API cObject * inet::utils::createOneIfClassIsKnown | ( | const char * | className, |
const char * | defaultNamespace | ||
) |
Like cObjectFactory::createOneIfClassIsKnown(), except it starts searching for the class in the given namespace.
Referenced by createOne(), and roundUp().
inet::utils::Define_NED_Function2 | ( | nedf_hasVisualizer | , |
"bool hasVisualizer()" | , | ||
"" | , | ||
"Returns true if the visualizer feature is available" | |||
) |
inet::utils::Define_NED_Function2 | ( | nedf_hasModule | , |
"bool hasModule(string nedTypeName)" | , | ||
"string" | , | ||
"Returns true if the given NED type exists" | |||
) |
inet::utils::Define_NED_Function2 | ( | nedf_haveClass | , |
"bool haveClass(string className)" | , | ||
"string" | , | ||
"Returns true if the given C++ class exists" | |||
) |
inet::utils::Define_NED_Function2 | ( | nedf_moduleListByPath | , |
"string moduleListByPath(string modulePath,...)" | , | ||
"string" | , | ||
"Returns a space-separated list of the modules at the given path(s). ""See cTopology::extractByModulePath()." | |||
) |
inet::utils::Define_NED_Function2 | ( | nedf_moduleListByNedType | , |
"string moduleListByNedType(string nedTypeName,...)" | , | ||
"string" | , | ||
"Returns a space-separated list of the modules with the given NED type(s). ""See cTopology::extractByNedTypeName()." | |||
) |
inet::utils::Define_NED_Function2 | ( | nedf_select | , |
"any select(int index, ...)" | , | ||
"misc" | , | ||
"Returns the <index>th item from the rest of the argument list; numbering starts from 0." | |||
) |
inet::utils::Define_NED_Function2 | ( | nedf_absPath | , |
"string absPath(string modulePath)" | , | ||
"string" | , | ||
"Returns absolute path of given module" | |||
) |
inet::utils::Define_NED_Function2 | ( | nedf_firstAvailableOrEmpty | , |
"string firstAvailableOrEmpty(...)" | , | ||
"misc" | , | ||
"Accepts any number of | strings, | ||
interprets them as NED type names"" | qualified or unqualified, | ||
and returns the first one that exists and""its C++implementation class is also available.Returns empty string if""none of the types are available." | |||
) |
inet::utils::Define_NED_Function2 | ( | nedf_nanToZero | , |
"quantity nanToZero(quantity x)" | , | ||
"math" | , | ||
"Returns the argument if it is not | NaN, | ||
otherwise returns 0." | |||
) |
INET_API std::string inet::utils::dtostr | ( | double | d | ) |
Duplicate a packet together with its control info.
(cPacket's dup() ignores the control info, it will be nullptr in the returned copy).
Referenced by inet::OrdinalBasedDuplicator::handleMessage(), inet::ieee80211::Tx::radioTransmissionFinished(), and inet::ieee80211::Tx::transmitFrame().
INET_API std::string inet::utils::ltostr | ( | long | i | ) |
Converts an integer to string.
Referenced by inet::DiffservUtil::colorToString(), and inet::DiffservUtil::dscpToString().
cNEDValue inet::utils::nedf_firstAvailableOrEmpty | ( | cComponent * | context, |
cNEDValue | argv[], | ||
int | argc | ||
) |
cNEDValue inet::utils::nedf_moduleListByNedType | ( | cComponent * | context, |
cNEDValue | argv[], | ||
int | argc | ||
) |
|
inline |
Rounding up to the nearest multiple of a number.
Referenced by inet::IPv4Datagram::calculateHeaderByteLength(), and inet::GPSR::setGpsrOptionOnNetworkDatagram().
INET_API std::string inet::utils::stringf | ( | const char * | fmt, |
... | |||
) |
Accepts a printf-like argument list, and returns the result in a string.
The limit is 1024 chars.
Referenced by inet::IPv4RoutingTable::printMulticastRoutingTable(), and inet::IPv4RoutingTable::printRoutingTable().
INET_API std::string inet::utils::stripnonalnum | ( | const char * | s | ) |
Removes non-alphanumeric characters from the given string.
Referenced by inet::EtherEncap::initialize(), inet::ieee80211::Ieee80211AgentSTA::initialize(), inet::ieee80211::Ieee80211MgmtSTA::initialize(), inet::InterfaceEntry::InterfaceEntry(), and inet::ieee80211::Ieee80211Mac::isInterfaceRegistered().
INET_API std::string inet::utils::vstringf | ( | const char * | fmt, |
va_list & | args | ||
) |