[−][src]Struct ur20_modbus::Coupler
A Modbus TCP fieldbus coupler implementation.
Methods
impl Coupler
[src]
pub async fn connect(addr: SocketAddr) -> Result<Coupler, Error>
[src]
Connect to the coupler.
pub async fn disconnect<'_>(&'_ mut self) -> Result<(), Error>
[src]
Disconnect the coupler.
pub async fn id<'_>(&'_ mut self) -> Result<String, Error>
[src]
Read the actual coupler ID.
pub fn inputs(&self) -> HashMap<Address, ChannelValue>
[src]
Current input state.
pub fn outputs(&self) -> HashMap<Address, ChannelValue>
[src]
Current output state.
pub fn modules(&self) -> &[ModuleType]
[src]
List of modules.
pub fn set_output(
&mut self,
addr: &Address,
val: ChannelValue
) -> Result<(), Error>
[src]
&mut self,
addr: &Address,
val: ChannelValue
) -> Result<(), Error>
Set the value of an output channel.
pub fn binary_input_data(&mut self) -> HashMap<Address, Option<Vec<u8>>>
[src]
Read binary input data.
pub async fn tick<'_>(&'_ mut self) -> Result<(), Error>
[src]
Run an I/O cycle. This reads all process input registers and writes to process output registers.
Auto Trait Implementations
impl !RefUnwindSafe for Coupler
impl !Send for Coupler
impl !Sync for Coupler
impl Unpin for Coupler
impl !UnwindSafe for Coupler
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,