Struct canadensis_data_types::uavcan::file::write_1_1::WriteRequest
source · pub struct WriteRequest {
pub offset: u64,
pub path: Path,
pub data: Unstructured,
}
Expand description
uavcan.file.Write.1.1
Size ranges from 8 to 519 bytes
Write into a remote file. The server shall place the contents of the field ‘data’ into the file pointed by ‘path’ at the offset specified by the field ‘offset’.
When writing a file, the client should repeatedly call this service with data while advancing the offset until the file is written completely. When the write sequence is completed, the client shall call the service one last time, with the offset set to the size of the file and with the data field empty, which will signal the server that the transfer is finished.
When the write operation is complete, the server shall truncate the resulting file past the specified offset.
Fields§
§offset: u64
truncated uint40
Always aligned, size 40 bits
path: Path
uavcan.file.Path.2.0
Always aligned, size ranges from 8 to 2048 bits
data: Unstructured
uavcan.primitive.Unstructured.1.0
Always aligned, size ranges from 16 to 2064 bits
Trait Implementations§
source§impl DataType for WriteRequest
impl DataType for WriteRequest
source§const EXTENT_BYTES: Option<u32> = _
const EXTENT_BYTES: Option<u32> = _
This type is delimited with an extent of 600 bytes.
source§impl Deserialize for WriteRequest
impl Deserialize for WriteRequest
source§fn deserialize(cursor: &mut ReadCursor<'_>) -> Result<Self, DeserializeError>where
Self: Sized,
fn deserialize(cursor: &mut ReadCursor<'_>) -> Result<Self, DeserializeError>where Self: Sized,
source§fn deserialize_from_bytes(bytes: &[u8]) -> Result<Self, DeserializeError>where
Self: Sized,
fn deserialize_from_bytes(bytes: &[u8]) -> Result<Self, DeserializeError>where Self: Sized,
deserialize
source§impl Serialize for WriteRequest
impl Serialize for WriteRequest
source§fn size_bits(&self) -> usize
fn size_bits(&self) -> usize
source§fn serialize(&self, cursor: &mut WriteCursor<'_>)
fn serialize(&self, cursor: &mut WriteCursor<'_>)
source§fn serialize_to_bytes(&self, bytes: &mut [u8])
fn serialize_to_bytes(&self, bytes: &mut [u8])
serialize