-
Notifications
You must be signed in to change notification settings - Fork 70
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move statuses definitions to rmw/events_statuses/*.h (#232)
Signed-off-by: Ivan Santiago Paunovic <[email protected]>
- Loading branch information
Showing
8 changed files
with
288 additions
and
119 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
// Copyright 2020 Open Source Robotics Foundation, Inc. | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
#ifndef RMW__EVENTS_STATUSES__EVENTS_STATUSES_H_ | ||
#define RMW__EVENTS_STATUSES__EVENTS_STATUSES_H_ | ||
|
||
#include "rmw/events_statuses/incompatible_qos.h" | ||
#include "rmw/events_statuses/liveliness_changed.h" | ||
#include "rmw/events_statuses/liveliness_lost.h" | ||
#include "rmw/events_statuses/offered_deadline_missed.h" | ||
#include "rmw/events_statuses/requested_deadline_missed.h" | ||
|
||
#endif // RMW__EVENTS_STATUSES__EVENTS_STATUSES_H_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
// Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
#ifndef RMW__EVENTS_STATUSES__INCOMPATIBLE_QOS_H_ | ||
#define RMW__EVENTS_STATUSES__INCOMPATIBLE_QOS_H_ | ||
|
||
#include <stdint.h> | ||
|
||
#include "rmw/visibility_control.h" | ||
|
||
#ifdef __cplusplus | ||
extern "C" | ||
{ | ||
#endif | ||
|
||
/// QoS Policy Kinds | ||
typedef enum RMW_PUBLIC_TYPE rmw_qos_policy_kind_t | ||
{ | ||
RMW_QOS_POLICY_INVALID = 1 << 0, | ||
RMW_QOS_POLICY_DURABILITY = 1 << 1, | ||
RMW_QOS_POLICY_DEADLINE = 1 << 2, | ||
RMW_QOS_POLICY_LIVELINESS = 1 << 3, | ||
RMW_QOS_POLICY_RELIABILITY = 1 << 4, | ||
RMW_QOS_POLICY_HISTORY = 1 << 5, | ||
RMW_QOS_POLICY_LIFESPAN = 1 << 6 | ||
} rmw_qos_policy_kind_t; | ||
|
||
struct RMW_PUBLIC_TYPE rmw_qos_incompatible_event_status_t | ||
{ | ||
/** | ||
* Total cumulative number of times the concerned subscription discovered a | ||
* publisher for the same topic with an offered QoS that was incompatible | ||
* with that requested by the subscription. | ||
*/ | ||
int32_t total_count; | ||
/** | ||
* The change in total_count since the last time the status was read. | ||
*/ | ||
int32_t total_count_change; | ||
/** | ||
* The Qos Policy Kind of one of the policies that was found to be | ||
* incompatible the last time an incompatibility was detected. | ||
*/ | ||
rmw_qos_policy_kind_t last_policy_kind; | ||
}; | ||
|
||
/// Event state for a subscription's 'RMW_EVENT_REQUESTED_QOS_INCOMPATIBLE' events. | ||
typedef struct rmw_qos_incompatible_event_status_t rmw_requested_qos_incompatible_event_status_t; | ||
|
||
/// Event state for a publisher's 'RMW_EVENT_OFFERED_QOS_INCOMPATIBLE' events. | ||
typedef struct rmw_qos_incompatible_event_status_t rmw_offered_qos_incompatible_event_status_t; | ||
|
||
#ifdef __cplusplus | ||
} | ||
#endif | ||
|
||
#endif // RMW__EVENTS_STATUSES__INCOMPATIBLE_QOS_H_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
// Copyright 2020 Open Source Robotics Foundation, Inc. | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
#ifndef RMW__EVENTS_STATUSES__LIVELINESS_CHANGED_H_ | ||
#define RMW__EVENTS_STATUSES__LIVELINESS_CHANGED_H_ | ||
|
||
#include <stdint.h> | ||
|
||
#include "rmw/visibility_control.h" | ||
|
||
#ifdef __cplusplus | ||
extern "C" | ||
{ | ||
#endif | ||
|
||
/// QoS Liveliness Changed information provided by a subscription. | ||
typedef struct RMW_PUBLIC_TYPE rmw_liveliness_changed_status_t | ||
{ | ||
/** | ||
* The total number of currently active Publishers which publish to the topic associated with | ||
* the Subscription. | ||
* This count increases when a newly matched Publisher asserts its liveliness for the first time | ||
* or when a Publisher previously considered to be not alive reasserts its liveliness. | ||
* The count decreases when a Publisher considered alive fails to assert its liveliness and | ||
* becomes not alive, whether because it was deleted normally or for some other reason. | ||
*/ | ||
int32_t alive_count; | ||
/** | ||
* The total count of current Publishers which publish to the topic associated with the | ||
* Subscription that are no longer asserting their liveliness. | ||
* This count increases when a Publisher considered alive fails to assert its liveliness and | ||
* becomes not alive for some reason other than the normal deletion of that Publisher. | ||
* It decreases when a previously not alive Publisher either reasserts its liveliness or is | ||
* deleted normally. | ||
*/ | ||
int32_t not_alive_count; | ||
/// The change in the alive_count since the status was last read. | ||
int32_t alive_count_change; | ||
/// The change in the not_alive_count since the status was last read. | ||
int32_t not_alive_count_change; | ||
} rmw_liveliness_changed_status_t; | ||
|
||
#ifdef __cplusplus | ||
} | ||
#endif | ||
|
||
#endif // RMW__EVENTS_STATUSES__LIVELINESS_CHANGED_H_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
// Copyright 2020 Open Source Robotics Foundation, Inc. | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
#ifndef RMW__EVENTS_STATUSES__LIVELINESS_LOST_H_ | ||
#define RMW__EVENTS_STATUSES__LIVELINESS_LOST_H_ | ||
|
||
#include <stdint.h> | ||
|
||
#include "rmw/visibility_control.h" | ||
|
||
#ifdef __cplusplus | ||
extern "C" | ||
{ | ||
#endif | ||
|
||
/// QoS Liveliness Lost information provided by a publisher. | ||
typedef struct RMW_PUBLIC_TYPE rmw_liveliness_lost_status_t | ||
{ | ||
/** | ||
* Lifetime cumulative number of times that a previously-alive Publisher became not alive due to | ||
* a failure to actively signal its liveliness within its offered liveliness period. | ||
* This count does not change when an already not alive Publisher simply remains not alive for | ||
* another liveliness period. | ||
*/ | ||
int32_t total_count; | ||
/// The change in total_count since the last time the status was last read. | ||
int32_t total_count_change; | ||
} rmw_liveliness_lost_status_t; | ||
|
||
#ifdef __cplusplus | ||
} | ||
#endif | ||
|
||
#endif // RMW__EVENTS_STATUSES__LIVELINESS_LOST_H_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
// Copyright 2020 Open Source Robotics Foundation, Inc. | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
#ifndef RMW__EVENTS_STATUSES__OFFERED_DEADLINE_MISSED_H_ | ||
#define RMW__EVENTS_STATUSES__OFFERED_DEADLINE_MISSED_H_ | ||
|
||
#include <stddef.h> | ||
|
||
#include "rmw/visibility_control.h" | ||
|
||
#ifdef __cplusplus | ||
extern "C" | ||
{ | ||
#endif | ||
|
||
/// QoS Deadline Missed information provided by a publisher. | ||
typedef struct RMW_PUBLIC_TYPE rmw_offered_deadline_missed_status_t | ||
{ | ||
/** | ||
* Lifetime cumulative number of offered deadline periods elapsed during which a Publisher failed | ||
* to provide data. | ||
* Missed deadlines accumulate; that is, each deadline period the total_count will be incremented | ||
* by one. | ||
*/ | ||
int32_t total_count; | ||
/// The change in total_count since the last time the status was last read. | ||
int32_t total_count_change; | ||
} rmw_offered_deadline_missed_status_t; | ||
|
||
#ifdef __cplusplus | ||
} | ||
#endif | ||
|
||
#endif // RMW__EVENTS_STATUSES__OFFERED_DEADLINE_MISSED_H_ |
45 changes: 45 additions & 0 deletions
45
rmw/include/rmw/events_statuses/requested_deadline_missed.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
// Copyright 2020 Open Source Robotics Foundation, Inc. | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
#ifndef RMW__EVENTS_STATUSES__REQUESTED_DEADLINE_MISSED_H_ | ||
#define RMW__EVENTS_STATUSES__REQUESTED_DEADLINE_MISSED_H_ | ||
|
||
#include <stdint.h> | ||
|
||
#include "rmw/visibility_control.h" | ||
|
||
#ifdef __cplusplus | ||
extern "C" | ||
{ | ||
#endif | ||
|
||
/// QoS Requested Deadline Missed information provided by a subscription. | ||
typedef struct RMW_PUBLIC_TYPE rmw_requested_deadline_missed_status_t | ||
{ | ||
/** | ||
* Lifetime cumulative number of missed deadlines detected for any instance read by the | ||
* subscription. | ||
* Missed deadlines accumulate; that is, each deadline period the total_count will be incremented | ||
* by one for each instance for which data was not received. | ||
*/ | ||
int32_t total_count; | ||
/// The incremental number of deadlines detected since the status was read. | ||
int32_t total_count_change; | ||
} rmw_requested_deadline_missed_status_t; | ||
|
||
#ifdef __cplusplus | ||
} | ||
#endif | ||
|
||
#endif // RMW__EVENTS_STATUSES__REQUESTED_DEADLINE_MISSED_H_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.