pub struct Client { /* private fields */ }Expand description
Cloneable client handle that serializes operations through one worker task.
Implementations§
Source§impl Client
impl Client
Sourcepub async fn connect(addr: &str) -> Result<Self>
pub async fn connect(addr: &str) -> Result<Self>
Connects directly to a controller and starts the client worker.
Sourcepub async fn with_route_path(addr: &str, route: RoutePath) -> Result<Self>
pub async fn with_route_path(addr: &str, route: RoutePath) -> Result<Self>
Connects using an ordered route and starts the client worker.
Sourcepub fn from_eip_client(client: EipClient) -> Result<Self>
pub fn from_eip_client(client: EipClient) -> Result<Self>
Takes ownership of an existing connected client and starts its worker.
Sourcepub fn events(&self) -> Receiver<ConnectionEvent>
pub fn events(&self) -> Receiver<ConnectionEvent>
Subscribes to connection lifecycle events.
Sourcepub fn with_retry(&self, policy: RetryPolicy) -> RetryClient
pub fn with_retry(&self, policy: RetryPolicy) -> RetryClient
Returns a retrying view of this client.
Sourcepub async fn write_tag(&self, tag_name: &str, value: PlcValue) -> Result<()>
pub async fn write_tag(&self, tag_name: &str, value: PlcValue) -> Result<()>
Writes one symbolic tag.
Sourcepub async fn write_string_tag(&self, tag_name: &str, value: &str) -> Result<()>
pub async fn write_string_tag(&self, tag_name: &str, value: &str) -> Result<()>
Writes a built-in or custom Logix string using handle discovery.
Sourcepub async fn write_udt_member(
&self,
udt_tag_name: &str,
member_name: &str,
value: PlcValue,
) -> Result<()>
pub async fn write_udt_member( &self, udt_tag_name: &str, member_name: &str, value: PlcValue, ) -> Result<()>
Writes one named member of a UDT tag.
Sourcepub async fn write_udt_array_member(
&self,
udt_array_element_path: &str,
member_name: &str,
value: PlcValue,
) -> Result<()>
pub async fn write_udt_array_member( &self, udt_array_element_path: &str, member_name: &str, value: PlcValue, ) -> Result<()>
Writes one member of a UDT array element.
Sourcepub async fn execute_batch(
&self,
operations: &[BatchOperation],
) -> Result<Vec<BatchResult>>
pub async fn execute_batch( &self, operations: &[BatchOperation], ) -> Result<Vec<BatchResult>>
Executes mixed read and write operations using batch packet grouping.
Reads several tags and preserves per-tag errors.
Writes several tags and preserves per-tag errors.
Sourcepub async fn check_health(&self) -> Result<bool>
pub async fn check_health(&self) -> Result<bool>
Performs an active controller health check.
Sourcepub async fn get_diagnostics_snapshot(&self) -> Result<DiagnosticsSnapshot>
pub async fn get_diagnostics_snapshot(&self) -> Result<DiagnosticsSnapshot>
Returns a passive diagnostics snapshot from recorded operation state.
Sourcepub async fn get_diagnostics_snapshot_detailed(
&self,
) -> Result<DiagnosticsSnapshot>
pub async fn get_diagnostics_snapshot_detailed( &self, ) -> Result<DiagnosticsSnapshot>
Performs a health check and returns a verified diagnostics snapshot.