Function lrwn::encrypt_f_opts

source ·
pub fn encrypt_f_opts(
    nwk_s_enc_key: &AES128Key,
    a_fcnt_down: bool,
    uplink: bool,
    devaddr: &DevAddr,
    f_cnt: u32,
    data: &[u8]
) -> Result<Vec<u8>>
Expand description

Encrypt f_opts mac-command data. For uplink: Set the a_fcnt_down to false and use the f_cnt_up as f_cnt. For downlink if f_port is unset or equal to 0: Set the a_fcnt_down to false and use the n_fcnt_down as f_cnt. For downlink if f_port > 0: Set the a_fcnt_down to true and use the a_f_cnt_down as f_cnt.