Skip to main content

OpcCommand

Enum OpcCommand 

Source
pub enum OpcCommand {
    Servers {
        bridge_host: Option<String>,
    },
    Read {
        bridge_host: Option<String>,
        server: Option<String>,
        tags: Vec<String>,
    },
    Write {
        bridge_host: Option<String>,
        server: Option<String>,
        tag: String,
        value: String,
    },
    Browse {
        bridge_host: Option<String>,
        server: Option<String>,
        session_id: Option<String>,
        parent_node_key: Option<String>,
        page_token: Option<String>,
        page_size: u32,
        all: bool,
        refresh: bool,
    },
    Close {
        bridge_host: Option<String>,
        session_id: String,
    },
    Search {
        bridge_host: Option<String>,
        server: Option<String>,
        query: String,
        match_mode: OpcSearchMatchModeArg,
        max_results: u32,
        session_id: Option<String>,
        scope_node_key: Option<String>,
        include_branches: bool,
        refresh: bool,
    },
    SearchIndex {
        command: SearchIndexCommand,
    },
}

Variants§

§

Servers

List the OPC DA servers registered on the bridge gateway’s host.

Fields

§bridge_host: Option<String>

(default: crate::config::DEFAULT_BRIDGE_HOST, overridable via BHTUNE_BRIDGE_HOST or the config file’s bridge_host key.)

§

Read

Read one or more tags.

Fields

§bridge_host: Option<String>

(default: crate::config::DEFAULT_BRIDGE_HOST, overridable via BHTUNE_BRIDGE_HOST or the config file’s bridge_host key.)

§server: Option<String>

(default: the config file’s server key; errors if neither is set.)

§tags: Vec<String>
§

Write

Write a value to one tag.

Fields

§bridge_host: Option<String>
§server: Option<String>
§value: String
§

Browse

Browse one bounded page of tags. Without a session, lists the root level.

Fields

§bridge_host: Option<String>
§server: Option<String>
§session_id: Option<String>

Existing bridge browse session to continue or use with parent-node-key.

§parent_node_key: Option<String>

Opaque node key returned by a previous page.

§page_token: Option<String>

Opaque continuation token returned by a previous page.

§page_size: u32

Number of immediate children to request.

§all: bool

Follow continuation pages until the requested level is complete.

§refresh: bool

Ask the gateway to refresh its namespace view.

§

Close

Explicitly release a gateway browse session returned by opc browse.

Fields

§bridge_host: Option<String>
§session_id: String

Opaque browse-session ID returned by opc browse.

§

Search

Search the OPC DA namespace without downloading the whole tree.

Fields

§bridge_host: Option<String>
§server: Option<String>
§query: String

Text to find in node labels/item IDs.

§match_mode: OpcSearchMatchModeArg

How the query should match.

§max_results: u32

Maximum number of matches.

§session_id: Option<String>

Existing bridge browse session to search within.

§scope_node_key: Option<String>

Opaque node key limiting the search scope.

§include_branches: bool

Include branch nodes as search results.

§refresh: bool

Ask the gateway to refresh its namespace view.

§

SearchIndex

Query and manage the gateway’s persistent namespace search index.

Fields

Trait Implementations§

Source§

impl Debug for OpcCommand

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl FromArgMatches for OpcCommand

Source§

fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>

Instantiate Self from [ArgMatches], parsing the arguments as needed. Read more
Source§

fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>

Instantiate Self from [ArgMatches], parsing the arguments as needed. Read more
Source§

fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>

Assign values from ArgMatches to self.
Source§

fn update_from_arg_matches_mut<'b>( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>

Assign values from ArgMatches to self.
Source§

impl Subcommand for OpcCommand

Source§

fn augment_subcommands<'b>(__clap_app: Command) -> Command

Append to [Command] so it can instantiate Self via [FromArgMatches::from_arg_matches_mut] Read more
Source§

fn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command

Append to [Command] so it can instantiate self via [FromArgMatches::update_from_arg_matches_mut] Read more
Source§

fn has_subcommand(__clap_name: &str) -> bool

Test whether Self can parse a specific subcommand

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> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
§

impl<T> IntoRequest<T> for T

§

fn into_request(self) -> Request<T>

Wrap the input message T in a tonic::Request
§

impl<L> LayerExt<L> for L

§

fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>
where L: Layer<S>,

Applies the layer to a service and wraps it in [Layered].
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
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.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more