Avatar

Please consider registering
guest

sp_LogInOut Log In sp_Registration Register

Register | Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

sp_Feed Topic RSS sp_TopicIcon
Array of complex data
August 27, 2020
11:37, EEST
Avatar
John
Member
Members
Forum Posts: 5
Member Since:
February 3, 2020
sp_UserOfflineSmall Offline

I am working on the implementation of a server exposing a Queue having Jobs as an array of Job instances.
A Job has data variables linke Id, Name, Width, Length and some sub-folders containing Progress and Error data items.

How can I create a Queue (Object or Variable) containing an array of Job items?

I mis an example of an array of complex (Object or complex Variable) data items.
The Java documentation of Prosys OPC UA is also limited in detail to help me any further.

August 27, 2020
12:54, EEST
Avatar
Matti Siponen
Moderator
Members

Moderators
Forum Posts: 349
Member Since:
February 11, 2020
sp_UserOfflineSmall Offline

Hello,

OPC UA doesn’t support representing queues with a dedicated mechanism, meaning you would have to implement queue-like behaviour by yourself with the tools available.

If it’s possible for you define a subtype for Structure DataType that represents a Job, then it would be possible to define a JobQueue Variable with this DataType and set its ValueRank to 1 for one dimensional arrays and have the Server treat the Value of this Variable as if it was a queue. You would probably need to implement Methods that allow Clients to indirectly interact with the JobQueue variable, such as queueing new Jobs or canceling queued Jobs, to avoid them manipulating the array directly.

If you needed to or preferred to represent a Job as a Node with child Nodes, you would need to give each Job Node a queue number to represent the order in which the Jobs will be processed and organize these Job Nodes with a JobQueue Object. You can either make it so that the queue number changes whenever a Job moves forward in the queue or the queue number remains constant and the Job with the lowest queue number is processed first. Instead of having Clients add and remove Job Nodes manually, it would be better to implement Methods for doing so and add them to the JobQueue Object.

The EUROMAP 83 information model available at http://www.euromap.org/en/euromap83/ has another approach for representing queued jobs. Instead of having all jobs available in the AddressSpace for viewing, only the active job and optionally the next job are represented as Nodes in the AddressSpace. The Values of these Nodes are changed by the Server when the active job has finished. Further queued jobs exist only in the Server’s internal memory. Clients are allowed to send the Server job lists with a Method and the Server will queue the received jobs to its internal memory. The main benefit of this approach is that Nodes are never added or removed making the contents of the Server’s AddressSpace more consistent.

Forum Timezone: Europe/Helsinki

Most Users Ever Online: 1919

Currently Online:
21 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

Heikki Tahvanainen: 402

hbrackel: 144

rocket science: 88

pramanj: 86

Francesco Zambon: 83

Ibrahim: 78

Sabari: 62

kapsl: 57

gjevremovic: 49

Xavier: 43

Member Stats:

Guest Posters: 0

Members: 727

Moderators: 7

Admins: 1

Forum Stats:

Groups: 3

Forums: 15

Topics: 1529

Posts: 6471

Newest Members:

kourtneyquisenbe, ellis87832073466, zkxwilliemae, gabriellabachus, Deakin, KTP25Zof, Wojciech Kubala, efrennowell431, wilfredostuart, caitlynfajardo

Moderators: Jouni Aro: 1026, Pyry: 1, Petri: 0, Bjarne Boström: 1032, Jimmy Ni: 26, Matti Siponen: 349, Lusetti: 0

Administrators: admin: 1