pub struct HostLinkClient { /* private fields */ }Implementations§
Source§impl HostLinkClient
impl HostLinkClient
pub fn new(options: HostLinkConnectionOptions) -> Self
pub async fn connect( options: HostLinkConnectionOptions, ) -> Result<Self, HostLinkError>
pub async fn open(&self) -> Result<(), HostLinkError>
pub async fn close(&self) -> Result<(), HostLinkError>
pub async fn is_open(&self) -> bool
pub async fn timeout(&self) -> Duration
pub async fn set_timeout(&self, timeout: Duration)
pub async fn append_lf_on_send(&self) -> bool
pub async fn set_append_lf_on_send(&self, value: bool)
pub async fn set_trace_hook(&self, trace_hook: Option<TraceHook>)
pub async fn send_raw(&self, body: &str) -> Result<String, HostLinkError>
pub async fn change_mode(&self, mode: KvPlcMode) -> Result<(), HostLinkError>
pub async fn clear_error(&self) -> Result<(), HostLinkError>
pub async fn check_error_no(&self) -> Result<String, HostLinkError>
pub async fn query_model(&self) -> Result<KvModelInfo, HostLinkError>
pub async fn read_device_range_catalog( &self, ) -> Result<KvDeviceRangeCatalog, HostLinkError>
pub async fn confirm_operating_mode(&self) -> Result<KvPlcMode, HostLinkError>
pub async fn set_time( &self, value: Option<HostLinkClock>, ) -> Result<(), HostLinkError>
pub async fn forced_set(&self, device: &str) -> Result<(), HostLinkError>
pub async fn forced_reset(&self, device: &str) -> Result<(), HostLinkError>
pub async fn read( &self, device: &str, data_format: Option<&str>, ) -> Result<Vec<String>, HostLinkError>
pub async fn read_consecutive( &self, device: &str, count: usize, data_format: Option<&str>, ) -> Result<Vec<String>, HostLinkError>
pub async fn write<T: HostLinkPayloadValue>( &self, device: &str, value: T, data_format: Option<&str>, ) -> Result<(), HostLinkError>
pub async fn write_consecutive<T: HostLinkPayloadValue>( &self, device: &str, values: &[T], data_format: Option<&str>, ) -> Result<(), HostLinkError>
pub async fn register_monitor_bits<S: AsRef<str>>( &self, devices: &[S], ) -> Result<(), HostLinkError>
pub async fn register_monitor_words<S: AsRef<str>>( &self, devices: &[S], ) -> Result<(), HostLinkError>
pub async fn read_monitor_bits(&self) -> Result<Vec<String>, HostLinkError>
pub async fn read_monitor_words(&self) -> Result<Vec<String>, HostLinkError>
pub async fn forced_set_consecutive( &self, device: &str, count: usize, ) -> Result<(), HostLinkError>
pub async fn forced_reset_consecutive( &self, device: &str, count: usize, ) -> Result<(), HostLinkError>
pub async fn read_consecutive_legacy( &self, device: &str, count: usize, data_format: Option<&str>, ) -> Result<Vec<String>, HostLinkError>
pub async fn write_consecutive_legacy<T: HostLinkPayloadValue>( &self, device: &str, values: &[T], data_format: Option<&str>, ) -> Result<(), HostLinkError>
pub async fn write_set_value<T: HostLinkPayloadValue>( &self, device: &str, value: T, data_format: Option<&str>, ) -> Result<(), HostLinkError>
pub async fn write_set_value_consecutive<T: HostLinkPayloadValue>( &self, device: &str, values: &[T], data_format: Option<&str>, ) -> Result<(), HostLinkError>
pub async fn switch_bank(&self, bank_no: u8) -> Result<(), HostLinkError>
pub async fn read_expansion_unit_buffer( &self, unit_no: u8, address: u32, count: usize, data_format: Option<&str>, ) -> Result<Vec<String>, HostLinkError>
pub async fn write_expansion_unit_buffer<T: HostLinkPayloadValue>( &self, unit_no: u8, address: u32, values: &[T], data_format: Option<&str>, ) -> Result<(), HostLinkError>
pub async fn read_comments( &self, device: &str, strip_padding: bool, ) -> Result<String, HostLinkError>
pub async fn read_typed( &self, device: &str, dtype: &str, ) -> Result<HostLinkValue, HostLinkError>
pub async fn read_timer_counter( &self, device: &str, ) -> Result<TimerCounterValue, HostLinkError>
pub async fn read_timer( &self, device: &str, ) -> Result<TimerCounterValue, HostLinkError>
pub async fn read_counter( &self, device: &str, ) -> Result<TimerCounterValue, HostLinkError>
pub async fn write_typed<T: HostLinkPayloadValue>( &self, device: &str, dtype: &str, value: T, ) -> Result<(), HostLinkError>
pub async fn read_named<S: AsRef<str>>( &self, addresses: &[S], ) -> Result<NamedSnapshot, HostLinkError>
pub async fn write_bit_in_word( &self, device: &str, bit_index: u8, value: bool, ) -> Result<(), HostLinkError>
Trait Implementations§
Source§impl Clone for HostLinkClient
impl Clone for HostLinkClient
Source§fn clone(&self) -> HostLinkClient
fn clone(&self) -> HostLinkClient
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 HostLinkClient
impl !RefUnwindSafe for HostLinkClient
impl Send for HostLinkClient
impl Sync for HostLinkClient
impl Unpin for HostLinkClient
impl UnsafeUnpin for HostLinkClient
impl !UnwindSafe for HostLinkClient
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