Development of IMAQdx DS , some questions about best practice, e.g how publish of a cluster array

Dear community,

I want to develop a device server for NI-Vision IMAQdx driver. So every GIGe-Vision compatible camera should be controllable independent from the manufacturer.

We use a lot the library HIJ-Vision. It contains the control of the camera via IMAQdx, library of evaluation classes, which are typical for a laser lab, management of ROIs, projection of the results in the image and much more. At the moment the architecture is monolithic, in the sence that the control of the camera, evaluation and display are in the same program. I would like to use Tango to outsource the camera control to a device server, and to use the rest as a Tango client. Thus one camera could be observed by several client instances.

I migrated the server examples from Labview bindings to LV2020
examples_lv2020.zip and created an exe for (Single|Multiple)DeviceDServer -> it works, except for problems with restart. From the examples I conclude that publishing images should not be a problem.

What is not clear to me is how to publish an array of clusters in Tango?
Specifically, I want the server to send a list of camera attributes in order to build up the camera attribute tree, which You can see in the picture on the left.

Fig. 1

IMAQdx offers a generic structure, basically with attribute name, type, and value: DBL, Int, String, Enum, Boolean, see Figure 2.

Fig. 2

Of course I can create huge number of arrays for all possibilities and sort the data by index. Or to fold all data into JSON or XML String and publish it via a string attributt.

Would there be a more elegant solution?
Edited 1 month ago
Ok, the post above is quite long. Here is the main question: how do you publish a composite datatype (LV - cluster, C - struct)?

A statement in the art: it is not possible, or RTFM (with appropriate links smile ) would help a lot smile
Hi Alex,

I have never tried this before, so for a quick and easy solution I would probably use a String attribute with some JSON inside. But maybe Pipes could do what you want (I have never used them, maybe an expert can comment).

Read this in the general doc:
https://tango-controls.readthedocs.io/en/latest/development/device-api/device-server-model.html#the-tango-pipes

There are some examples for Cpp and e.g. Python around, unfortunately searching the Labview Gitlab repo for "pipe" yields nothing except for hints its not implemented, if I am not mistaken.

Greetings from Munich, Lenny
 
Register or login to create to post a reply.