Skip to content

unpack vis/tango_vi.llb, extensively adopt typedefs, little code refact

Tango-Controls Bot requested to merge github/fork/EastEriq/master into visRefactoring

Created by: EastEriq

  • tango_vi.llb has been unpacked and all the individual files dispatched to subfolders under /visrc, matching the virtual folder names originally listed in tango.lvlib. Compiled code has been removed from all vis. Source control would be pretty ineffective without this.

--> Please note that there were some 100 VIs not cathegorized at all in the original lvlib. I dumped all of them in a new subfolder visrc/Orphan with descendants, they should be sorted more logically.

--> Note that there are several Typedefs subfolder, not all of them containing only typedefs, and .ctl files in other folders. Some reorganization may be due.

  • a project visrc/build_library.lvproj has been created. Its main purpose is to rebuild automatically the packed file tango_vi.llb should that be needed for compatibility with existing applications (my bet is that it shouldn't if things have been done correctly). The build specification can be part of the package release process.

--> the file tango_vi.llb itself is a derived artefact and can be therefore removed from source control.

  • Some new typedefs have been created; typedefs have been extensively used in the existing vi codebase.

--> Common VIs/Typedefs/_AttributeDataType_t.ctl and Orphan/Typedefs/_DataType.ctl seem to refer to the same type, they should be probably unified in all their callers.

--> Common VIs/Typedefs/_TangoDataType_t.ctl, which is a different enumerator than the previous two, might have a misleading name, and might be renamed.

--> Common VIs/Typedefs/_CmdArgDataType_t seems unreferenced.

  • As an example of code factorization, a few instances (e.g. the first alphabetically) in Client VIs/Private VIs/Attributes/Readers have been reworked and simplified. The exercise could be carried on extensively there and elsewhere.

--> it is possible that polymorphic VIs like _TangoReadAttributes.vi can be much more compactly rewritten as a read-anything-to-LV-variant. Type information will thus become an integral part of the variant wire, eliminating the need for so many polymorph instances (at the price of dealing with variants and Variant to Data in applications)

  • The code has been minimally cleaned up when I happened to be on it, e.g. reordering controls on the FP according to the conpane, removing unnecessary sequence frames and iteration counts for autoindexed loops, straightening bent wires, etc.

  • The codebase has been checked for no broken VI, but no unit test has been performed, nor compatibility with existing VI application software could be tested.

Merge request reports

Loading