|
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... | |
| std::string | hex (uint16_t l) |
| std::string | hex (int16_t l) |
| std::string | hex (uint32_t l) |
| std::string | hex (int32_t l) |
| std::string | hex (uint64_t l) |
| std::string | hex (int64_t l) |
| long | hex (const char *s) |
| unsigned long | uhex (const char *s) |
| 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... | |
| bool | fileExists (const char *pathname) |
| void | splitFileName (const char *pathname, std::string &dir, std::string &fnameonly) |
| void | makePath (const char *pathname) |
| void | makePathForFile (const char *filename) |
| 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_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.") | |
| Define_NED_Function2 (nedf_intWithUnit, "intquantity intWithUnit(any x)", "conversion", "Converts x to an integer (C++ long), and returns the result. A boolean argument becomes 0 or 1; a double is converted using floor(); a string or an XML argument causes an error.") | |
| cNedValue | nedf_xmlattr (cComponent *contextComponent, cNedValue argv[], int argc) |
| Define_NED_Function2 (nedf_xmlattr, "string xmlattr(xml xmlNode, string attributeName, string defaultValue?)", "xml", "Returns the value of the specified XML attribute of xmlNode. " "It returns the defaultValue (or throws an error) if the attribute does not exists.") cNEDValue nedf_findArrayObjectElement(cComponent *context | |
| for (int index=0;index< array->size();index++) | |
| return | cNEDValue ((cObject *) nullptr) |
| Define_NED_Function2 (nedf_findArrayObjectElement, "bool findArrayObjectElement(any array, string key, any value, ...)", "misc", "Returns the first object from the array that matches the given set of key-value pairs") | |
| cValue | nedf_getId (cComponent *contextComponent, cValue argv[], int argc) |
Variables | |
| cNEDValue | argv [] |
| cNEDValue int | argc |
| INET_API double inet::utils::atod | ( | const char * | s | ) |
Converts string to double.
Referenced by inet::IndicatorLabelFigure::parse(), inet::IndicatorTextFigure::parse(), inet::IndexedImageFigure::parse(), inet::ProgressMeterFigure::parse(), inet::LinearGaugeFigure::parse(), inet::ThermometerFigure::parse(), inet::CounterFigure::parse(), and inet::GaugeFigure::parse().
| INET_API unsigned long inet::utils::atoul | ( | const char * | s | ) |
Converts string to unsigned long.
Referenced by inet::Ipv6RoutingTable::configureInterfaceFromXml(), inet::FigureRecorder::init(), inet::queueing::WrrClassifier::initialize(), and inet::queueing::WrrScheduler::initialize().
| return inet::utils::cNEDValue | ( | (cObject *) | nullptr | ) |
Referenced by nedf_nanToZero().
| 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::AggregatorBase::createAggregatorPolicy(), inet::queueing::PacketClassifier::createClassifierFunction(), inet::queueing::PacketQueue::createComparatorFunction(), inet::queueing::PacketBuffer::createDropperFunction(), inet::queueing::CompoundPacketQueueBase::createDropperFunction(), inet::queueing::PacketQueue::createDropperFunction(), inet::queueing::PacketTagger::createFilterFunction(), inet::queueing::PacketFilter::createFilterFunction(), inet::queueing::PacketLabeler::createFilterFunction(), inet::FragmenterBase::createFragmenterPolicy(), inet::queueing::PacketScheduler::createSchedulerFunction(), inet::sctp::SctpAssociation::initAssociation(), inet::tcp::TcpConnection::initClonedConnection(), inet::tcp::TcpLwipConnection::initConnection(), inet::tcp::TcpConnection::initConnection(), inet::PcapRecorder::initialize(), and inet::ScenarioManager::processLifecycleCommand().
| 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 inet::visualizer::StatisticCanvasVisualizer::createStatisticVisualization().
| inet::utils::Define_NED_Function2 | ( | nedf_absPath | , |
| "string absPath(string modulePath)" | , | ||
| "string" | , | ||
| "Returns absolute path of given module" | |||
| ) |
| inet::utils::Define_NED_Function2 | ( | nedf_findArrayObjectElement | , |
| "bool findArrayObjectElement(any array, string key, any value, ...)" | , | ||
| "misc" | , | ||
| "Returns the first object from the array that matches the given set of key-value pairs" | |||
| ) |
| 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_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_intWithUnit | , |
| "intquantity intWithUnit(any x)" | , | ||
| "conversion" | , | ||
| "Converts x to an integer | C++ long, | ||
| and returns the result. A boolean argument becomes 0 or 1;a double is converted using floor();a string or an XML argument causes an error." | |||
| ) |
| 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_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_nanToZero | , |
| "quantity nanToZero(quantity x)" | , | ||
| "math" | , | ||
| "Returns the argument if it is not | NaN, | ||
| otherwise returns 0." | |||
| ) |
| 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_xmlattr | , |
| "string xmlattr(xml xmlNode, string attributeName, string defaultValue?)" | , | ||
| "xml" | , | ||
| "Returns the value of the specified XML attribute of xmlNode. " "It returns the defaultValue (or throws an error) if the attribute does not exists." | |||
| ) |
| 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::NetworkProtocolBase::sendDown().
| INET_API bool inet::utils::fileExists | ( | const char * | pathname | ) |
Referenced by makePath().
| inet::utils::for | ( | int | index = 0; index < array->size(); index++ | ) |
| INET_API long inet::utils::hex | ( | const char * | s | ) |
| INET_API std::string inet::utils::hex | ( | int16_t | l | ) |
| INET_API std::string inet::utils::hex | ( | int32_t | l | ) |
| INET_API std::string inet::utils::hex | ( | int64_t | l | ) |
| INET_API std::string inet::utils::hex | ( | uint16_t | l | ) |
| INET_API std::string inet::utils::hex | ( | uint32_t | l | ) |
| INET_API std::string inet::utils::hex | ( | uint64_t | l | ) |
| INET_API std::string inet::utils::ltostr | ( | long | i | ) |
Converts an integer to string.
Referenced by inet::DiffservUtil::colorToString(), and inet::DiffservUtil::dscpToString().
| INET_API void inet::utils::makePath | ( | const char * | pathname | ) |
Referenced by makePathForFile().
| INET_API void inet::utils::makePathForFile | ( | const char * | filename | ) |
| cNEDValue inet::utils::nedf_firstAvailableOrEmpty | ( | cComponent * | context, |
| cNEDValue | argv[], | ||
| int | argc | ||
| ) |
| cValue inet::utils::nedf_getId | ( | cComponent * | contextComponent, |
| cValue | argv[], | ||
| int | argc | ||
| ) |
| cNEDValue inet::utils::nedf_moduleListByNedType | ( | cComponent * | context, |
| cNEDValue | argv[], | ||
| int | argc | ||
| ) |
| cNedValue inet::utils::nedf_xmlattr | ( | cComponent * | contextComponent, |
| cNedValue | argv[], | ||
| int | argc | ||
| ) |
|
inline |
Rounding up to the nearest multiple of a number.
Referenced by inet::Ipv4Header::calculateHeaderByteLength(), and inet::Gpsr::setGpsrOptionOnNetworkDatagram().
| INET_API void inet::utils::splitFileName | ( | const char * | pathname, |
| std::string & | dir, | ||
| std::string & | fnameonly | ||
| ) |
Referenced by makePath(), and makePathForFile().
| 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::NetworkInterface::initialize(), and inet::ieee80211::Ieee80211Mac::isInterfaceRegistered().
| INET_API unsigned long inet::utils::uhex | ( | const char * | s | ) |
| INET_API std::string inet::utils::vstringf | ( | const char * | fmt, |
| va_list & | args | ||
| ) |
| cNEDValue int inet::utils::argc |
Referenced by inet::PacketFilter::DynamicExpressionResolver::callFunction(), inet::PacketFilter::DynamicExpressionResolver::callMethod(), for(), nedf_absPath(), nedf_firstAvailableOrEmpty(), nedf_moduleListByNedType(), nedf_moduleListByPath(), nedf_select(), and nedf_xmlattr().
| cNEDValue inet::utils::argv[] |
Referenced by inet::PacketFilter::DynamicExpressionResolver::callFunction(), inet::PacketFilter::DynamicExpressionResolver::callMethod(), for(), nedf_absPath(), nedf_firstAvailableOrEmpty(), nedf_hasModule(), nedf_haveClass(), nedf_moduleListByNedType(), nedf_moduleListByPath(), nedf_nanToZero(), nedf_select(), and nedf_xmlattr().