LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Queue in the class private data cluster

Solved!
Go to solution

Need help in understanding how to use a queue.

 

I have TIMEVALUE class has in its private data cluster:

time (timestamp)

value (numeric)

 

also a MEASUREMENT class that has in the private data cluster: 

name (string)

ID#  (numeric)

Description (string)

buffer (TimeValue object) - keep historical data that the user defines from a configuration file.

 

I'm having hard time understanding how to define the buffer in the private cluster.  

As this is a buffer of TIMEVALUE class, I had to manually define the element type and then the queue out.  

It appears that it only lets me create a reference in the private cluster.

 

So how do I correctly define a persistent buffer of initially zero size in the MEASUREMENT private cluster?

 

 

 

0 Kudos
Message 1 of 4
(669 Views)
Solution
Accepted by shuttlefan

You already answered your own question. Your private data will contain a reference to a queue of TIMEVALUE objects. When you instantiate  an instance of your MEASUREMENT class you initialize the reference with the reference returned from the Obtain queue. Basically, you need to have an initialize method for your measurement class.



Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
0 Kudos
Message 2 of 4
(661 Views)

Yeah, this is what I tried but it didn't work.  what do I do with the output of obtain queue in my initialization?

initialize.JPG

0 Kudos
Message 3 of 4
(640 Views)

disregard that last one.  This following seems to work.  So I noticed that for the element type, I can either choose control or constant.  

 

 

shuttlefan_0-1681341633893.png

 

0 Kudos
Message 4 of 4
(628 Views)