Skip to main content

PamojaLorawanPackageCommand

Struct PamojaLorawanPackageCommand 

Source
#[repr(C)]
pub struct PamojaLorawanPackageCommand {
Show 62 fields pub port: u8, pub cid: u8, pub uplink: u8, pub package: u8, pub version: u8, pub device_time: u32, pub time_correction: i32, pub token: u8, pub ans_required: u8, pub period: u8, pub not_supported: u8, pub transmissions: u8, pub firmware: u32, pub hardware: u32, pub reboot: u32, pub image_status: u8, pub next_version: u32, pub has_next_version: u8, pub delete_version: u32, pub no_valid_image: u8, pub invalid_version: u8, pub frag_index: u8, pub mc_group_bit_mask: u8, pub nb_frag: u16, pub frag_size: u8, pub ack_reception: u8, pub frag_algo: u8, pub block_ack_delay: u8, pub padding: u8, pub descriptor: [u8; 4], pub session_cnt: u16, pub mic: [u8; 4], pub received: u16, pub missing: u8, pub mic_error: u8, pub memory_error: u8, pub no_session: u8, pub unsupported_algorithm: u8, pub unsupported_index: u8, pub wrong_descriptor: u8, pub session_replay: u8, pub all_participants: u8, pub status_item: u8, pub fragment_n: u16, pub mc_group_id: u8, pub mc_addr: u32, pub mc_key_encrypted: [u8; 16], pub min_mc_fcnt: u32, pub max_mc_fcnt: u32, pub group_mask: u8, pub nb_total_groups: u8, pub id_error: u8, pub session_time: u32, pub time_out: u8, pub periodicity: u8, pub dl_frequency_hz: u32, pub data_rate: u8, pub time_to_start: u32, pub has_time_to_start: u8, pub dr_error: u8, pub freq_error: u8, pub start_missed: u8,
}
Expand description

One command of an application layer package, whichever package it belongs to.

port says which package: PAMOJA_LORAWAN_CLOCK_PORT, PAMOJA_LORAWAN_FRAGMENT_PORT, PAMOJA_LORAWAN_MULTICAST_PORT or PAMOJA_LORAWAN_FIRMWARE_PORT. cid names the command within it, and uplink says which way it travels; together they decide which of the other fields carry anything. The rest are zero.

Fields§

§port: u8

Which package this command belongs to, as its port.

§cid: u8

Which command within that package.

§uplink: u8

1 for what a device sends, 0 for what a server sends.

§package: u8

The package identifier a version answer carries.

§version: u8

The package version it implements.

§device_time: u32

A device’s own clock, in seconds since the GPS epoch.

§time_correction: i32

The seconds to add to a device’s clock.

§token: u8

The token that pairs a clock answer with its request.

§ans_required: u8

Whether a clock request must be answered.

§period: u8

The coded period between clock requests.

§not_supported: u8

Whether a device manages its own clock periodicity.

§transmissions: u8

How many requests a resynchronization command asks for.

§firmware: u32

The firmware a device reports running.

§hardware: u32

The hardware it runs on.

§reboot: u32

The moment or the delay a reboot is set for.

§image_status: u8

What a device makes of the upgrade image it holds.

§next_version: u32

The version it would run once that image is installed.

§has_next_version: u8

Whether an image answer carried a version.

§delete_version: u32

The version a delete command names.

§no_valid_image: u8

Whether a device holds no valid image.

§invalid_version: u8

Whether the version named is not the one held.

§frag_index: u8

Which fragmentation session, 0 to 3.

§mc_group_bit_mask: u8

Which multicast groups may feed it, a bit for each.

§nb_frag: u16

How many uncoded fragments a block was cut into.

§frag_size: u8

How many bytes each fragment carries.

§ack_reception: u8

Whether a device reports the block once it has it.

§frag_algo: u8

Which fragmentation algorithm to run.

§block_ack_delay: u8

The coded spread of the delay before a device answers.

§padding: u8

How many bytes of padding the last fragment carries.

§descriptor: [u8; 4]

The four bytes a server describes a block with.

§session_cnt: u16

The session counter, which must rise for each new block.

§mic: [u8; 4]

The code over the block a device checks once it has it all.

§received: u16

How many fragments arrived, coded, uncoded and repeated.

§missing: u8

How many uncoded fragments are still missing.

§mic_error: u8

Whether the block’s code did not check out.

§memory_error: u8

Whether a session ran out of memory to defragment with.

§no_session: u8

Whether the session or group named does not exist on the device.

§unsupported_algorithm: u8

Whether the setup named a fragmentation algorithm the device does not run.

§unsupported_index: u8

Whether the setup named a session index the device does not keep.

§wrong_descriptor: u8

Whether the descriptor is not one the device accepts.

§session_replay: u8

Whether the session counter repeats one already used for that index.

§all_participants: u8

Whether every device answers a status request, or only those still missing fragments.

§status_item: u8

Whether this is one group record of a multicast status answer, which shares its identifier with the answer that names how many follow.

§fragment_n: u16

Which fragment of a session a data fragment carries, counting from one.

§mc_group_id: u8

Which multicast group, 0 to 3.

§mc_addr: u32

The address a group answers to.

§mc_key_encrypted: [u8; 16]

A group’s key, wrapped under the device’s key encryption key.

§min_mc_fcnt: u32

The first frame counter a device accepts from a group.

§max_mc_fcnt: u32

The last one, which ends the group’s life.

§group_mask: u8

Which groups a status request or answer covers, a bit for each.

§nb_total_groups: u8

How many groups a device holds in all.

§id_error: u8

Whether a device holds no group by the identifier named.

§session_time: u32

When a multicast window opens, in seconds since the GPS epoch.

§time_out: u8

How long it lasts at most, coded.

§periodicity: u8

How often a device opens a ping slot inside a Class B window.

§dl_frequency_hz: u32

Where a group listens, in hertz.

§data_rate: u8

The data rate it listens at.

§time_to_start: u32

How many seconds until a window opens.

§has_time_to_start: u8

Whether a session answer carried a start time.

§dr_error: u8

Whether the data rate named is not one the device has.

§freq_error: u8

Whether the frequency named is not one it can use.

§start_missed: u8

Whether the window was to start at a time already past.

Trait Implementations§

Source§

impl Clone for PamojaLorawanPackageCommand

Source§

fn clone(&self) -> PamojaLorawanPackageCommand

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for PamojaLorawanPackageCommand

Source§

impl Debug for PamojaLorawanPackageCommand

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for PamojaLorawanPackageCommand

Source§

fn default() -> PamojaLorawanPackageCommand

Returns the “default value” for a type. Read more
Source§

impl Eq for PamojaLorawanPackageCommand

Source§

impl PartialEq for PamojaLorawanPackageCommand

Source§

fn eq(&self, other: &PamojaLorawanPackageCommand) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for PamojaLorawanPackageCommand

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.