Skip to main content

ExecutorFfi

Trait ExecutorFfi 

Source
pub trait ExecutorFfi<'s>: Sealed + Sized {
Show 56 methods // Required methods fn add_arena_subscription_c_callback<const RX_BUF: usize>( &mut self, node_id: Option<NodeId>, topic_name: &str, type_name: &str, type_hash: &str, qos: QoSProfile, callback: RawSubscriptionCallback, context: *mut c_void, group: Option<&str>, rx_buffer_hint: usize, ) -> Result<HandleId, NodeError>; fn add_arena_subscription_c_callback_with_capture<const RX_BUF: usize>( &mut self, node_id: Option<NodeId>, topic_name: &str, type_name: &str, type_hash: &str, qos: QoSProfile, callback: RawSubscriptionCallback, context: *mut c_void, group: Option<&str>, rx_buffer_hint: usize, capture: Option<&[u8]>, capture_drop: Option<unsafe extern "C" fn(*mut c_void)>, ) -> Result<HandleId, NodeError>; fn add_arena_subscription_c_info_callback<const RX_BUF: usize>( &mut self, node_id: Option<NodeId>, topic_name: &str, type_name: &str, type_hash: &str, qos: QoSProfile, callback: RawSubscriptionInfoCallback, context: *mut c_void, rx_buffer_hint: usize, ) -> Result<HandleId, NodeError>; unsafe fn add_arena_subscription_c_typed_callback<const RX_BUF: usize>( &mut self, node_id: Option<NodeId>, topic_name: &str, type_name: &str, type_hash: &str, qos: QoSProfile, msg: NonNull<c_void>, deserialize: RawMessageDeserializeFn, callback: TypedSubscriptionCallback, context: *mut c_void, group: Option<&str>, rx_buffer_hint: usize, ) -> Result<HandleId, NodeError>; unsafe fn add_on_shutdown_callback( &mut self, callback: ShutdownCallbackFn, context: *mut c_void, ) -> Result<ShutdownCallbackHandle, NodeError>; unsafe fn add_pre_shutdown_callback( &mut self, callback: ShutdownCallbackFn, context: *mut c_void, ) -> Result<ShutdownCallbackHandle, NodeError>; fn remove_pre_shutdown_callback( &mut self, handle: ShutdownCallbackHandle, ) -> bool; fn remove_on_shutdown_callback( &mut self, handle: ShutdownCallbackHandle, ) -> bool; unsafe fn from_session_ptr_in( session_ptr: *mut CffiSession, backing: &'s mut [MaybeUninit<u64>], sizing: ExecutorSizing, ) -> Self; unsafe fn open_multi_in( specs: &[SessionSpec<'_>], backing: &'s mut [MaybeUninit<u64>], sizing: ExecutorSizing, ) -> Result<Self, NodeError>; unsafe fn open_with_session_handle_in( handle: SessionHandle, backing: &'s mut [MaybeUninit<u64>], sizing: ExecutorSizing, ) -> Self; fn register_service_client_raw_sized<const REPLY_BUF: usize>( &mut self, service_name: &str, service_type: &str, service_hash: &str, qos: QoSProfile, callback: Option<RawResponseCallback>, context: *mut c_void, ) -> Result<HandleId, NodeError>; fn register_service_client_raw_capturing<const REPLY_BUF: usize>( &mut self, node_id: Option<NodeId>, service_name: &str, service_type: &str, service_hash: &str, qos: QoSProfile, callback: Option<RawResponseCallback>, capture: Option<&[u8]>, ) -> Result<HandleId, NodeError>; fn register_service_raw_capturing<const REQ_BUF: usize, const REPLY_BUF: usize>( &mut self, node_id: Option<NodeId>, service_name: &str, service_type: &str, service_hash: &str, qos: QoSProfile, callback: RawServiceCallback, capture: Option<&[u8]>, capture_drop: Option<unsafe extern "C" fn(*mut c_void)>, ) -> Result<HandleId, NodeError>; fn register_service_raw_sized<const REQ_BUF: usize, const REPLY_BUF: usize>( &mut self, service_name: &str, service_type: &str, service_hash: &str, qos: QoSProfile, callback: RawServiceCallback, context: *mut c_void, ) -> Result<HandleId, NodeError>; fn register_timer_c_capturing( &mut self, node_id: Option<NodeId>, period: TimerDuration, source: TimerClockSource, callback: unsafe extern "C" fn(*mut c_void), capture: Option<&[u8]>, capture_drop: Option<unsafe extern "C" fn(*mut c_void)>, ) -> Result<HandleId, NodeError>; fn register_timer_c_capturing_with_info<I>( &mut self, node_id: Option<NodeId>, period: TimerDuration, source: TimerClockSource, autostart: bool, group: Option<&str>, callback: unsafe extern "C" fn(*const I, *mut c_void), capture: Option<&[u8]>, capture_drop: Option<unsafe extern "C" fn(*mut c_void)>, ) -> Result<HandleId, NodeError> where I: From<TimerCallInfo> + 'static; unsafe fn release_action_client_raw(&mut self, entry_index: usize) -> bool; unsafe fn release_action_server_raw( &mut self, handle: &ActionServerRawHandle, ) -> bool; unsafe fn release_node(&mut self, node: NodeId) -> usize; unsafe fn release_service(&mut self, handle: HandleId) -> bool; unsafe fn release_service_client(&mut self, handle: HandleId) -> bool; unsafe fn release_subscription(&mut self, handle: HandleId) -> bool; unsafe fn release_timer(&mut self, handle: HandleId) -> bool; unsafe fn retarget_action_client_raw( &mut self, entry_index: usize, context: *mut c_void, ) -> bool; unsafe fn retarget_action_server_raw( &mut self, handle: &ActionServerRawHandle, context: *mut c_void, ) -> bool; fn set_park_primitive( &mut self, park: ParkUntilFn, ctx: *mut c_void, granularity_us: u64, ); fn set_wake_hook( &mut self, hook: Option<WakeHookFn>, ctx: *mut c_void, ) -> bool; fn wake_raw_ptr(&self) -> *mut c_void; fn enter_spin_loop(&self); fn exit_spin_loop(&self); fn exec_lock(&self) -> Option<ExecLock>; fn node_session_mut(&mut self, node_id: NodeId) -> Option<&mut CffiSession>; fn install_wake_signal_on_primary(&mut self); fn set_entry_owner(&mut self, id: HandleId, node: NodeId) -> bool; fn set_primary_identity(&mut self, rmw_name: &str, locator: &str); fn session_io_failures(&self) -> u32; fn timer_elapsed_us(&self, id: HandleId) -> Option<u64>; fn timer_is_ready(&self, id: HandleId) -> Option<bool>; fn exchange_timer_period_us( &mut self, id: HandleId, new_period_us: u64, ) -> Option<u64>; fn register_service_client_raw_sized_on<const REPLY_BUF: usize>( &mut self, node_id: NodeId, service_name: &str, service_type: &str, service_hash: &str, qos: QoSProfile, callback: Option<RawResponseCallback>, context: *mut c_void, ) -> Result<HandleId, NodeError>; fn register_service_raw_sized_on<const REQ_BUF: usize, const REPLY_BUF: usize>( &mut self, node_id: NodeId, service_name: &str, service_type: &str, service_hash: &str, qos: QoSProfile, callback: RawServiceCallback, context: *mut c_void, ) -> Result<HandleId, NodeError>; unsafe fn service_client_entry_mut( &mut self, entry_index: usize, ) -> Option<&mut ServiceClientRawArenaEntry<{ crate::config::DEFAULT_RX_BUF_SIZE }>>; unsafe fn from_session_ptr( session_ptr: *mut CffiSession, ) -> Executor<'static>; unsafe fn from_session_in( session: CffiSession, backing: &'s mut [MaybeUninit<u64>], sizing: ExecutorSizing, ) -> Self; unsafe fn open_with_session_in( session: *mut CffiSession, backing: &'s mut [MaybeUninit<u64>], sizing: ExecutorSizing, ) -> Self; unsafe fn open_with_session_slot( session: *mut CffiSession, slot: &'s mut TierExecutorBackingSlot, ) -> Self; unsafe fn open_with_session_handle_slot( handle: SessionHandle, slot: &'s mut TierExecutorBackingSlot, ) -> Self; unsafe fn detach_action_client_raw(&mut self, entry_index: usize) -> bool; unsafe fn detach_action_server_raw( &mut self, handle: &ActionServerRawHandle, ) -> bool; unsafe fn detach_action_server_raw_sized<const GOAL_BUF: usize, const RESULT_BUF: usize, const FEEDBACK_BUF: usize, const MAX_GOALS: usize>( &mut self, entry_index: usize, ) -> bool; unsafe fn release_action_client_raw_sized<const GOAL_BUF: usize, const RESULT_BUF: usize, const FEEDBACK_BUF: usize>( &mut self, entry_index: usize, ) -> bool; unsafe fn release_action_server_raw_sized<const GOAL_BUF: usize, const RESULT_BUF: usize, const FEEDBACK_BUF: usize, const MAX_GOALS: usize>( &mut self, entry_index: usize, ) -> bool; fn register_service_raw( &mut self, service_name: &str, service_type: &str, service_hash: &str, callback: RawServiceCallback, context: *mut c_void, ) -> Result<HandleId, NodeError>; fn register_service_client_raw( &mut self, service_name: &str, service_type: &str, service_hash: &str, callback: Option<RawResponseCallback>, context: *mut c_void, ) -> Result<HandleId, NodeError>; unsafe fn release_guard_condition(&mut self, handle: HandleId) -> bool;
}
Expand description

