#[unsafe(no_mangle)]pub unsafe extern "C" fn pamoja_lorawan_frag_parity_line(
coded: u16,
nb_frag: u16,
out_line: *mut u8,
line_len: usize,
out_ones: *mut usize,
) -> PamojaStatusExpand description
Builds one row of the parity matrix: which uncoded fragments a coded one is made of.
§Arguments
coded- which coded fragment, counting from one past the uncoded ones.nb_frag- how many uncoded fragments the block was cut into.out_line- receives a bit for every uncoded fragment, little end first.line_len- how many bytes that buffer holds, at leastnb_fragbits’ worth.out_ones- receives how many fragments the coded one is made of.
§Returns
PamojaStatus::Ok on success.
§Errors
Returns PamojaStatus::InvalidArgument for a null pointer, a session of no fragments,
or a buffer too small.
§Safety
out_line must point to line_len writable bytes and out_ones must be writable.