Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add sequence numbers to message info structure #318

Merged
merged 23 commits into from
Mar 21, 2022
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions rmw/include/rmw/types.h
Original file line number Diff line number Diff line change
Expand Up @@ -518,8 +518,21 @@ typedef struct RMW_PUBLIC_TYPE rmw_gid_s
/// Information describing an rmw message
typedef struct RMW_PUBLIC_TYPE rmw_message_info_s
{
/// Time when the DDS sample was written in the publisher queue.
ivanpauno marked this conversation as resolved.
Show resolved Hide resolved
rmw_time_point_value_t source_timestamp;
/// Time when the message was added to the subscription queue.
ivanpauno marked this conversation as resolved.
Show resolved Hide resolved
rmw_time_point_value_t received_timestamp;
/// Sequence number of the received message for the publisher.
/**
* If the rmw implementation doesn't support sequence numbers, it's value will be UINT64_MAX.
ivanpauno marked this conversation as resolved.
Show resolved Hide resolved
*/
ivanpauno marked this conversation as resolved.
Show resolved Hide resolved
int64_t publication_sequence_number;
ivanpauno marked this conversation as resolved.
Show resolved Hide resolved
/// Sequence number of the received message for the subscription,
/**
* If the rmw implementation doesn't support sequence numbers, it's value will be UINT64_MAX.
*/
ivanpauno marked this conversation as resolved.
Show resolved Hide resolved
int64_t reception_sequence_number;
/// Global unique identifier of the publisher that sent the message.
rmw_gid_t publisher_gid;
ivanpauno marked this conversation as resolved.
Show resolved Hide resolved

/// Whether this message is from intra_process communication or not
Expand Down
2 changes: 1 addition & 1 deletion rmw/src/types.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@ RMW_WARN_UNUSED
rmw_message_info_t
rmw_get_zero_initialized_message_info(void)
{
rmw_message_info_t zero_initialized_message_info = {0, 0, {NULL, {0}}, false};
rmw_message_info_t zero_initialized_message_info = {0, 0, INT64_MAX, INT64_MAX, {NULL, {0}}, false};
return zero_initialized_message_info;
}