rmw  master
C API providing a middleware abstraction layer which is used to implement the rest of ROS.
Functions
qos_string_conversions.h File Reference
#include "rmw/types.h"
#include "rmw/visibility_control.h"
Include dependency graph for qos_string_conversions.h:

Go to the source code of this file.

Functions

const char * rmw_qos_policy_kind_to_str (rmw_qos_policy_kind_t kind)
 Return a string representing the policy kind. More...
 
const char * rmw_qos_durability_policy_to_str (enum rmw_qos_durability_policy_t value)
 Return a string representing the policy value. More...
 
const char * rmw_qos_history_policy_to_str (enum rmw_qos_history_policy_t value)
 Return a string representing the policy value. More...
 
const char * rmw_qos_liveliness_policy_to_str (enum rmw_qos_liveliness_policy_t value)
 Return a string representing the policy value. More...
 
const char * rmw_qos_reliability_policy_to_str (enum rmw_qos_reliability_policy_t value)
 Return a string representing the policy value. More...
 
rmw_qos_policy_kind_t rmw_qos_policy_kind_from_str (const char *str)
 Return a policy kind based on the provided string. More...
 
enum rmw_qos_durability_policy_t rmw_qos_durability_policy_from_str (const char *str)
 Return a enum value based on the provided string. More...
 
enum rmw_qos_history_policy_t rmw_qos_history_policy_from_str (const char *str)
 Return a enum value based on the provided string. More...
 
enum rmw_qos_liveliness_policy_t rmw_qos_liveliness_policy_from_str (const char *str)
 Return a enum value based on the provided string. More...
 
enum rmw_qos_reliability_policy_t rmw_qos_reliability_policy_from_str (const char *str)
 Return a enum value based on the provided string. More...
 

Function Documentation

◆ rmw_qos_policy_kind_to_str()

const char* rmw_qos_policy_kind_to_str ( rmw_qos_policy_kind_t  kind)

Return a string representing the policy kind.

Returns NULL when kind is RMW_QOS_POLICY_INVALID or an undefined kind.

The stringified version of the policy kind can be obtained doing the follwing conversion: RMW_QOS_POLICY_<POLICY_KIND> -> lower_case(<POLICY_KIND>)

For example, the stringified version of RMW_QOS_POLICY_DURABILITY is "durability" and RMW_QOS_POLICY_DEADLINE is "deadline".


Attribute Adherence
Allocates Memory No
Thread-Safe Yes
Uses Atomics No
Lock-Free Yes
Parameters
[in]kindqos policy kind to be stringified.
Returns
a null terminated string representing the policy kind, or
NULL if kind is RMW_QOS_POLICY_INVALID or an undefined kind.

◆ rmw_qos_durability_policy_to_str()

const char* rmw_qos_durability_policy_to_str ( enum rmw_qos_durability_policy_t  value)

Return a string representing the policy value.

Returns NULL when value is RMW_QOS_POLICY_*_UNKNOWN or an undefined enum value.

The stringified version of the policy value can be obtained doing the follwing conversion: RMW_QOS_POLICY_<POLICY_KIND>_<POLICY_VALUE> -> lower_case(<POLICY_VALUE>)

For example, the stringified version of RMW_QOS_POLICY_LIVELINESS_MANUAL_BY_TOPIC is "manual_by_topic" and RMW_QOS_POLICY_RELIABILITY_BEST_EFFORT is "best_effort".


Attribute Adherence
Allocates Memory No
Thread-Safe Yes
Uses Atomics No
Lock-Free Yes
Parameters
[in]valueqos policy value to be stringified.
Returns
a null terminated string representing the policy value, or
NULL if value is RMW_QOS_POLICY_*_UNKNOWN or an undefined enum value.

◆ rmw_qos_history_policy_to_str()

const char* rmw_qos_history_policy_to_str ( enum rmw_qos_history_policy_t  value)

Return a string representing the policy value.

See rmw_qos_durability_policy_to_str() for more details.

◆ rmw_qos_liveliness_policy_to_str()

const char* rmw_qos_liveliness_policy_to_str ( enum rmw_qos_liveliness_policy_t  value)

Return a string representing the policy value.

See rmw_qos_durability_policy_to_str() for more details.

◆ rmw_qos_reliability_policy_to_str()

const char* rmw_qos_reliability_policy_to_str ( enum rmw_qos_reliability_policy_t  value)

Return a string representing the policy value.

See rmw_qos_durability_policy_to_str() for more details.

◆ rmw_qos_policy_kind_from_str()

rmw_qos_policy_kind_t rmw_qos_policy_kind_from_str ( const char *  str)

Return a policy kind based on the provided string.

Returns the policy kind represented by the provided string, or RMW_QOS_POLICY_INVALID when the provided string doesn't represent any policy kind.

How policy kinds are stringified is explained in rmw_qos_policy_kind_to_str.


Attribute Adherence
Allocates Memory No
Thread-Safe Yes
Uses Atomics No
Lock-Free Yes
Parameters
[in]strstring identifying a qos policy kind.
Returns
the policy kind represented by the string, or
RMW_QOS_POLICY_INVALID if the string doesn't represent any policy kind.

◆ rmw_qos_durability_policy_from_str()

enum rmw_qos_durability_policy_t rmw_qos_durability_policy_from_str ( const char *  str)

Return a enum value based on the provided string.

Returns the enum value based on the provided string, or RMW_QOS_POLICY_*_UNKNOWN when the provided string is unexpected.

How policy values are stringified is explained in rmw_qos_durability_policy_to_str.


Attribute Adherence
Allocates Memory No
Thread-Safe Yes
Uses Atomics No
Lock-Free Yes
Parameters
[in]strstring identifying a qos policy value.
Returns
the policy value represented by the string, or
RMW_QOS_POLICY_*_UNKNOWN if the string doesn't represent any value.

◆ rmw_qos_history_policy_from_str()

enum rmw_qos_history_policy_t rmw_qos_history_policy_from_str ( const char *  str)

Return a enum value based on the provided string.

See rmw_qos_durability_policy_from_str() for more details.

◆ rmw_qos_liveliness_policy_from_str()

enum rmw_qos_liveliness_policy_t rmw_qos_liveliness_policy_from_str ( const char *  str)

Return a enum value based on the provided string.

See rmw_qos_durability_policy_from_str() for more details.

◆ rmw_qos_reliability_policy_from_str()

enum rmw_qos_reliability_policy_t rmw_qos_reliability_policy_from_str ( const char *  str)

Return a enum value based on the provided string.

See rmw_qos_durability_policy_from_str() for more details.