pub struct OpcDaClient<C: ServerConnector + 'static = ComConnector> {
pub worker: ComWorker<C>,
/* private fields */
}Expand description
Concrete OpcProvider implementation for Windows OPC DA.
Uses native windows-rs COM interop via the internal opc_da module.
Fields§
§worker: ComWorker<C>Implementations§
Trait Implementations§
Source§impl Default for OpcDaClient<ComConnector>
Returns the default OpcDaClient using native COM settings.
impl Default for OpcDaClient<ComConnector>
Returns the default OpcDaClient using native COM settings.
§Panics
Panics if the background COM worker thread cannot be started or COM
Multi-Threaded Apartment (MTA) initialization fails on the worker thread.
Use OpcDaClient::new for fallible construction.
Source§impl<C: ServerConnector + 'static> OpcProvider for OpcDaClient<C>
impl<C: ServerConnector + 'static> OpcProvider for OpcDaClient<C>
Source§fn list_servers<'life0, 'life1, 'async_trait>(
&'life0 self,
host: &'life1 str,
) -> Pin<Box<dyn Future<Output = OpcResult<Vec<String>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn list_servers<'life0, 'life1, 'async_trait>(
&'life0 self,
host: &'life1 str,
) -> Pin<Box<dyn Future<Output = OpcResult<Vec<String>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
List available OPC DA servers on the given host. Read more
Browse tags recursively, pushing discoveries to
tags_sink. Read moreSource§fn browse_capabilities<'life0, 'life1, 'async_trait>(
&'life0 self,
server: &'life1 str,
) -> Pin<Box<dyn Future<Output = OpcResult<BrowseCapabilities>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn browse_capabilities<'life0, 'life1, 'async_trait>(
&'life0 self,
server: &'life1 str,
) -> Pin<Box<dyn Future<Output = OpcResult<BrowseCapabilities>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Return the native browse capabilities of an OPC DA server. Read more
Source§fn open_browse_session<'life0, 'life1, 'async_trait>(
&'life0 self,
server: &'life1 str,
) -> Pin<Box<dyn Future<Output = OpcResult<BrowseSessionToken>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn open_browse_session<'life0, 'life1, 'async_trait>(
&'life0 self,
server: &'life1 str,
) -> Pin<Box<dyn Future<Output = OpcResult<BrowseSessionToken>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Open an isolated native browse session with its own server connection. Read more
Source§fn browse_page<'life0, 'life1, 'async_trait>(
&'life0 self,
session: &'life1 BrowseSessionToken,
request: BrowsePageRequest,
) -> Pin<Box<dyn Future<Output = OpcResult<BrowsePage>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn browse_page<'life0, 'life1, 'async_trait>(
&'life0 self,
session: &'life1 BrowseSessionToken,
request: BrowsePageRequest,
) -> Pin<Box<dyn Future<Output = OpcResult<BrowsePage>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Browse one bounded level of an open native browse session. Read more
Source§fn close_browse_session<'life0, 'life1, 'async_trait>(
&'life0 self,
session: &'life1 BrowseSessionToken,
) -> Pin<Box<dyn Future<Output = OpcResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn close_browse_session<'life0, 'life1, 'async_trait>(
&'life0 self,
session: &'life1 BrowseSessionToken,
) -> Pin<Box<dyn Future<Output = OpcResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Explicitly close a native browse session and release its server connection. Read more
Source§fn start_inventory<'life0, 'life1, 'async_trait>(
&'life0 self,
server: &'life1 str,
options: InventoryOptions,
) -> Pin<Box<dyn Future<Output = OpcResult<InventoryStream>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn start_inventory<'life0, 'life1, 'async_trait>(
&'life0 self,
server: &'life1 str,
options: InventoryOptions,
) -> Pin<Box<dyn Future<Output = OpcResult<InventoryStream>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Start a cancellable, bounded namespace inventory on a separate
connection from foreground operations. Read more
Source§fn read_tag_values<'life0, 'life1, 'async_trait>(
&'life0 self,
server: &'life1 str,
tag_ids: Vec<String>,
) -> Pin<Box<dyn Future<Output = OpcResult<Vec<TagValue>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn read_tag_values<'life0, 'life1, 'async_trait>(
&'life0 self,
server: &'life1 str,
tag_ids: Vec<String>,
) -> Pin<Box<dyn Future<Output = OpcResult<Vec<TagValue>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Read current values for the given tag IDs. Read more
Source§fn write_tag_value<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
server: &'life1 str,
tag_id: &'life2 str,
value: OpcValue,
) -> Pin<Box<dyn Future<Output = OpcResult<WriteResult>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn write_tag_value<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
server: &'life1 str,
tag_id: &'life2 str,
value: OpcValue,
) -> Pin<Box<dyn Future<Output = OpcResult<WriteResult>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Write a value to a single OPC DA tag. Read more
Auto Trait Implementations§
impl<C = ComConnector> !RefUnwindSafe for OpcDaClient<C>
impl<C = ComConnector> !UnwindSafe for OpcDaClient<C>
impl<C> Freeze for OpcDaClient<C>
impl<C> Send for OpcDaClient<C>
impl<C> Sync for OpcDaClient<C>
impl<C> Unpin for OpcDaClient<C>
impl<C> UnsafeUnpin for OpcDaClient<C>
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