1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
use std::os::raw::c_void;
use crate::*;
#[repr(u32)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum rcl_publisher_event_type_t {
RCL_PUBLISHER_OFFERED_DEADLINE_MISSED = 0,
RCL_PUBLISHER_LIVELINESS_LOST = 1,
RCL_PUBLISHER_OFFERED_INCOMPATIBLE_QOS = 2,
}
#[repr(u32)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum rcl_subscription_event_type_t {
RCL_SUBSCRIPTION_REQUESTED_DEADLINE_MISSED = 0,
RCL_SUBSCRIPTION_LIVELINESS_CHANGED = 1,
RCL_SUBSCRIPTION_REQUESTED_INCOMPATIBLE_QOS = 2,
#[cfg(feature = "galactic+")]
RCL_SUBSCRIPTION_MESSAGE_LOST = 3,
}
#[repr(C)]
#[derive(Debug)]
struct rcl_event_impl_t {
_unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug)]
pub struct rcl_event_t {
impl_: *mut rcl_event_impl_t,
}
extern "C" {
pub fn rcl_get_zero_initialized_event() -> rcl_event_t;
pub fn rcl_publisher_event_init(
event: *mut rcl_event_t,
publisher: *const rcl_publisher_t,
event_type: rcl_publisher_event_type_t,
) -> rcl_ret_t;
pub fn rcl_subscription_event_init(
event: *mut rcl_event_t,
subscription: *const rcl_subscription_t,
event_type: rcl_subscription_event_type_t,
) -> rcl_ret_t;
pub fn rcl_take_event(event: *const rcl_event_t, event_info: *mut c_void) -> rcl_ret_t;
pub fn rcl_event_fini(event: *mut rcl_event_t) -> rcl_ret_t;
}