zonk
zonk

Reputation: 167

Differences OPC UA and OOP

What is the difference between an Object in Object Oriented Programming and a Node in OPC address space? A typtical Object has Attributes and Methods. A Node seems to have the identical properties, but is just called "Node".

Upvotes: 0

Views: 275

Answers (2)

SwatBeam
SwatBeam

Reputation: 17

An Object in Object Oriented programming consists of Fields( in simple sense Variables) through which methods from a class of same type can be invoked.

A Node in OPC in the Information model contains Attributes that are specific to the node and references to other nodes.Methods could also be invoked on the server from a node. Each node has a NodeId that uniquely identifies a node in OPC server information model. Nodes provides a rich method of modelling real world entities(eg: Electronic valve) to be used in data exchange and communcation.

In some sense Node is an Object in the OPC server that has reference to other objects and methods that can be invoked.

Upvotes: 0

starturtle
starturtle

Reputation: 739

The two are completely different concepts.

A Node in OPC UA is an entity that consists of a set of well-defined Attributes (you can't influence which ones are allowed and, most importantly, can't invent new ones).

An Object in OOP is a way to arrange data in code that mimics a physical entity.

So there are plenty of OOP Objects that will never be Nodes, but it's pretty straightforward to implement an OPC UA Node for an OPC UA application using an OOP Object.

(To add to the confusion, there are OPC UA Objects, too, all of which are a special type of OPC UA Nodes. Perhaps that's where the mixup happened?)

Upvotes: 1

Related Questions