Skip to main content

pamoja_lorawan_defrag_new

Function pamoja_lorawan_defrag_new 

Source
#[unsafe(no_mangle)]
pub unsafe extern "C" fn pamoja_lorawan_defrag_new( nb_frag: u16, frag_size: u8, max_lost: u16, out_session: *mut *mut PamojaLorawanDefrag, ) -> PamojaStatus
Expand description

Opens a fragmentation session.

§Arguments

  • nb_frag - how many uncoded fragments the block was cut into.
  • frag_size - how many bytes each fragment carries.
  • max_lost - the most uncoded fragments to be able to solve for.
  • out_session - receives the session.

§Returns

PamojaStatus::Ok on success, with *out_session set to a handle the caller must release with pamoja_lorawan_defrag_free.

§Errors

Returns PamojaStatus::InvalidArgument for a session this build does not run.

§Safety

out_session must be writable.