@peterklepec wrote:
Is there a bug
No. When you flatten an object the class name is part of the data.
@peterklepec wrote:
or am I misusing functionality of LabView?
Probably. Whether you are passing a cluster or an object, if you know what the data type is on the other side, you just need to feed the flattened string and the data type into the unflatten primitive and you will get back your original data. You don't need to create a separate accessor, and you don't even need a method in the class. You can just flatten the object directly.
There's also no point in having the size as part of the cluster, as that doesn't really seem to make sense. You don't need it as part of the cluster and you certainly don't need it to unflatten. If you want to know how many bytes to read on the other side, you can either prepend the size separately (using concat) and read the first four bytes on the other side (the shipping TCP examples should show this) or look at the size of the cluster on the other side (although that's less robust, because it won't work if your data can have variable size). There is also the prepend size input on the primitive, but that isn't relevant for a cluster.
___________________
Try to take over the world!