Skip to main content

HostLinkClient

Struct HostLinkClient 

Source
pub struct HostLinkClient { /* private fields */ }

Implementations§

Source§

impl HostLinkClient

Source

pub fn new(options: HostLinkConnectionOptions) -> Self

Source

pub async fn connect( options: HostLinkConnectionOptions, ) -> Result<Self, HostLinkError>

Source

pub async fn open(&self) -> Result<(), HostLinkError>

Source

pub async fn close(&self) -> Result<(), HostLinkError>

Source

pub async fn is_open(&self) -> bool

Source

pub async fn timeout(&self) -> Duration

Source

pub async fn set_timeout(&self, timeout: Duration)

Source

pub async fn append_lf_on_send(&self) -> bool

Source

pub async fn set_append_lf_on_send(&self, value: bool)

Source

pub async fn set_trace_hook(&self, trace_hook: Option<TraceHook>)

Source

pub async fn send_raw(&self, body: &str) -> Result<String, HostLinkError>

Source

pub async fn change_mode(&self, mode: KvPlcMode) -> Result<(), HostLinkError>

Source

pub async fn clear_error(&self) -> Result<(), HostLinkError>

Source

pub async fn check_error_no(&self) -> Result<String, HostLinkError>

Source

pub async fn query_model(&self) -> Result<KvModelInfo, HostLinkError>

Source

pub async fn read_device_range_catalog( &self, ) -> Result<KvDeviceRangeCatalog, HostLinkError>

Source

pub async fn confirm_operating_mode(&self) -> Result<KvPlcMode, HostLinkError>

Source

pub async fn set_time( &self, value: Option<HostLinkClock>, ) -> Result<(), HostLinkError>

Source

pub async fn forced_set(&self, device: &str) -> Result<(), HostLinkError>

Source

pub async fn forced_reset(&self, device: &str) -> Result<(), HostLinkError>

Source

pub async fn read( &self, device: &str, data_format: Option<&str>, ) -> Result<Vec<String>, HostLinkError>

Source

pub async fn read_consecutive( &self, device: &str, count: usize, data_format: Option<&str>, ) -> Result<Vec<String>, HostLinkError>

Source

pub async fn write<T: HostLinkPayloadValue>( &self, device: &str, value: T, data_format: Option<&str>, ) -> Result<(), HostLinkError>

Source

pub async fn write_consecutive<T: HostLinkPayloadValue>( &self, device: &str, values: &[T], data_format: Option<&str>, ) -> Result<(), HostLinkError>

Source

pub async fn register_monitor_bits<S: AsRef<str>>( &self, devices: &[S], ) -> Result<(), HostLinkError>

Source

pub async fn register_monitor_words<S: AsRef<str>>( &self, devices: &[S], ) -> Result<(), HostLinkError>

Source

pub async fn read_monitor_bits(&self) -> Result<Vec<String>, HostLinkError>

Source

pub async fn read_monitor_words(&self) -> Result<Vec<String>, HostLinkError>

Source

pub async fn forced_set_consecutive( &self, device: &str, count: usize, ) -> Result<(), HostLinkError>

Source

pub async fn forced_reset_consecutive( &self, device: &str, count: usize, ) -> Result<(), HostLinkError>

Source

pub async fn read_consecutive_legacy( &self, device: &str, count: usize, data_format: Option<&str>, ) -> Result<Vec<String>, HostLinkError>

Source

pub async fn write_consecutive_legacy<T: HostLinkPayloadValue>( &self, device: &str, values: &[T], data_format: Option<&str>, ) -> Result<(), HostLinkError>

Source

pub async fn write_set_value<T: HostLinkPayloadValue>( &self, device: &str, value: T, data_format: Option<&str>, ) -> Result<(), HostLinkError>

Source

pub async fn write_set_value_consecutive<T: HostLinkPayloadValue>( &self, device: &str, values: &[T], data_format: Option<&str>, ) -> Result<(), HostLinkError>

Source

pub async fn switch_bank(&self, bank_no: u8) -> Result<(), HostLinkError>

Source

pub async fn read_expansion_unit_buffer( &self, unit_no: u8, address: u32, count: usize, data_format: Option<&str>, ) -> Result<Vec<String>, HostLinkError>

Source

pub async fn write_expansion_unit_buffer<T: HostLinkPayloadValue>( &self, unit_no: u8, address: u32, values: &[T], data_format: Option<&str>, ) -> Result<(), HostLinkError>

Source

pub async fn read_comments( &self, device: &str, strip_padding: bool, ) -> Result<String, HostLinkError>

Source

pub async fn read_typed( &self, device: &str, dtype: &str, ) -> Result<HostLinkValue, HostLinkError>

Source

pub async fn read_timer_counter( &self, device: &str, ) -> Result<TimerCounterValue, HostLinkError>

Source

pub async fn read_timer( &self, device: &str, ) -> Result<TimerCounterValue, HostLinkError>

Source

pub async fn read_counter( &self, device: &str, ) -> Result<TimerCounterValue, HostLinkError>

Source

pub async fn write_typed<T: HostLinkPayloadValue>( &self, device: &str, dtype: &str, value: T, ) -> Result<(), HostLinkError>

Source

pub async fn read_named<S: AsRef<str>>( &self, addresses: &[S], ) -> Result<NamedSnapshot, HostLinkError>

Source

pub async fn write_bit_in_word( &self, device: &str, bit_index: u8, value: bool, ) -> Result<(), HostLinkError>

Trait Implementations§

Source§

impl Clone for HostLinkClient

Source§

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)

Performs copy-assignment from source. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.