The executor’s FFI entry points, for nros-c and nros-cpp. Sealed.

Required Methods§

Source

fn add_arena_subscription_c_callback<const RX_BUF: usize>( &mut self, node_id: Option<NodeId>, topic_name: &str, type_name: &str, type_hash: &str, qos: QoSProfile, callback: RawSubscriptionCallback, context: *mut c_void, group: Option<&str>, rx_buffer_hint: usize, ) -> Result<HandleId, NodeError>

The FFI entry point; see Executor::add_arena_subscription_c_callback in spin.rs.

Source

fn add_arena_subscription_c_callback_with_capture<const RX_BUF: usize>( &mut self, node_id: Option<NodeId>, topic_name: &str, type_name: &str, type_hash: &str, qos: QoSProfile, callback: RawSubscriptionCallback, context: *mut c_void, group: Option<&str>, rx_buffer_hint: usize, capture: Option<&[u8]>, capture_drop: Option<unsafe extern "C" fn(*mut c_void)>, ) -> Result<HandleId, NodeError>

The FFI entry point; see Executor::add_arena_subscription_c_callback_with_capture in spin.rs.

Source

fn add_arena_subscription_c_info_callback<const RX_BUF: usize>( &mut self, node_id: Option<NodeId>, topic_name: &str, type_name: &str, type_hash: &str, qos: QoSProfile, callback: RawSubscriptionInfoCallback, context: *mut c_void, rx_buffer_hint: usize, ) -> Result<HandleId, NodeError>

The FFI entry point; see Executor::add_arena_subscription_c_info_callback in spin.rs.

Source

unsafe fn add_arena_subscription_c_typed_callback<const RX_BUF: usize>( &mut self, node_id: Option<NodeId>, topic_name: &str, type_name: &str, type_hash: &str, qos: QoSProfile, msg: NonNull<c_void>, deserialize: RawMessageDeserializeFn, callback: TypedSubscriptionCallback, context: *mut c_void, group: Option<&str>, rx_buffer_hint: usize, ) -> Result<HandleId, NodeError>

The FFI entry point; see Executor::add_arena_subscription_c_typed_callback in spin.rs.

Source

unsafe fn add_on_shutdown_callback( &mut self, callback: ShutdownCallbackFn, context: *mut c_void, ) -> Result<ShutdownCallbackHandle, NodeError>

The FFI entry point; see Executor::add_on_shutdown_callback in spin.rs.

Source

unsafe fn add_pre_shutdown_callback( &mut self, callback: ShutdownCallbackFn, context: *mut c_void, ) -> Result<ShutdownCallbackHandle, NodeError>

The FFI entry point; see Executor::add_pre_shutdown_callback in spin.rs.

Source

fn remove_pre_shutdown_callback( &mut self, handle: ShutdownCallbackHandle, ) -> bool

