pub trait Bootloader {
// Required methods
fn aes_encrypt(
&mut self,
plaintext: [u8; 16],
key: [u8; 16],
) -> impl Future<Output = Result<[u8; 16], Error>> + Send;
fn get_standalone_bootloader_version_plat_micro_phy(
&mut self,
) -> impl Future<Output = Result<Response, Error>> + Send;
fn launch_standalone_bootloader(
&mut self,
mode: u8,
) -> impl Future<Output = Result<(), Error>> + Send;
fn override_current_channel(
&mut self,
channel: u8,
) -> impl Future<Output = Result<(), Error>> + Send;
fn send_bootload_message(
&mut self,
broadcast: bool,
dest_eui64: Eui64,
message: Vec<u8, { _ }>,
) -> impl Future<Output = Result<(), Error>> + Send;
}Expand description
The Bootloader trait provides an interface for the bootloader features.
Required Methods§
Sourcefn aes_encrypt(
&mut self,
plaintext: [u8; 16],
key: [u8; 16],
) -> impl Future<Output = Result<[u8; 16], Error>> + Send
fn aes_encrypt( &mut self, plaintext: [u8; 16], key: [u8; 16], ) -> impl Future<Output = Result<[u8; 16], Error>> + Send
Perform AES encryption on plaintext using key.
Sourcefn get_standalone_bootloader_version_plat_micro_phy(
&mut self,
) -> impl Future<Output = Result<Response, Error>> + Send
fn get_standalone_bootloader_version_plat_micro_phy( &mut self, ) -> impl Future<Output = Result<Response, Error>> + Send
Detects if the standalone bootloader is installed, and if so returns the installed version.
If not return 0xffff. A returned version of 0x1234 would indicate version 1.2 build 34.
Also return the node’s version of PLAT, MICRO and PHY.
Sourcefn launch_standalone_bootloader(
&mut self,
mode: u8,
) -> impl Future<Output = Result<(), Error>> + Send
fn launch_standalone_bootloader( &mut self, mode: u8, ) -> impl Future<Output = Result<(), Error>> + Send
Quits the current application and launches the standalone bootloader (if installed).
The function returns an error if the standalone bootloader is not present.
Sourcefn override_current_channel(
&mut self,
channel: u8,
) -> impl Future<Output = Result<(), Error>> + Send
fn override_current_channel( &mut self, channel: u8, ) -> impl Future<Output = Result<(), Error>> + Send
A bootloader method for selecting the radio channel.
This routine only works for sending and receiving bootload packets. Does not correctly do Zigbee stack changes.
NOTE: this API is not safe to call on multi-network devices and it will return failure when so. Use of the ember/ezspSetRadioChannel APIs are multi-network safe and are recommended instead.
Sourcefn send_bootload_message(
&mut self,
broadcast: bool,
dest_eui64: Eui64,
message: Vec<u8, { _ }>,
) -> impl Future<Output = Result<(), Error>> + Send
fn send_bootload_message( &mut self, broadcast: bool, dest_eui64: Eui64, message: Vec<u8, { _ }>, ) -> impl Future<Output = Result<(), Error>> + Send
Transmits the given bootload message to a neighboring node using a specific 802.15.4 header
that allows the EmberZNet stack as well as the bootloader to recognize the message,
but will not interfere with other Zigbee stacks.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.