Modelling a List of Objects|OPC UA Implementation: Stacks, Tools, and Samples|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
Modelling a List of Objects
Avatar
Jonas
Member
Members
Forum Posts: 8
Member Since:
06/13/2017
sp_UserOfflineSmall Offline
1
09/27/2017 - 02:59
sp_Permalink sp_Print

Hi,

My address space models needs to represent at several places a list of objects.

  • The list entries need to be of node class Object (cannot be of node class Variable).
  • The entries of the list might change quite frequently (but not so frequently that insert/remove performance should be an issue).

The solution I know of so far is to use the 'OptionalPlaceholder' modelling rule. I see that often models define a MyObjectListType object which just has a single reference as OptionalPlaceholder pointing to a MyObject. This might be fine for an ObjectType which once instantiated refers to a static list of MyObject children. However, how would a client for a dynamically changing MyObjectListType instance handle:

  • Get the length of the list
  • Get an object with a specific index in the list.
  • Add, remove objects
  • etc...

So, basically, I'm looking for something which implements list semantics for objects.

Does something like that exist? Am I completely missing something here? If the answer is 'just use the OptionalPlaceholder solution', how would you address the above points?

Any input is much appreciated.

Avatar
Paul Hunkar
Member
Members
Forum Posts: 27
Member Since:
07/05/2017
sp_UserOfflineSmall Offline
2
09/27/2017 - 22:24
sp_Permalink sp_Print

Jonas,

   I would create an ObjectType,say MyObjectListType that includes:

  • a method for addition of an object (maybe also deletion) - parameters to method can be use to provide any information needed for the creation of the child Object instance (would these child object have there own type?)
  • an method for getting a specific instance object from the list.
  • a variable that is part of the object that displays the length of the list.
  • object includes a folder sub object that has all of the added instances (the instance could also just be added directly to the object if desired, but maybe a folder would make it easier to see what the dynamically added objects are)

I would use the method instead of the AddNode service, so that I could maintain items like the count of objects in the list and a structure that provides the ordering that is being asked for.  Usually objects have relationships and are not an ordered list, just a list.  

 

Paul

Avatar
Jonas
Member
Members
Forum Posts: 8
Member Since:
06/13/2017
sp_UserOfflineSmall Offline
3
09/28/2017 - 22:15
sp_Permalink sp_Print

Hi Paul,

Thank you for your answer. I think such a List Type as you propose it would make a lot of sense.

... and, to give different clients a chance to browse lists in a common way, it would be very nice if it was standardized 🙂

J

Forum Timezone: America/Phoenix
Most Users Ever Online: 510
Currently Online: Sergio Teijido
Guest(s) 17
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Forum Stats:
Groups: 2
Forums: 10
Topics: 1341
Posts: 4545