|
INET Framework for OMNeT++/OMNEST
|
Classes | |
| class | ColorAttribute |
Enumerations | |
| enum | Color { GREEN, YELLOW, RED } |
Functions | |
| double | parseInformationRate (const char *attrValue, const char *attrName, IInterfaceTable *ift, cSimpleModule &owner, int defaultValue) |
| Parses the information rate parameter (bits/sec). More... | |
| int | parseIntAttribute (const char *attrValue, const char *attrName, bool isOptional=true) |
| Parses an integer attribute. More... | |
| int | parseProtocol (const char *attrValue, const char *attrName) |
| Parses an IP protocol number. More... | |
| int | parseDSCP (const char *attrValue, const char *attrName) |
| Parses a Diffserv code point. More... | |
| void | parseDSCPs (const char *attrValue, const char *attrName, std::vector< int > &result) |
| Parses a space separated list of DSCP values and puts them into the result vector. More... | |
| std::string | dscpToString (int dscp) |
| Returns the string representation of the given DSCP value. More... | |
| std::string | colorToString (int color) |
| Returns the string representation of the given color. More... | |
| double | getInterfaceDatarate (IInterfaceTable *ift, cSimpleModule *interfaceModule) |
| Returns the datarate of the interface containing the given module. More... | |
| int | getColor (cPacket *packet) |
| Returns the color of the packet. More... | |
| void | setColor (cPacket *packet, int color) |
| Sets the color of the packet. More... | |
Variables | |
| cEnum * | dscpEnum = nullptr |
| cEnum * | protocolEnum = nullptr |
| std::string inet::DiffservUtil::colorToString | ( | int | color | ) |
Returns the string representation of the given color.
For values defined in IMeter.h it returns their name, other values are returned as decimal constants.
Referenced by inet::DiffservUtil::ColorAttribute::str().
| std::string inet::DiffservUtil::dscpToString | ( | int | dscp | ) |
Returns the string representation of the given DSCP value.
Values defined in DSCP.msg are returned as "BE", "AF11", etc., others are returned as a decimal number.
Referenced by inet::DscpMarker::markPacket().
| int inet::DiffservUtil::getColor | ( | cPacket * | packet | ) |
Returns the color of the packet.
The color was set by a previous meter component. Returns -1, if the color was not set.
Referenced by inet::TokenBucketMeter::meterPacket(), inet::SingleRateThreeColorMeter::meterPacket(), and inet::TwoRateThreeColorMeter::meterPacket().
| double inet::DiffservUtil::getInterfaceDatarate | ( | IInterfaceTable * | ift, |
| cSimpleModule * | interfaceModule | ||
| ) |
Returns the datarate of the interface containing the given module.
Returns -1, if the interface entry not found.
Referenced by parseInformationRate().
| int inet::DiffservUtil::parseDSCP | ( | const char * | attrValue, |
| const char * | attrName | ||
| ) |
Parses a Diffserv code point.
Recognizes the names defined in Dscp.msg (e.g. "BE", "AF11"), and accepts decimal/octal/hex/binary numbers.
Referenced by parseDSCPs().
| void inet::DiffservUtil::parseDSCPs | ( | const char * | attrValue, |
| const char * | attrName, | ||
| std::vector< int > & | result | ||
| ) |
Parses a space separated list of DSCP values and puts them into the result vector.
"*" is interpreted as all possible DSCP values (i.e. the 0..63 range).
Referenced by inet::DscpMarker::initialize(), and inet::BehaviorAggregateClassifier::initialize().
| double inet::DiffservUtil::parseInformationRate | ( | const char * | attrValue, |
| const char * | attrName, | ||
| IInterfaceTable * | ift, | ||
| cSimpleModule & | owner, | ||
| int | defaultValue | ||
| ) |
Parses the information rate parameter (bits/sec).
Supported formats:
Referenced by inet::TokenBucketMeter::initialize(), inet::SingleRateThreeColorMeter::initialize(), and inet::TwoRateThreeColorMeter::initialize().
| int inet::DiffservUtil::parseIntAttribute | ( | const char * | attrValue, |
| const char * | attrName, | ||
| bool | isOptional = true |
||
| ) |
Parses an integer attribute.
Supports decimal, octal ("0" prefix), hexadecimal ("0x" prefix), and binary ("0b" prefix) bases.
Referenced by inet::MultiFieldClassifier::configureFilters(), parseDSCP(), and parseProtocol().
| int inet::DiffservUtil::parseProtocol | ( | const char * | attrValue, |
| const char * | attrName | ||
| ) |
Parses an IP protocol number.
Recognizes the names defined in IpProtocolId.msg (e.g. "Udp", "udp", "Tcp"), and accepts decimal/octal/hex/binary numbers.
Referenced by inet::MultiFieldClassifier::configureFilters().
| void inet::DiffservUtil::setColor | ( | cPacket * | packet, |
| int | color | ||
| ) |
Sets the color of the packet.
The color is stored in the parlist of the cPacket object.
Referenced by inet::TokenBucketMeter::meterPacket(), inet::SingleRateThreeColorMeter::meterPacket(), and inet::TwoRateThreeColorMeter::meterPacket().
| cEnum* inet::DiffservUtil::dscpEnum = nullptr |
Referenced by dscpToString(), and parseDSCP().
| cEnum* inet::DiffservUtil::protocolEnum = nullptr |
Referenced by parseProtocol().