Skip to main content

pamoja_ros2_twist_from_cdr

Function pamoja_ros2_twist_from_cdr 

Source
#[unsafe(no_mangle)]
pub unsafe extern "C" fn pamoja_ros2_twist_from_cdr( data: *const u8, data_len: usize, out_twist: *mut PamojaRos2Twist, ) -> PamojaStatus
Expand description

Decodes a twist from its CDR representation.

§Arguments

  • data - the encoded bytes.
  • data_len - the length of data.
  • out_twist - receives the decoded command.

§Returns

PamojaStatus::Ok once decoded, or PamojaStatus::InvalidArgument if the bytes are not a well-formed twist or out_twist is null.

§Safety

data must point to at least data_len readable bytes or be null when that length is 0, and out_twist must be writable.