Skip to main content

ServiceMsg

Trait ServiceMsg 

Source
pub trait ServiceMsg:
    'static
    + Send
    + Sync {
    type Request: TypeSupport;
    type Response: TypeSupport;

    // Required method
    fn type_name() -> &'static str;

    // Provided methods
    fn type_support() -> *const c_void { ... }
    fn type_hash() -> Result<String, Error> { ... }
}
Expand description

Trait for ROS2 service message types.

Services consist of a request and response message pair.

Required Associated Types§

Source

type Request: TypeSupport

The request message type.

Source

type Response: TypeSupport

The response message type.

Required Methods§

Source

fn type_name() -> &'static str

Returns the type name in DDS format.

Example: "example_interfaces::srv::dds_::AddTwoInts_"

This is used for Zenoh key expressions and type matching.

Provided Methods§

Source

fn type_support() -> *const c_void

Returns an opaque pointer to the service type support structure.

Source

fn type_hash() -> Result<String, Error>

Returns the RIHS01 type hash for this message type.

§Implementation
  • For RCL: Returns empty string (hash is handled by rosidl typesupport)
  • For Zenoh: Computes hash from TypeDescription

The hash format is: RIHS01_<64_character_hex_sha256>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl ServiceMsg for AddDiagnostics

Source§

impl ServiceMsg for SelfTest

Source§

impl ServiceMsg for AddTwoInts

Source§

impl ServiceMsg for oxidros_msg::common_interfaces::example_interfaces::srv::set_bool::SetBool

Source§

impl ServiceMsg for oxidros_msg::common_interfaces::example_interfaces::srv::trigger::Trigger

Source§

impl ServiceMsg for GetMap

Source§

impl ServiceMsg for GetPlan

Source§

impl ServiceMsg for LoadMap

Source§

impl ServiceMsg for SetMap

Source§

impl ServiceMsg for SetCameraInfo

Source§

impl ServiceMsg for Empty

Source§

impl ServiceMsg for oxidros_msg::common_interfaces::std_srvs::srv::set_bool::SetBool

Source§

impl ServiceMsg for oxidros_msg::common_interfaces::std_srvs::srv::trigger::Trigger

Source§

impl ServiceMsg for GetInteractiveMarkers

Source§

impl ServiceMsg for CancelGoal

Source§

impl ServiceMsg for ListNodes

Source§

impl ServiceMsg for LoadNode

Source§

impl ServiceMsg for UnloadNode

Source§

impl ServiceMsg for ChangeState

Source§

impl ServiceMsg for GetAvailableStates

Source§

impl ServiceMsg for GetAvailableTransitions

Source§

impl ServiceMsg for GetState

Source§

impl ServiceMsg for DescribeParameters

Source§

impl ServiceMsg for GetLoggerLevels

Source§

impl ServiceMsg for GetParameterTypes

Source§

impl ServiceMsg for GetParameters

Source§

impl ServiceMsg for ListParameters

Source§

impl ServiceMsg for SetLoggerLevels

Source§

impl ServiceMsg for SetParameters

Source§

impl ServiceMsg for SetParametersAtomically

Source§

impl ServiceMsg for GetTypeDescription