pub struct MultipleReadCommand { /* private fields */ }Expand description
Command for reading from multiple memory areas.
Implementations§
Source§impl MultipleReadCommand
impl MultipleReadCommand
Sourcepub fn new(
destination: NodeAddress,
source: NodeAddress,
sid: u8,
specs: Vec<MultiReadSpec>,
) -> Result<Self>
pub fn new( destination: NodeAddress, source: NodeAddress, sid: u8, specs: Vec<MultiReadSpec>, ) -> Result<Self>
Creates a new multiple memory area read command.
§Arguments
destination- Destination node addresssource- Source node addresssid- Service ID for request/response matchingspecs- List of read specifications
§Errors
Returns an error if specs is empty, any bit area doesn’t support bit access, or any bit position is > 15.
§Example
use omron_fins::{MultipleReadCommand, MultiReadSpec, MemoryArea, NodeAddress};
let cmd = MultipleReadCommand::new(
NodeAddress::new(0, 10, 0),
NodeAddress::new(0, 1, 0),
0x01,
vec![
MultiReadSpec { area: MemoryArea::DM, address: 100, bit: None },
MultiReadSpec { area: MemoryArea::DM, address: 200, bit: None },
],
).unwrap();Trait Implementations§
Source§impl Clone for MultipleReadCommand
impl Clone for MultipleReadCommand
Source§fn clone(&self) -> MultipleReadCommand
fn clone(&self) -> MultipleReadCommand
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 moreAuto Trait Implementations§
impl Freeze for MultipleReadCommand
impl RefUnwindSafe for MultipleReadCommand
impl Send for MultipleReadCommand
impl Sync for MultipleReadCommand
impl Unpin for MultipleReadCommand
impl UnsafeUnpin for MultipleReadCommand
impl UnwindSafe for MultipleReadCommand
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