Skip to content

Commit

Permalink
Declare certain event types to be compatible although mechanisms are …
Browse files Browse the repository at this point in the history
…not implemented

Signed-off-by: Yadunund <[email protected]>
  • Loading branch information
Yadunund committed Feb 8, 2024
1 parent ef11bb2 commit eef9b2e
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions rmw_zenoh_cpp/src/detail/event.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,24 +28,27 @@ enum rmw_zenoh_event_type_t

// subscription events
ZENOH_EVENT_REQUESTED_QOS_INCOMPATIBLE,
// RMW_EVENT_MESSAGE_LOST,
ZENOH_EVENT_MESSAGE_LOST,
// RMW_EVENT_SUBSCRIPTION_INCOMPATIBLE_TYPE,
// RMW_EVENT_SUBSCRIPTION_MATCHED,
ZENOH_EVENT_SUBSCRIPTION_MATCHED,

// publisher events
// RMW_EVENT_LIVELINESS_LOST,
// RMW_EVENT_OFFERED_DEADLINE_MISSED,
ZENOH_EVENT_OFFERED_QOS_INCOMPATIBLE
ZENOH_EVENT_OFFERED_QOS_INCOMPATIBLE,
// RMW_EVENT_PUBLISHER_INCOMPATIBLE_TYPE,
// RMW_EVENT_PUBLICATION_MATCHED,
ZENOH_EVENT_PUBLICATION_MATCHED,
};

/// Helper value to indicate the maximum index of events supported.
#define ZENOH_EVENT_ID_MAX rmw_zenoh_event_type_t::ZENOH_EVENT_OFFERED_QOS_INCOMPATIBLE
#define ZENOH_EVENT_ID_MAX rmw_zenoh_event_type_t::ZENOH_EVENT_PUBLICATION_MATCHED

static const std::unordered_map<rmw_event_type_t, rmw_zenoh_event_type_t> event_map{
{RMW_EVENT_REQUESTED_QOS_INCOMPATIBLE, ZENOH_EVENT_REQUESTED_QOS_INCOMPATIBLE},
{RMW_EVENT_OFFERED_QOS_INCOMPATIBLE, ZENOH_EVENT_OFFERED_QOS_INCOMPATIBLE},
{RMW_EVENT_MESSAGE_LOST, ZENOH_EVENT_MESSAGE_LOST},
{RMW_EVENT_SUBSCRIPTION_MATCHED, ZENOH_EVENT_SUBSCRIPTION_MATCHED},
{RMW_EVENT_PUBLICATION_MATCHED, ZENOH_EVENT_PUBLICATION_MATCHED}
// TODO(clalancette): Implement remaining events
};

Expand Down

0 comments on commit eef9b2e

Please sign in to comment.