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