#[unsafe(no_mangle)]pub unsafe extern "C" fn pamoja_lorawan_frag_session(
block_len: usize,
frag_size: u8,
out_nb_frag: *mut u16,
out_padding: *mut u8,
) -> PamojaStatusExpand description
How many fragments a block of a given size takes, and how much padding the last one needs.
§Arguments
block_len- the block’s length in bytes.frag_size- how many bytes each fragment carries.out_nb_frag- receives the fragment count.out_padding- receives the padding the last fragment carries.
§Returns
PamojaStatus::Ok on success.
§Errors
Returns PamojaStatus::InvalidArgument for a null pointer, a fragment size of zero, or
a block needing more than PAMOJA_LORAWAN_MAX_FRAGMENTS fragments.
§Safety
Both out pointers must be writable.