pub trait MethodService: Service {
    fn call<T>(&self, method: T) -> Result<CallMethodResult, StatusCode>
    where
        T: Into<CallMethodRequest>
; fn call_get_monitored_items(
        &self,
        subscription_id: u32
    ) -> Result<(Vec<u32>, Vec<u32>), StatusCode> { ... } }
Expand description

Method Service set

Required methods

Calls a single method on an object on the server by sending a CallRequest to the server.

See OPC UA Part 4 - Services 5.11.2 for complete description of the service and error responses.

Arguments
  • method - The method to call. Note this function takes anything that can be turned into a CallMethodRequest which includes a (NodeId, NodeId, Option<Vec<Variant>>) which refers to the object id, method id, and input arguments respectively.
Returns
  • Ok(CallMethodResult) - A [CallMethodResult] for the Method call.
  • Err(StatusCode) - Status code reason for failure.

Provided methods

Calls GetMonitoredItems via call_method(), putting a sane interface on the input / output.

Arguments
  • subscription_id - Server allocated identifier for the subscription to return monitored items for.
Returns
  • Ok((Vec<u32>, Vec<u32>)) - Result for call, consisting a list of (monitored_item_id, client_handle)
  • Err(StatusCode) - Status code reason for failure.

Implementors