pub struct SubRequestParams {
pub file_number: u16,
pub record_number: u16,
pub record_length: u16,
pub record_data: Option<Vec<u16, MAX_PDU_DATA_LEN>>,
}Expand description
Parameters for a single file record sub-request.
Fields§
§file_number: u16The file number to be read/written (0x0001 to 0xFFFF). In Modbus, files are logical groupings of records.
record_number: u16The starting record number within the file (0x0000 to 0x270F). Each record is typically 2 bytes (one 16-bit register).
record_length: u16The length of the record in number of 16-bit registers.
For Read (FC 0x14), this is the amount to retrieve.
For Write (FC 0x15), this must match the length of record_data.
record_data: Option<Vec<u16, MAX_PDU_DATA_LEN>>The actual register values to be written to the file.
This field is Some for Write File Record (FC 0x15) and None for Read File Record (FC 0x14).
The data is stored in a heapless::Vec to ensure no_std compatibility.
Trait Implementations§
Source§impl Clone for SubRequestParams
impl Clone for SubRequestParams
Source§fn clone(&self) -> SubRequestParams
fn clone(&self) -> SubRequestParams
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SubRequestParams
impl Debug for SubRequestParams
Source§impl PartialEq for SubRequestParams
impl PartialEq for SubRequestParams
impl StructuralPartialEq for SubRequestParams
Auto Trait Implementations§
impl Freeze for SubRequestParams
impl RefUnwindSafe for SubRequestParams
impl Send for SubRequestParams
impl Sync for SubRequestParams
impl Unpin for SubRequestParams
impl UnsafeUnpin for SubRequestParams
impl UnwindSafe for SubRequestParams
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more