Skip to content

Commit

Permalink
First pass RMW QoS Unspecified duration API
Browse files Browse the repository at this point in the history
Signed-off-by: Emerson Knapp <[email protected]>
  • Loading branch information
Emerson Knapp committed Feb 18, 2021
1 parent 4a1ed5b commit 5faaf81
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 6 deletions.
4 changes: 4 additions & 0 deletions rmw/include/rmw/get_topic_endpoint_info.h
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ extern "C"
* left unchanged on failure.
* If populated, it is up to the caller to finalize this array later on,
* using rmw_topic_endpoint_info_array_fini().
* QoS Profiles in the info array will be set to RMW_DURATION_INFINITE for infinite durations,
* avoiding exposing any implementation-specific values.
* \return `RMW_RET_OK` if the query was successful, or
* \return `RMW_RET_INVALID_ARGUMENT` if `node` is NULL, or
* \return `RMW_RET_INVALID_ARGUMENT` if `allocator` is not valid,
Expand Down Expand Up @@ -142,6 +144,8 @@ rmw_get_publishers_info_by_topic(
* left unchanged on failure.
* If populated, it is up to the caller to finalize this array later on,
* using rmw_topic_endpoint_info_array_fini().
* QoS Profiles in the info array will be set to RMW_DURATION_INFINITE for infinite durations,
* avoiding exposing any implementation-specific values.
* \return `RMW_RET_OK` if the query was successful, or
* \return `RMW_RET_INVALID_ARGUMENT` if `node` is NULL, or
* \return `RMW_RET_INVALID_ARGUMENT` if `allocator` is not valid,
Expand Down
15 changes: 9 additions & 6 deletions rmw/include/rmw/types.h
Original file line number Diff line number Diff line change
Expand Up @@ -339,6 +339,9 @@ typedef struct RMW_PUBLIC_TYPE rmw_time_t
/// A duration of time, measured in nanoseconds.
typedef rcutils_duration_value_t rmw_duration_t;

#define RMW_DURATION_INFINITE INT64_MAX


typedef rcutils_time_point_value_t rmw_time_point_value_t;

/// Meta-data for a service-related take.
Expand Down Expand Up @@ -430,14 +433,14 @@ enum RMW_PUBLIC_TYPE rmw_qos_liveliness_policy_t
RMW_QOS_POLICY_LIVELINESS_UNKNOWN = 4
};

/// QoS Deadline default, 0s indicates deadline policies are not tracked or enforced
#define RMW_QOS_DEADLINE_DEFAULT 0
/// QoS Deadline default, indicates that no deadline is enforced
#define RMW_QOS_DEADLINE_DEFAULT RMW_DURATION_INFINITE

/// QoS Lifespan default, 0s indicate lifespan policies are not tracked or enforced
#define RMW_QOS_LIFESPAN_DEFAULT 0
/// QoS Lifespan default, indicates that no lifespan is enforced
#define RMW_QOS_LIFESPAN_DEFAULT RMW_DURATION_INFINITE

/// QoS Liveliness lease duration default, 0s indicate lease durations are not tracked or enforced
#define RMW_QOS_LIVELINESS_LEASE_DURATION_DEFAULT 0
/// QoS Liveliness lease duration default, indicates that no lease duration is enforced
#define RMW_QOS_LIVELINESS_LEASE_DURATION_DEFAULT RMW_DURATION_INFINITE

/// ROS MiddleWare quality of service profile.
typedef struct RMW_PUBLIC_TYPE rmw_qos_profile_t
Expand Down

0 comments on commit 5faaf81

Please sign in to comment.