#[repr(C)]pub struct PamojaLorawanMacCommand {Show 71 fields
pub cid: u8,
pub direction: PamojaLorawanDirection,
pub margin: u8,
pub gateways: u8,
pub data_rate: u8,
pub tx_power: u8,
pub channel_mask: u16,
pub mask_control: u8,
pub transmissions: u8,
pub power_ack: u8,
pub data_rate_ack: u8,
pub channel_mask_ack: u8,
pub max_duty_cycle: u8,
pub rx1_offset: u8,
pub rx2_data_rate: u8,
pub frequency_hz: u32,
pub rx1_offset_ack: u8,
pub rx2_data_rate_ack: u8,
pub channel_ack: u8,
pub battery: u8,
pub snr_margin: i8,
pub index: u8,
pub max_data_rate: u8,
pub min_data_rate: u8,
pub data_rate_range_ok: u8,
pub frequency_ok: u8,
pub delay: u8,
pub max_eirp: u8,
pub uplink_dwell: u8,
pub downlink_dwell: u8,
pub uplink_frequency_exists: u8,
pub seconds: u32,
pub fraction: u8,
pub enabled: u8,
pub cad_periodicity: u8,
pub default_channel_index: u8,
pub second_channel_index: u8,
pub second_channel_data_rate: u8,
pub second_channel_ack_offset: u8,
pub cad_periodicity_ack: u8,
pub default_channel_index_ack: u8,
pub second_channel_index_ack: u8,
pub second_channel_data_rate_ack: u8,
pub second_channel_ack_offset_ack: u8,
pub second_channel_frequency_ack: u8,
pub relay_mode: u8,
pub smart_enable_level: u8,
pub back_off: u8,
pub action: u8,
pub eui_len: u8,
pub eui: [u8; 16],
pub combined_rules_ack: u8,
pub eui_len_ack: u8,
pub action_ack: u8,
pub reload_rate: u8,
pub bucket_size: u8,
pub dev_addr: u32,
pub wfcnt: u32,
pub root_wor_s_key: [u8; 16],
pub index_ack: u8,
pub reset_limit_counters: u8,
pub join_request_reload_rate: u8,
pub notify_reload_rate: u8,
pub global_uplink_reload_rate: u8,
pub overall_reload_rate: u8,
pub join_request_bucket_size: u8,
pub notify_bucket_size: u8,
pub global_uplink_bucket_size: u8,
pub overall_bucket_size: u8,
pub rssi_dbm: i16,
pub snr_db: i8,
}Expand description
One command, with the fields of whichever command it is.
cid names the command and direction says which way it travels; together they decide
which of the other fields carry anything. The rest are zero.
Fields§
§cid: u8Which command this is.
direction: PamojaLorawanDirectionWhich way it travels.
margin: u8How far above the floor a link check arrived, in dB.
gateways: u8How many gateways heard it.
data_rate: u8The data rate a network asks a device to use.
tx_power: u8The transmit power it may use, as a ceiling.
channel_mask: u16Which channels may carry an uplink.
mask_control: u8Which block of sixteen channels that mask applies to.
transmissions: u8How many times to send an unconfirmed uplink.
power_ack: u8Whether the power was set, 1 for yes.
data_rate_ack: u8Whether the data rate was set.
channel_mask_ack: u8Whether the channel mask was usable.
max_duty_cycle: u8The share of the air a device is held to, as one over two to this.
rx1_offset: u8How far the first receive window sits below the uplink rate.
rx2_data_rate: u8The rate of the second receive window.
frequency_hz: u32A frequency in hertz, for the windows and the channel commands.
rx1_offset_ack: u8Whether the window offset was in range.
rx2_data_rate_ack: u8Whether the window rate was known.
channel_ack: u8Whether the frequency was usable.
battery: u8A device battery level: 0 on external power, 255 when it cannot tell.
snr_margin: i8The signal-to-noise ratio of the last request, in dB.
index: u8Which channel a channel command names.
max_data_rate: u8The fastest rate allowed on it.
min_data_rate: u8The slowest rate allowed on it.
data_rate_range_ok: u8Whether the device can run that range of rates.
frequency_ok: u8Whether its radio can reach that frequency.
delay: u8How long a device waits before its first receive window, as the command codes it.
max_eirp: u8The coded transmit power ceiling a region imposes.
uplink_dwell: u8Whether an uplink is held to 400 ms of air time.
downlink_dwell: u8Whether a downlink is.
uplink_frequency_exists: u8Whether the channel already had an uplink frequency to pair a downlink with.
seconds: u32Seconds since the GPS epoch.
fraction: u8The fraction of that second, in steps of one part in 256.
enabled: u8Whether a relay runs.
cad_periodicity: u8How often a relay scans, as TS011-1.0.1 table 18 codes it.
default_channel_index: u8Which of the region’s relay channels is a relay’s default one.
second_channel_index: u8Whether a relay configuration sets a second channel, 1 for yes.
second_channel_data_rate: u8The second channel’s data rate; its frequency is the frequency field.
second_channel_ack_offset: u8How far above its frequency the second channel is acknowledged, as table 35 codes it.
cad_periodicity_ack: u8Whether the scan period was valid.
default_channel_index_ack: u8Whether the default channel was valid.
second_channel_index_ack: u8Whether the second channel index was valid.
second_channel_data_rate_ack: u8Whether the second channel’s data rate was valid.
second_channel_ack_offset_ack: u8Whether its acknowledgment offset was valid.
second_channel_frequency_ack: u8Whether its frequency was valid.
relay_mode: u8How an end device uses a relay, as TS011-1.0.1 table 40 codes it.
smart_enable_level: u8How many unanswered uplinks turn relaying on, as table 41 codes it.
back_off: u8How many WOR frames without an acknowledgment before an uplink goes anyway.
action: u8What a join filter rule does, or whether a trusted end device is read or removed.
eui_len: u8How many leading bytes of JoinEUI and DevEUI a join filter rule matches.
eui: [u8; 16]Those bytes, most significant first, with the rest zero.
combined_rules_ack: u8Whether a join filter rule was one to create, change or remove.
eui_len_ack: u8Whether its length was valid.
action_ack: u8Whether its action was valid.
reload_rate: u8Tokens a trusted end device earns an hour, 63 for no limit.
bucket_size: u8Its bucket size multiplier, as TS011-1.0.1 table 55 codes it.
dev_addr: u32An end device address a relay command names.
wfcnt: u32A wake-on-radio frame counter.
root_wor_s_key: [u8; 16]An end device’s root relay session key.
index_ack: u8Whether a trusted list entry was in use.
reset_limit_counters: u8What a forwarding limit command does to a relay’s token counters, as table 63 codes it.
join_request_reload_rate: u8Join requests a relay forwards an hour, 127 for no limit.
notify_reload_rate: u8New end device notifications a relay sends an hour.
global_uplink_reload_rate: u8Uplinks a relay forwards an hour across every trusted end device.
overall_reload_rate: u8Every message a relay sends an hour.
join_request_bucket_size: u8The join request bucket size multiplier.
notify_bucket_size: u8The notification bucket size multiplier.
global_uplink_bucket_size: u8The global uplink bucket size multiplier.
overall_bucket_size: u8The overall bucket size multiplier.
rssi_dbm: i16The signal strength of a WOR frame a relay could not verify, in dBm.
snr_db: i8Its signal-to-noise ratio, in dB.
Trait Implementations§
Source§impl Clone for PamojaLorawanMacCommand
impl Clone for PamojaLorawanMacCommand
Source§fn clone(&self) -> PamojaLorawanMacCommand
fn clone(&self) -> PamojaLorawanMacCommand
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more