Preferences for the port's Quality of Service. More...
#include <yarp/os/QosStyle.h>
Public Types | |
enum | PacketPriorityLevel { PacketPriorityInvalid = -1, PacketPriorityNormal = 0, PacketPriorityLow = 10, PacketPriorityHigh = 36, PacketPriorityCritical = 44, PacketPriorityUndefined = 0x7FFF } |
The PacketPriorityLevel defines the packets quality of service (priority) levels. More... | |
enum | PacketPriorityDSCP { DSCP_Invalid = -1, DSCP_CS0 = 0, DSCP_CS1 = 8, DSCP_CS2 = 16, DSCP_CS3 = 24, DSCP_CS4 = 32, DSCP_CS5 = 40, DSCP_CS6 = 48, DSCP_CS7 = 56, DSCP_AF11 = 10, DSCP_AF12 = 12, DSCP_AF13 = 14, DSCP_AF21 = 18, DSCP_AF22 = 20, DSCP_AF23 = 22, DSCP_AF31 = 26, DSCP_AF32 = 28, DSCP_AF33 = 30, DSCP_AF41 = 34, DSCP_AF42 = 36, DSCP_AF43 = 38, DSCP_VA = 44, DSCP_EF = 46, DSCP_Undefined = 0x7FFF } |
The PacketPriorityDSCP defines the packets quality of service (priority) using DSCP. More... | |
Public Member Functions | |
QosStyle () | |
Constructor. More... | |
void | setPacketPriorityByDscp (PacketPriorityDSCP dscp) |
sets the packet priority given as DSCP class More... | |
void | setPacketPriorityByLevel (PacketPriorityLevel level) |
sets the packet priority given as PacketPriorityLevel More... | |
void | setPacketPrioritybyTOS (int tos) |
sets the packet priority given as TOS value More... | |
bool | setPacketPriority (const std::string &priority) |
sets the packet priority from a string. More... | |
void | setThreadPriority (int priority) |
sets the communication thread priority level More... | |
void | setThreadPolicy (int policy) |
sets the communication thread scheduling policy More... | |
int | getPacketPriorityAsTOS () const |
returns the packet TOS value More... | |
PacketPriorityDSCP | getPacketPriorityAsDSCP () const |
returns the packet DSCP class More... | |
PacketPriorityLevel | getPacketPriorityAsLevel () const |
returns the packet TOS value More... | |
int | getThreadPriority () const |
returns the communication thread priority level More... | |
int | getThreadPolicy () const |
returns the communication thread scheduling policy More... | |
Static Public Member Functions | |
static PacketPriorityDSCP | getDSCPByVocab (int vocab) |
returns the IPV4/6 DSCP value given as DSCP code More... | |
static PacketPriorityLevel | getLevelByVocab (int vocab) |
returns the priority level More... | |
Preferences for the port's Quality of Service.
All fields have sensible defaults.
Definition at line 25 of file QosStyle.h.
The PacketPriorityDSCP defines the packets quality of service (priority) using DSCP.
Definition at line 47 of file QosStyle.h.
The PacketPriorityLevel defines the packets quality of service (priority) levels.
Enumerator | |
---|---|
PacketPriorityInvalid | |
PacketPriorityNormal | |
PacketPriorityLow | |
PacketPriorityHigh | |
PacketPriorityCritical | |
PacketPriorityUndefined |
Definition at line 32 of file QosStyle.h.
|
explicit |
|
static |
returns the IPV4/6 DSCP value given as DSCP code
vocab | a DSCP code (e.g., CS0) |
Definition at line 158 of file QosStyle.cpp.
|
static |
returns the priority level
vocab | a level code (e.g., HIGH) |
Definition at line 211 of file QosStyle.cpp.
yarp::os::QosStyle::PacketPriorityDSCP yarp::os::QosStyle::getPacketPriorityAsDSCP | ( | ) | const |
yarp::os::QosStyle::PacketPriorityLevel yarp::os::QosStyle::getPacketPriorityAsLevel | ( | ) | const |
|
inline |
|
inline |
returns the communication thread scheduling policy
Definition at line 184 of file QosStyle.h.
|
inline |
returns the communication thread priority level
Definition at line 174 of file QosStyle.h.
bool yarp::os::QosStyle::setPacketPriority | ( | const std::string & | priority | ) |
sets the packet priority from a string.
The string has this syntax:
For example the following call
is equivalent to
priority | the string to be interpreted as priority |
Definition at line 42 of file QosStyle.cpp.
void yarp::os::QosStyle::setPacketPriorityByDscp | ( | PacketPriorityDSCP | dscp | ) |
sets the packet priority given as DSCP class
dscp | the packet DSCP class |
Definition at line 23 of file QosStyle.cpp.
void yarp::os::QosStyle::setPacketPriorityByLevel | ( | PacketPriorityLevel | level | ) |
sets the packet priority given as PacketPriorityLevel
level | the packet priority |
Definition at line 33 of file QosStyle.cpp.
|
inline |
sets the packet priority given as TOS value
tos | the packet TOS |
Definition at line 100 of file QosStyle.h.
|
inline |
sets the communication thread scheduling policy
policy | the thread's real-time scheduling policy |
Definition at line 140 of file QosStyle.h.
|
inline |
sets the communication thread priority level
priority | the thread's priority |
Definition at line 130 of file QosStyle.h.