Skip to content

QoS duration APIs need INFINITE constant and an API contract to enforce proper usage by implementations #210

@emersonknapp

Description

@emersonknapp

Feature request

Feature description

Right now, when requesting endpoint info from rmw implementations, e.g. rmw_get_publishers_info_by_topic, we receive inconsistent results for publishers created with the same QoS settings. This makes it hard to create subscriptions adaptively when using queried QoS profiles. It also means that the reporting is noisy/lossy, we do not know what settings were really given to the endpoints.

  • Define a set of constants in the RMW API to define "infinite duration"
  • State the contract on the RMW APIs rmw_get_publishers_info_by_topic and rmw_get_subscriptions_info_by_topic that these infinity values will be reported by RMW implementations
  • State the contract on subscription/publisher creation APIs that an input of Zero duration for QoS policies will be interpreted and reported as Infinity.

The DDS Spec's OMG IDL PSM (Platform Specific Model) defines the following (page 139)

struct Duration_t {
long sec;
unsigned long nanosec;
};
const long DURATION_INFINITE_SEC = 0x7fffffff;
const unsigned long DURATION_INFINITE_NSEC = 0x7fffffff;

const long DURATION_ZERO_SEC = 0;
const unsigned long DURATION_ZERO_NSEC = 0;

We should do something similar. However, since we use a uint64_t for both fields of rmw_time_t, I'd suggest the infinity value being "uint64_max" for both seconds and nanoseconds.

Work Log

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions