Skip to main content

ActionServerCore

Struct ActionServerCore 

Source
pub struct ActionServerCore<const GOAL_BUF: usize = nros_node::::executor::action_core::ActionServerCore::{constant#0}, const RESULT_BUF: usize = nros_node::::executor::action_core::ActionServerCore::{constant#1}, const FEEDBACK_BUF: usize = nros_node::::executor::action_core::ActionServerCore::{constant#2}, const MAX_GOALS: usize = 4> { /* private fields */ }
Expand description

Type-agnostic action server core handling the raw-bytes protocol.

Manages active goal tracking (GoalUuid + status), completed result storage in a fixed-size slab, and all CDR framing for the action protocol.

The typed ActionServer wraps this and adds A::Goal / A::Feedback / A::Result (de)serialization.

Trait Implementations§

Source§

impl<const GOAL_BUF: usize, const RESULT_BUF: usize, const FEEDBACK_BUF: usize, const MAX_GOALS: usize> ActionServerCoreFfi for ActionServerCore<GOAL_BUF, RESULT_BUF, FEEDBACK_BUF, MAX_GOALS>

Source§

fn from_channels( send_goal_server: <CffiSession as Session>::ServiceHandle, cancel_goal_server: <CffiSession as Session>::ServiceHandle, get_result_server: <CffiSession as Session>::ServiceHandle, feedback_publisher: <CffiSession as Session>::PublisherHandle, status_publisher: <CffiSession as Session>::PublisherHandle, ) -> ActionServerCore<GOAL_BUF, RESULT_BUF, FEEDBACK_BUF, MAX_GOALS>

The FFI entry point; see ActionServerCore::from_channels in action_core.rs.
Source§

fn try_recv_goal_request(&mut self) -> Result<Option<RawGoalRequest>, NodeError>

The FFI entry point; see ActionServerCore::try_recv_goal_request in action_core.rs.
Source§

fn goal_buffer(&self) -> &[u8] ⓘ

The FFI entry point; see ActionServerCore::goal_buffer in action_core.rs.
Source§

fn accept_goal(&mut self, goal_id: GoalUuid, seq: i64) -> Result<(), NodeError>

The FFI entry point; see ActionServerCore::accept_goal in action_core.rs.
Source§

fn reject_goal(&mut self, seq: i64) -> Result<(), NodeError>

The FFI entry point; see ActionServerCore::reject_goal in action_core.rs.
Source§

fn publish_feedback_raw( &mut self, goal_id: &GoalUuid, feedback_cdr: &[u8], ) -> Result<(), NodeError>

The FFI entry point; see ActionServerCore::publish_feedback_raw in action_core.rs.
Source§

fn set_goal_status(&mut self, goal_id: &GoalUuid, status: GoalStatusCode)

The FFI entry point; see ActionServerCore::set_goal_status in action_core.rs.
Source§

fn expire_completed_results(&mut self) -> usize

The FFI entry point; see ActionServerCore::expire_completed_results in action_core.rs.
Source§

fn completed_result_count(&self) -> usize

The FFI entry point; see ActionServerCore::completed_result_count in action_core.rs.
Source§

fn result_slab_used(&self) -> usize

The FFI entry point; see ActionServerCore::result_slab_used in action_core.rs.
Source§

fn goal_exists(&self, goal_id: &GoalUuid) -> bool

The FFI entry point; see ActionServerCore::goal_exists in action_core.rs.
Source§

fn has_completed_result(&self, goal_id: &GoalUuid) -> bool

The FFI entry point; see ActionServerCore::has_completed_result in action_core.rs.
Source§

fn complete_goal_raw( &mut self, goal_id: &GoalUuid, status: GoalStatusCode, result_cdr: &[u8], ) -> Result<(), NodeError>

The FFI entry point; see ActionServerCore::complete_goal_raw in action_core.rs.
Source§

fn register_goal_waker(&self, waker: &Waker) -> bool

The FFI entry point; see ActionServerCore::register_goal_waker in action_core.rs.
Source§

fn register_cancel_waker(&self, waker: &Waker) -> bool

The FFI entry point; see ActionServerCore::register_cancel_waker in action_core.rs.
Source§

fn register_get_result_waker(&self, waker: &Waker) -> bool

The FFI entry point; see ActionServerCore::register_get_result_waker in action_core.rs.
Source§

fn try_recv_cancel_request( &mut self, ) -> Result<Option<PendingCancelRequest>, NodeError>

The FFI entry point; see ActionServerCore::try_recv_cancel_request in action_core.rs.
Source§

fn send_cancel_reply( &mut self, sequence_number: i64, return_code: CancelResponseCode, accepted: &[GoalUuid], ) -> Result<(), NodeError>

The FFI entry point; see ActionServerCore::send_cancel_reply in action_core.rs.
Source§

fn try_handle_cancel( &mut self, cancel_handler: impl FnMut(&GoalUuid, GoalStatusCode) -> CancelResponse, ) -> Result<Option<(GoalUuid, CancelResponse)>, NodeError>

The FFI entry point; see ActionServerCore::try_handle_cancel in action_core.rs.
Source§

fn try_handle_get_result_raw( &mut self, default_result_cdr: &[u8], ) -> Result<Option<GoalUuid>, NodeError>

The FFI entry point; see ActionServerCore::try_handle_get_result_raw in action_core.rs.
Source§

fn active_goal_count(&self) -> usize

The FFI entry point; see ActionServerCore::active_goal_count in action_core.rs.
Source§

fn active_goals(&self) -> &[RawActiveGoal]

The FFI entry point; see ActionServerCore::active_goals in action_core.rs.
Source§

fn goal_stamp(&self, goal_id: &GoalUuid) -> Time

The FFI entry point; see ActionServerCore::goal_stamp in action_core.rs.
Source§

fn find_goal_status(&self, goal_id: &GoalUuid) -> GoalStatusCode

The FFI entry point; see ActionServerCore::find_goal_status in action_core.rs.
Source§

fn publish_status_array(&self) -> Result<(), NodeError>

The FFI entry point; see ActionServerCore::publish_status_array in action_core.rs.

Auto Trait Implementations§

§

impl<const GOAL_BUF: usize = nros_node::::executor::action_core::ActionServerCore::{constant#0}, const RESULT_BUF: usize = nros_node::::executor::action_core::ActionServerCore::{constant#1}, const FEEDBACK_BUF: usize = nros_node::::executor::action_core::ActionServerCore::{constant#2}, const MAX_GOALS: usize = 4> !Freeze for ActionServerCore<GOAL_BUF, RESULT_BUF, FEEDBACK_BUF, MAX_GOALS>

§

impl<const GOAL_BUF: usize = nros_node::::executor::action_core::ActionServerCore::{constant#0}, const RESULT_BUF: usize = nros_node::::executor::action_core::ActionServerCore::{constant#1}, const FEEDBACK_BUF: usize = nros_node::::executor::action_core::ActionServerCore::{constant#2}, const MAX_GOALS: usize = 4> !RefUnwindSafe for ActionServerCore<GOAL_BUF, RESULT_BUF, FEEDBACK_BUF, MAX_GOALS>

§

impl<const GOAL_BUF: usize = nros_node::::executor::action_core::ActionServerCore::{constant#0}, const RESULT_BUF: usize = nros_node::::executor::action_core::ActionServerCore::{constant#1}, const FEEDBACK_BUF: usize = nros_node::::executor::action_core::ActionServerCore::{constant#2}, const MAX_GOALS: usize = 4> !Send for ActionServerCore<GOAL_BUF, RESULT_BUF, FEEDBACK_BUF, MAX_GOALS>

§

impl<const GOAL_BUF: usize = nros_node::::executor::action_core::ActionServerCore::{constant#0}, const RESULT_BUF: usize = nros_node::::executor::action_core::ActionServerCore::{constant#1}, const FEEDBACK_BUF: usize = nros_node::::executor::action_core::ActionServerCore::{constant#2}, const MAX_GOALS: usize = 4> !Sync for ActionServerCore<GOAL_BUF, RESULT_BUF, FEEDBACK_BUF, MAX_GOALS>

§

impl<const GOAL_BUF: usize, const RESULT_BUF: usize, const FEEDBACK_BUF: usize, const MAX_GOALS: usize> Unpin for ActionServerCore<GOAL_BUF, RESULT_BUF, FEEDBACK_BUF, MAX_GOALS>

§

impl<const GOAL_BUF: usize, const RESULT_BUF: usize, const FEEDBACK_BUF: usize, const MAX_GOALS: usize> UnsafeUnpin for ActionServerCore<GOAL_BUF, RESULT_BUF, FEEDBACK_BUF, MAX_GOALS>

§

impl<const GOAL_BUF: usize, const RESULT_BUF: usize, const FEEDBACK_BUF: usize, const MAX_GOALS: usize> UnwindSafe for ActionServerCore<GOAL_BUF, RESULT_BUF, FEEDBACK_BUF, MAX_GOALS>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.