Trait rustot::ota::data_interface::DataInterface[][src]

pub trait DataInterface {
    const PROTOCOL: Protocol;

    fn init_file_transfer(
        &self,
        file_ctx: &mut FileContext
    ) -> Result<(), OtaError>;
fn request_file_block(
        &self,
        file_ctx: &mut FileContext,
        config: &Config
    ) -> Result<(), OtaError>;
fn decode_file_block<'a>(
        &self,
        file_ctx: &mut FileContext,
        payload: &'a mut [u8]
    ) -> Result<FileBlock<'a>, OtaError>;
fn cleanup(
        &self,
        file_ctx: &mut FileContext,
        config: &Config
    ) -> Result<(), OtaError>; }

Associated Constants

Required methods

Implementations on Foreign Types

Init file transfer by subscribing to the OTA data stream topic

Request file block by publishing to the get stream topic

Decode a cbor encoded fileblock received from streaming service

Perform any cleanup operations required for data plane

Implementors