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