cancel
Showing results for 
Search instead for 
Did you mean: 
Reply

How can I get size of a Cluster in Bytes?

Solved!
Go to solution

How can I get size of a Cluster in Bytes?

I want to get the value of a cluster size, and I found the function 'Get Variant Attribute'  that I think can do this,

but I can't find in the documentation http://zone.ni.com/reference/en-XX/help/371361D-01/glang/get_variant_attribute/

 

Could anybody provide the values that the attribute name can receive?

And this is the right function to get what I need or there is other way?

0 Kudos
Message 1 of 4
(294 Views)
Solution
Accepted by topic author MarcoRacer
08-27-2015 04:09 PM

Re: How can I get size of a Cluster in Bytes?

Hi Marco,

 

GetVariantAttribute cannot give you the size of a cluster - it will give just you the attribute(s) of a variant!

You can create attributes with any name (but not empty string)...

 

Why do you need the bytesize of a cluster?

Maybe you could serialize it into a string and get the string length. Or typecast to an array of U8 and get the arraysize...

Best regards,
GerdW
CLAD, using 2009SP1 + LV2011SP1 + LV2017 on Win7+cRIO
Kudos are welcome Smiley Wink

Message 2 of 4
(292 Views)

Re: How can I get size of a Cluster in Bytes?

I need the size in Bytes because we have a function written in C++ that needs this value!

 

Actually I need a bytesize os a cluster because depending on the format selected, the values inside the cluster will be different!

 

So the best way to do this is serialize in string and get the lenght?

 

Best Regards,

Marco

0 Kudos
Message 3 of 4
(276 Views)

Re: How can I get size of a Cluster in Bytes?

flatten to string works!

Thanks!

Message 4 of 4
(245 Views)