The FFI entry point; see Executor::remove_pre_shutdown_callback in spin.rs.

Source

fn remove_on_shutdown_callback( &mut self, handle: ShutdownCallbackHandle, ) -> bool

The FFI entry point; see Executor::remove_on_shutdown_callback in spin.rs.

Source

unsafe fn from_session_ptr_in( session_ptr: *mut CffiSession, backing: &'s mut [MaybeUninit<u64>], sizing: ExecutorSizing, ) -> Self

The FFI entry point; see Executor::from_session_ptr_in in spin.rs.

Source

unsafe fn open_multi_in( specs: &[SessionSpec<'_>], backing: &'s mut [MaybeUninit<u64>], sizing: ExecutorSizing, ) -> Result<Self, NodeError>

The FFI entry point; see Executor::open_multi_in in spin.rs.

Source

unsafe fn open_with_session_handle_in( handle: SessionHandle, backing: &'s mut [MaybeUninit<u64>], sizing: ExecutorSizing, ) -> Self

The FFI entry point; see Executor::open_with_session_handle_in in spin.rs.

Source

fn register_service_client_raw_sized<const REPLY_BUF: usize>( &mut self, service_name: &str, service_type: &str, service_hash: &str, qos: QoSProfile, callback: Option<RawResponseCallback>, context: *mut c_void, ) -> Result<HandleId, NodeError>

The FFI entry point; see Executor::register_service_client_raw_sized in spin.rs.

Source

fn register_service_client_raw_capturing<const REPLY_BUF: usize>( &mut self, node_id: Option<NodeId>, service_name: &str, service_type: &str, service_hash: &str, qos: QoSProfile, callback: Option<RawResponseCallback>, capture: Option<&[u8]>, ) -> Result<HandleId, NodeError>

The FFI entry point; see Executor::register_service_client_raw_capturing in spin.rs.

Source

fn register_service_raw_capturing<const REQ_BUF: usize, const REPLY_BUF: usize>( &mut self, node_id: Option<NodeId>, service_name: &str, service_type: &str, service_hash: &str, qos: QoSProfile, callback: RawServiceCallback, capture: Option<&[u8]>, capture_drop: Option<unsafe extern "C" fn(*mut c_void)>, ) -> Result<HandleId, NodeError>

The FFI entry point; see Executor::register_service_raw_capturing in spin.rs.

Source

fn register_service_raw_sized<const REQ_BUF: usize, const REPLY_BUF: usize>( &mut self, service_name: &str, service_type: &str, service_hash: &str, qos: QoSProfile, callback: RawServiceCallback, context: *mut c_void, ) -> Result<HandleId, NodeError>

The FFI entry point; see Executor::register_service_raw_sized in spin.rs.

Source

fn register_timer_c_capturing( &mut self, node_id: Option<NodeId>, period: TimerDuration, source: TimerClockSource, callback: unsafe extern "C" fn(*mut c_void), capture: Option<&[u8]>, capture_drop: Option<unsafe extern "C" fn(*mut c_void)>, ) -> Result<HandleId, NodeError>

The FFI entry point; see Executor::register_timer_c_capturing in spin.rs.

Source

fn register_timer_c_capturing_with_info<I>( &mut self, node_id: Option<NodeId>, period: TimerDuration, source: TimerClockSource, autostart: bool, group: Option<&str>, callback: unsafe extern "C" fn(*const I, *mut c_void), capture: Option<&[u8]>, capture_drop: Option<unsafe extern "C" fn(*mut c_void)>, ) -> Result<HandleId, NodeError>
where I: From<TimerCallInfo> + 'static,

The FFI entry point; see Executor::register_timer_c_capturing_with_info in spin.rs.

Source

unsafe fn release_action_client_raw(&mut self, entry_index: usize) -> bool

The FFI entry point; see Executor::release_action_client_raw in action.rs.

Source

unsafe fn release_action_server_raw( &mut self, handle: &ActionServerRawHandle, ) -> bool

The FFI entry point; see Executor::release_action_server_raw in action.rs.

Source

unsafe fn release_node(&mut self, node: NodeId) -> usize

The FFI entry point; see Executor::release_node in spin.rs.

Source

unsafe fn release_service(&mut self, handle: HandleId) -> bool

The FFI entry point; see Executor::release_service in spin.rs.

Source

unsafe fn release_service_client(&mut self, handle: HandleId) -> bool

The FFI entry point; see Executor::release_service_client in spin.rs.

Source

unsafe fn release_subscription(&mut self, handle: HandleId) -> bool

The FFI entry point; see Executor::release_subscription in spin.rs.

Source

unsafe fn release_timer(&mut self, handle: HandleId) -> bool

The FFI entry point; see Executor::release_timer in spin.rs.

Source

unsafe fn retarget_action_client_raw( &mut self, entry_index: usize, context: *mut c_void, ) -> bool

The FFI entry point; see Executor::retarget_action_client_raw in action.rs.

Source

unsafe fn retarget_action_server_raw( &mut self, handle: &ActionServerRawHandle, context: *mut c_void, ) -> bool

The FFI entry point; see Executor::retarget_action_server_raw in action.rs.

Source

fn set_park_primitive( &mut self, park: ParkUntilFn, ctx: *mut c_void, granularity_us: u64, )

The FFI entry point; see Executor::set_park_primitive in spin.rs.

Source

fn set_wake_hook(&mut self, hook: Option<WakeHookFn>, ctx: *mut c_void) -> bool

The FFI entry point; see Executor::set_wake_hook in spin.rs.

Source

fn wake_raw_ptr(&self) -> *mut c_void

The FFI entry point; see Executor::wake_raw_ptr in spin.rs.

Source

fn enter_spin_loop(&self)

The FFI entry point; see Executor::enter_spin_loop in spin.rs.

Source

fn exit_spin_loop(&self)

The FFI entry point; see Executor::exit_spin_loop in spin.rs.

Source

fn exec_lock(&self) -> Option<ExecLock>

The FFI entry point; see Executor::exec_lock in spin.rs.

Source

fn node_session_mut(&mut self, node_id: NodeId) -> Option<&mut CffiSession>

The FFI entry point; see Executor::node_session_mut in spin.rs.

Source

fn install_wake_signal_on_primary(&mut self)

The FFI entry point; see Executor::install_wake_signal_on_primary in spin.rs.

Source

fn set_entry_owner(&mut self, id: HandleId, node: NodeId) -> bool

The FFI entry point; see Executor::set_entry_owner in spin.rs.

Source

fn set_primary_identity(&mut self, rmw_name: &str, locator: &str)

The FFI entry point; see Executor::set_primary_identity in spin.rs.

Source

fn session_io_failures(&self) -> u32

The FFI entry point; see Executor::session_io_failures in spin.rs.

Source

fn timer_elapsed_us(&self, id: HandleId) -> Option<u64>

The FFI entry point; see Executor::timer_elapsed_us in spin.rs.

Source

fn timer_is_ready(&self, id: HandleId) -> Option<bool>

The FFI entry point; see Executor::timer_is_ready in spin.rs.

Source

fn exchange_timer_period_us( &mut self, id: HandleId, new_period_us: u64, ) -> Option<u64>

The FFI entry point; see Executor::exchange_timer_period_us in spin.rs.

Source

fn register_service_client_raw_sized_on<const REPLY_BUF: usize>( &mut self, node_id: NodeId, service_name: &str, service_type: &str, service_hash: &str, qos: QoSProfile, callback: Option<RawResponseCallback>, context: *mut c_void, ) -> Result<HandleId, NodeError>

The FFI entry point; see Executor::register_service_client_raw_sized_on in spin.rs.

Source

fn register_service_raw_sized_on<const REQ_BUF: usize, const REPLY_BUF: usize>( &mut self, node_id: NodeId, service_name: &str, service_type: &str, service_hash: &str, qos: QoSProfile, callback: RawServiceCallback, context: *mut c_void, ) -> Result<HandleId, NodeError>

The FFI entry point; see Executor::register_service_raw_sized_on in spin.rs.

Source

unsafe fn service_client_entry_mut( &mut self, entry_index: usize, ) -> Option<&mut ServiceClientRawArenaEntry<{ crate::config::DEFAULT_RX_BUF_SIZE }>>

The FFI entry point; see Executor::service_client_entry_mut in spin.rs.

Source

unsafe fn from_session_ptr(session_ptr: *mut CffiSession) -> Executor<'static>

The FFI entry point; see Executor::from_session_ptr in spin.rs.

Source

unsafe fn from_session_in( session: CffiSession, backing: &'s mut [MaybeUninit<u64>], sizing: ExecutorSizing, ) -> Self

The FFI entry point; see Executor::from_session_in in spin.rs.

Source

unsafe fn open_with_session_in( session: *mut CffiSession, backing: &'s mut [MaybeUninit<u64>], sizing: ExecutorSizing, ) -> Self

The FFI entry point; see Executor::open_with_session_in in spin.rs.

Source

unsafe fn open_with_session_slot( session: *mut CffiSession, slot: &'s mut TierExecutorBackingSlot, ) -> Self

The FFI entry point; see Executor::open_with_session_slot in spin.rs.

Source

unsafe fn open_with_session_handle_slot( handle: SessionHandle, slot: &'s mut TierExecutorBackingSlot, ) -> Self

The FFI entry point; see Executor::open_with_session_handle_slot in spin.rs.

Source

unsafe fn detach_action_client_raw(&mut self, entry_index: usize) -> bool

The FFI entry point; see Executor::detach_action_client_raw in action.rs.

Source

unsafe fn detach_action_server_raw( &mut self, handle: &ActionServerRawHandle, ) -> bool

The FFI entry point; see Executor::detach_action_server_raw in action.rs.

Source

unsafe fn detach_action_server_raw_sized<const GOAL_BUF: usize, const RESULT_BUF: usize, const FEEDBACK_BUF: usize, const MAX_GOALS: usize>( &mut self, entry_index: usize, ) -> bool

The FFI entry point; see Executor::detach_action_server_raw_sized in action.rs.

Source

unsafe fn release_action_client_raw_sized<const GOAL_BUF: usize, const RESULT_BUF: usize, const FEEDBACK_BUF: usize>( &mut self, entry_index: usize, ) -> bool

The FFI entry point; see Executor::release_action_client_raw_sized in action.rs.

Source

unsafe fn release_action_server_raw_sized<const GOAL_BUF: usize, const RESULT_BUF: usize, const FEEDBACK_BUF: usize, const MAX_GOALS: usize>( &mut self, entry_index: usize, ) -> bool

The FFI entry point; see Executor::release_action_server_raw_sized in action.rs.

Source

fn register_service_raw( &mut self, service_name: &str, service_type: &str, service_hash: &str, callback: RawServiceCallback, context: *mut c_void, ) -> Result<HandleId, NodeError>

The FFI entry point; see Executor::register_service_raw in spin.rs.

Source

fn register_service_client_raw( &mut self, service_name: &str, service_type: &str, service_hash: &str, callback: Option<RawResponseCallback>, context: *mut c_void, ) -> Result<HandleId, NodeError>

The FFI entry point; see Executor::register_service_client_raw in spin.rs.

Source

unsafe fn release_guard_condition(&mut self, handle: HandleId) -> bool

The FFI entry point; see Executor::release_guard_condition in spin.rs.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<'s> ExecutorFfi<'s> for Executor<'s>