Real world use case of DataVariable --<<HasComponent>>--> DataVariable|OPC UA Standard|Forum|OPC Foundation

Avatar
Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
Lost password?
sp_Feed sp_PrintTopic sp_TopicIcon
Real world use case of DataVariable --<<HasComponent>>--> DataVariable
Avatar
Yutaka Takeda
Member
Members
Forum Posts: 3
Member Since:
03/02/2017
sp_UserOfflineSmall Offline
1
04/28/2017 - 16:54
sp_Permalink sp_Print

From the OPC UA spec, I understand a DataVariable can have a component being a DataVariable. I’d like to know in what real case, this style of reference would be useful.

Avatar
Guest
Guests
2
04/30/2017 - 02:43
sp_Permalink sp_Print

If the DataType is complex – like a structure or an array – the Server can expose elements of the structure or array as DataVariable components.

A good example for this is the “ServerStatus” Variable (defined in UA Part 5). It is a component of the Server Object and has the DataType “ServerStatusDataType” (a structure). Clients can read the whole structure or they can read individual elements of this structure, since they are all exposed as components.

One of the elements is buildInfo which is also a structured type and also its elements are exposed as components.

Avatar
Yutaka Takeda
Member
Members
Forum Posts: 3
Member Since:
03/02/2017
sp_UserOfflineSmall Offline
3
04/30/2017 - 21:47
sp_Permalink sp_Print

I see!  I was wondering how to achieve complex types. I am looking at ServerStatus definition and now I have a better understanding.

Just to verify my understanding, let me ask a question:

If a DataVariable has one or more components that are DataVariable, the DataVariable (the top one) is always a complex type? (In another word, would there be a case where there is a DataVariable whose dataType is a base type and has components that are DataVariables?)

Avatar
Guest
Guests
4
04/30/2017 - 23:50
sp_Permalink sp_Print

I am not sure if the spec has such a restriction (check for complex in UA Part 3 🙂 but I do not know a different use case.

Avatar
Yutaka Takeda
Member
Members
Forum Posts: 3
Member Since:
03/02/2017
sp_UserOfflineSmall Offline
5
05/01/2017 - 19:05
sp_Permalink sp_Print

I found this statement in Part 3, section 4.4.3 DataVariables:

DataVariables may have additional DataVariables, but only if they are complex. In this case, their DataVariables shall always be elements of their complex definitions.

Thank you Karl so much for your help!

Avatar
Paul Hunkar
Cleveland, Ohio, USA
Moderator
Members

Moderators-Specifications

Moderators-Companion

Moderators-Implementation

Moderators-Certification

Moderators-COM
Forum Posts: 112
Member Since:
02/24/2014
sp_UserOfflineSmall Offline
6
05/02/2017 - 06:37
sp_Permalink sp_Print

You can also look at the StateMachineType defined in Part 5 Annex B.  Several VariableTypes are defined that are complex (sub types of BaseDataVariableType).  They do not have a complex DataType , just a simple dataType like localized string, but the variable are complex in that they expose a number of additional properties or datavariables under them.

Paul Hunkar - DSInteroperability

Forum Timezone: America/Phoenix
Most Users Ever Online: 510
Currently Online:
Guest(s) 42
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Forum Stats:
Groups: 2
Forums: 10
Topics: 1444
Posts: 4887