pub struct ReadWordCommand { /* private fields */ }Expand description
Command for reading words from PLC memory.
Implementations§
Source§impl ReadWordCommand
impl ReadWordCommand
Sourcepub fn new(
destination: NodeAddress,
source: NodeAddress,
sid: u8,
area: MemoryArea,
word_address: u16,
count: u16,
) -> Result<Self>
pub fn new( destination: NodeAddress, source: NodeAddress, sid: u8, area: MemoryArea, word_address: u16, count: u16, ) -> Result<Self>
Creates a new read word command.
§Arguments
destination- Destination node addresssource- Source node addresssid- Service ID for request/response matchingarea- Memory area to read fromaddress- Starting word addresscount- Number of words to read (1 to maximum area capacity)
§Errors
Returns an error if count is 0 or exceeds the available capacity for the target area.
§Example
use omron_fins::{ReadWordCommand, MemoryArea, NodeAddress};
let cmd = ReadWordCommand::new(
NodeAddress::new(0, 10, 0),
NodeAddress::new(0, 1, 0),
0x01,
MemoryArea::DM,
100,
10,
).unwrap();Trait Implementations§
Source§impl Clone for ReadWordCommand
impl Clone for ReadWordCommand
Source§fn clone(&self) -> ReadWordCommand
fn clone(&self) -> ReadWordCommand
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 ReadWordCommand
impl RefUnwindSafe for ReadWordCommand
impl Send for ReadWordCommand
impl Sync for ReadWordCommand
impl Unpin for ReadWordCommand
impl UnsafeUnpin for ReadWordCommand
impl UnwindSafe for ReadWordCommand
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