Skip to main content

pamoja_ros2_entity_key

Function pamoja_ros2_entity_key 

Source
#[unsafe(no_mangle)]
pub unsafe extern "C" fn pamoja_ros2_entity_key( domain_id: u32, fqn: *const c_char, ros_type: *const c_char, hash: PamojaTypeHash, ) -> *mut PamojaString
Expand description

Builds the Zenoh key an rmw_zenoh peer publishes an entity on.

§Arguments

  • domain_id - the ROS 2 domain.
  • fqn - the fully qualified entity name, as null-terminated UTF-8.
  • ros_type - the interface type as package/namespace/Type, as null-terminated UTF-8.
  • hash - the message type hash.

§Returns

A key such as 0/chatter/std_msgs::msg::dds_::String_/RIHS01_..., which the caller must release with pamoja_string_free, or null if the name is not fully qualified, the type is not a valid interface type, or either string is null.

§Safety

fqn and ros_type must be valid null-terminated UTF-8 strings for the duration of the call, or null.