|
| | Open62541 (const std::optional< std::string > opcua_config_file=std::nullopt) |
| | Constructor.
|
| |
| virtual | ~Open62541 () |
| |
| virtual void | Connect (const std::string &device, const std::string &address) |
| | Establish the connection to the OPCUA server.
|
| |
| virtual void | Read (protocol::base::VectorVariant ¶ms) override |
| | Performs a Read operation.
|
| |
| virtual void | Write (const protocol::base::VectorVariant ¶ms) override |
| | Performs a Write operation.
|
| |
| virtual void | Rpc (const std::string &obj, const std::string &proc, const protocol::base::VectorVariant ¶ms, protocol::base::Variant &result) override |
| | Executes a RPC.
|
| |
| UA_StatusCode | ResumeSubscriptions () |
| | Resume subscriptions for all connections.
|
| |
| virtual void | StartMonitorItem (const std::string &item) override |
| | Start monitoring an attribute.
|
| |
| virtual void | StartMonitorItems (const std::vector< std::string > &item_vector) override |
| | Start monitoring a vector of attributes.
|
| |
| virtual void | StopMonitorItem (const std::string &item) override |
| | Stop monitoring an attribute.
|
| |
| virtual void | Disconnect () |
| | Disconnects from the server.
|
| |
| virtual void | RegisterCB (protocol::base::Dispatcher< protocol::base::VectorVariant & > &dispatcher, protocol::base::Dispatcher<> &failure, protocol::base::Dispatcher<> &normal) |
| | Registers internal and external callbacks.
|
| |
| void | SetEndpoint (const std::string &endpoint) |
| | Set endpoint to the connection.
|
| |
| std::string | GetEndpoint () const |
| | Get endpoint of the connection.
|
| |
| virtual void | HandleDataChange (const std::shared_ptr< MonitoredItem > monitor_item, UA_DataValue *value) |
| | Handle data changes.
|
| |
| virtual void | HandleSessionChanges (bool status) |
| | Handle changes in the OPCUA session.
|
| |
| void | UpdateState (UA_SecureChannelState channel_state, UA_SessionState session_state, UA_StatusCode recovery_status) |
| | Update connection state.
|
| |
| bool | IsServerReady (UA_Client *client) |
| | Check if server reports ready/running state.
|
| |
| virtual | ~IComm ()=default |
| |
| | IComm ()=default |
| |
| | IComm (const IComm &)=delete |
| |
| IComm & | operator= (const IComm &)=delete |
| |
| | IComm (IComm &&)=delete |
| |
| IComm & | operator= (IComm &&)=delete |
| |
| virtual void | Connect (const ClientConfig &cfg)=0 |
| |
| virtual bool | IsConnected () const noexcept=0 |
| |
| virtual DataValue | Read (const std::string &node)=0 |
| |
| virtual std::vector< DataValue > | Read (const std::vector< std::string > &nodes)=0 |
| |
| virtual void | Write (const std::string &node, const Variant &value)=0 |
| |
| virtual std::vector< StatusCode > | Write (const std::vector< std::pair< std::string, Variant > > &writes)=0 |
| |
| virtual std::vector< Variant > | Call (const std::string &object, const std::string &method, const std::vector< Variant > &args)=0 |
| |
| virtual SubscriptionHandle | Subscribe (const std::string &node, DataCallback callback, const SubscriptionOpts &opts={})=0 |
| |
| virtual std::vector< SubscriptionHandle > | Subscribe (const std::vector< std::string > &nodes, DataCallback callback, const SubscriptionOpts &opts={})=0 |
| |
| virtual | ~IComm () |
| |
Public Member Functions inherited from eso::uatools::protocol::opcua::IDataChangeHandler |
| virtual | ~IDataChangeHandler () |
| | ~IDataChangeHandler
|
| |
The Open62541 class.
This class encapsulates the Open62541 OPCUA functions used by ICS FW devices. Each device shall create one instance of this class. If a device is running in the same server as another existing device, then this connection will be reused avoiding creating multiple connections for the same server.
| void eso::uatools::protocol::opcua::Open62541::StartMonitorItem |
( |
const std::string & | item | ) |
|
|
overridevirtual |
Start monitoring an attribute.
- Parameters
-
| item | Attribute to be monitored. |
- Returns
The format expected is <namespace, name> e.g. 4, PLC1.Lamp1.stat.nState
The above means, the library only supports string based names.
- Exceptions
-
| exceptions | for error cases. |
Implements eso::uatools::protocol::base::IComm.
| void eso::uatools::protocol::opcua::Open62541::StartMonitorItems |
( |
const std::vector< std::string > & | item_vector | ) |
|
|
overridevirtual |
Start monitoring a vector of attributes.
- Parameters
-
| item_vector | Vector of attributes to be monitored. |
- Returns
Each attribute in the vector is expected to have the format <namespace, name> e.g. 4, PLC1.Lamp1.stat.nState
The above means, the library only supports string based names.
- Exceptions
-
| exceptions | for error cases. |
Implements eso::uatools::protocol::base::IComm.