pub struct Coupler { /* private fields */ }
Expand description
A Modbus TCP fieldbus coupler implementation.
Implementations§
Source§impl Coupler
impl Coupler
Sourcepub async fn disconnect(&mut self) -> Result<(), Error>
pub async fn disconnect(&mut self) -> Result<(), Error>
Disconnect the coupler.
Sourcepub fn inputs(&self) -> HashMap<Address, ChannelValue>
pub fn inputs(&self) -> HashMap<Address, ChannelValue>
Current input state.
Sourcepub fn outputs(&self) -> HashMap<Address, ChannelValue>
pub fn outputs(&self) -> HashMap<Address, ChannelValue>
Current output state.
Sourcepub fn modules(&self) -> &[ModuleType]
pub fn modules(&self) -> &[ModuleType]
List of modules.
Sourcepub fn set_output(
&mut self,
addr: &Address,
val: ChannelValue,
) -> Result<(), Error>
pub fn set_output( &mut self, addr: &Address, val: ChannelValue, ) -> Result<(), Error>
Set the value of an output channel.
Auto Trait Implementations§
impl Freeze for Coupler
impl !RefUnwindSafe for Coupler
impl Send for Coupler
impl !Sync for Coupler
impl Unpin for Coupler
impl !UnwindSafe for Coupler
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