Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [milo-dev] Node interface

I think of both VariableType and ObjectType as equivalent to interfaces in a programming language.

An instance of either Variable or Object nodes will have properties and references defined by the corresponding VariableType or ObjectType.

Variables and Objects could both be thought of like a class instances, but they have a different set of attributes and rules associated with them defined by the OPC UA spec. Like only Variables have a Value attribute, Objects do not.

On Fri, Jun 28, 2019 at 6:41 AM Joe San <codeintheopen@xxxxxxxxx> wrote:
That makes sense! It was after reading through the code and referring to the spec, I still had this question!

Ok now I have the next one: We have these NodeClasses such as Object, ObjectType and Variable, VariableType... what is the difference? My understanding is that a VariableType represents meta information about a Variable, while the Variable holds the actual data and likewise, ObjectType is like a class definition, while the object is an instance of ObjectType... did I get this correct?

On Thu, Jun 27, 2019 at 8:12 PM Kevin Herron <kevinherron@xxxxxxxxx> wrote:
Joe,

The difference can be seen in the type signatures. The getXXX methods return the attribute value, while the readXXX methods return the DataValue that contains those attribute values. This can be useful if you also need access to the StatusCode or timestamps that came back along with the attribute being read.

If you look at the implementation you'll see the getXXX methods just delegate to the corresponding readXXX and then extract the value.

_______________________________________________
milo-dev mailing list
milo-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://www.eclipse.org/mailman/listinfo/milo-dev
_______________________________________________
milo-dev mailing list
milo-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://www.eclipse.org/mailman/listinfo/milo-dev

Back to the top