No Matches
realvirtual.OPCUA_Interface Class Reference
Inheritance diagram for realvirtual.OPCUA_Interface:

Public Member Functions

bool Connect ()
 Connects to the OPCUA Server.
OPCUA_Node GetOPCUANode (string nodeid)
 Gets an OPCUA_Node with the NodeID in all the Childrens of the Interface.
void ImportNodes ()
 Imports all OPCUANodes under TopNodeId and creates GameObjects. More...
void EditorImportNodes ()
void ImportNodes (string nodeid)
 Imports all nodes under one TopNodeID. More...
OPCUANodeSubscription Subscribe (string nodeid, NodeUpdateDelegate del)
 Subscribes to an OPCUA node, delegate function gets called when node value is updated on OPCUA server.
object ReadNodeValue (OPCUA_Node node)
 Reads a Node value and returns it as object.
object ReadNodeValue (string nodeid)
 Reads a Node value based on its id and returns it as object.
object ReadNodeValue (string nodeid, ref string status)
 Reads a Node value based on its id and returns it as object, a status reference is passed.
bool WriteNodeValue (string nodeid, object value)
 Writes a value to an OPCUA node with its nodeid.
bool WriteNodeValue (OPCUA_Node node, object value)
 Writes a value to an OPCUA node with its node object.
bool WriteNodeValue (string nodeid, object value, ref string status)
 Writes a value to an OPCUA node with its node id and a status variable reference.
void UnSubscribe (OPCUANodeSubscription subscription)
void Disconnect ()
 Disconnects from the OPCUA server.

Public Attributes

string ServerIP = ""
int ServerPort = 4840
SecurityPolicy SecurityPolicy = SecurityPolicy.None
string Path = ""
int SessionTimeoutMs = 60000
string TopNodeId = "Demo.Static.Scalar"
bool DebugMode
bool IsConnected
bool IsReconnecting
string ApplicationName = "realvirtual"
string ApplicationURN = "urn:realvirtual"
string ProductURI = "uri:realvirtual"
string ClientPrivateCertificate
string ClientPublicCertificate
string UserName = ""
string Password = ""
SignatureAlgorithm PasswordSignatureAlgorithm =SignatureAlgorithm.RsaOaep
bool SetDisconnectedOnReadError = true
int ReconnectTime = 2000
int MaxNumberOfNodesPerSubscription
float SubscriptionPublishingIntervall = 20
int MaxNotificationsPerPublish = 50
List< string > RegexWriteNodes
bool AutomaticallyInputOnWriteSignals
bool AutomaticallySubscribeOnImport = true
int NumberSubsriptions
int NumberSubscribingNodes
int CurrentNodeInSubscription
uint CurrentSubscriptionID
uint CurrentClientHandle = 1
UnityEvent EventOnConnected
UnityEvent EventOnDisconnected

Member Function Documentation

◆ ImportNodes() [1/2]

void realvirtual.OPCUA_Interface.ImportNodes ( )

If GameObject with NodeID is already existing the GameObject will be updated. Does not deletes any Nodes. If Realvirtual Framework is existent (Compiler Switch REALVIRTUAL) also Realvirtual PLCInputs and PLCOutputs are created or updated or all nodes with suitable data types.

◆ ImportNodes() [2/2]

void realvirtual.OPCUA_Interface.ImportNodes ( string  nodeid)