Skip to content

Commit

Permalink
[Task2402796] Automatically Create Enum Annotations Based on Controls (
Browse files Browse the repository at this point in the history
…#215)

* Fixed issue with typing referencing old Type Specialization enum.

* Initial changes for autocreate enums annotations based on enum controls in the panel

* Minor cleanup

* Added Get Results Metadata that mirrors Get Configuration Metadata and updated Get MetaData from Results to call it.

* Added Get Results Metadata.vi to lvlib

* Fixed issue with parameter name.

* Created two new subVIs to split logic out

* Refactored Create Enum Type Specialization to work with both Enums and Arrays of Enums.

* Closed reference

* Updated Get Configuration Metadata.vi and Get Results Metadata.vi to call new subVIs. Also resolved some PR comments.

* Updated callers of Get Results MetaData.vi and Get Configuration MetaData.vi

* Updated lvlib to include new helpers.

* Cleaned up panels.

* Added IsArrayControl and IsEnumControl helpers

* Added IsEnumOrEnumArrayControl helper

* Updated Filter for Enum Controls to use new helpers.

* Made Create Enum Type Specialization private. Update lvlib

* Removed parameter name parameter and moved that logic internal to Create Enum Type Specialization.

* Fixed up callers for removal of parameter name parameter

* Fixed issue where we create enum.values even if no enums.

* Refactored helper to check if is enum array rather than any array

* Minor cleanup

* Removed validationand generic up-casting code and updated to use helper VIs.

* Added another helper VI to share more code between Get Configuration Metadata and Get Results Metadata.

* Made another helper to consolidate logic between Get Configuration Metadata and Get Results Metadata.

* Fixed icon art

* Fixed up lvlib

* Updated IEnumArrayControl to use IsEnumControl.

* Fixed an issue where Get Results Metadata uses Measurement Configuration CTL Path rather than Measurement Results CTL Path.

* Refactored IsEnumControl.vi and IsEnumArrayControl.vi to output casted references. Updated Filter for Enum Controls.vi to extract enum references. Updated Create Enum Type Specialization.vi to only take enum references as input.

* Updated LabVIEW datatype to Measurement datatype.vi to convert enum types to enum rather than coerced to UInt

* Fixed an issue where we did not update supported tag.

* Added Get Annotations For Parameter helper

* Refactored to remove Get Results Metadata and Get Configuration Metadata subVIs as they really only differed in the path. Now Get MetaData from Results and Get MetaData from Configuration both call into the generic Get Metadata.vi

* Fixed up lvlib

* Removed unused items in unbundle

* Renamed Parameter_AnnotationsEntry.ctl for use in both configuration and output.

* Updated lvlib

* Renamed Output to OutputParameter. Switched to using Parameter_AnnotationsEntry.ctl rather than the v2.

* Updated references for Parameter_AnnotationsEntry.ctl.

* Updated callers of OutputParameter.ctl

* I have no idea why LabView autodirties and wants to resave this file again every time I open the project. I'll trust labview and take it's change.
  • Loading branch information
WesleyTangNationalInstruments authored Jun 2, 2023
1 parent 40fc273 commit 6fdd748
Show file tree
Hide file tree
Showing 21 changed files with 10 additions and 4 deletions.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,20 @@
<Item Name="Private Helpers" Type="Folder">
<Property Name="NI.LibItem.Scope" Type="Int">4</Property>
<Property Name="NI.SortType" Type="Int">0</Property>
<Item Name="Create Enum Type Specialization.vi" Type="VI" URL="../Helpers/Create Enum Type Specialization.vi"/>
<Item Name="Create Measurement Services.vi" Type="VI" URL="../Helpers/Create Measurement Services.vi"/>
<Item Name="Error Strings Global.vi" Type="VI" URL="../Helpers/Error Strings Global.vi"/>
<Item Name="Get Configuration Metadata.vi" Type="VI" URL="../Helpers/Get Configuration Metadata.vi"/>
<Item Name="Filter for Enum Controls.vi" Type="VI" URL="../Helpers/Filter for Enum Controls.vi"/>
<Item Name="Get Annotations For Parameter.vi" Type="VI" URL="../Helpers/Get Annotations For Parameter.vi"/>
<Item Name="Get Default for Type.vi" Type="VI" URL="../Helpers/Get Default for Type.vi"/>
<Item Name="Get Discovery Service Key File Path.vi" Type="VI" URL="../Helpers/Get Discovery Service Key File Path.vi"/>
<Item Name="Get Enum Type Specializations.vi" Type="VI" URL="../Helpers/Get Enum Type Specializations.vi"/>
<Item Name="Get Measurement Configuration Controls.vi" Type="VI" URL="../Helpers/Get Measurement Configuration Controls.vi"/>
<Item Name="Get MetaData from Configurations.vi" Type="VI" URL="../Helpers/Get MetaData from Configurations.vi"/>
<Item Name="Get MetaData from Results.vi" Type="VI" URL="../Helpers/Get MetaData from Results.vi"/>
<Item Name="Get Metadata.vi" Type="VI" URL="../Helpers/Get Metadata.vi"/>
<Item Name="IsEnumArrayControl.vi" Type="VI" URL="../Helpers/IsEnumArrayControl.vi"/>
<Item Name="IsEnumControl.vi" Type="VI" URL="../Helpers/IsEnumControl.vi"/>
<Item Name="LabVIEW datatype to Measurement datatype.vi" Type="VI" URL="../Helpers/LabVIEW datatype to Measurement datatype.vi"/>
<Item Name="Read Discovery Service Key File.vi" Type="VI" URL="../Helpers/Read Discovery Service Key File.vi"/>
<Item Name="Register Configuration and Results.vi" Type="VI" URL="../Helpers/Register Configuration and Results.vi"/>
Expand All @@ -26,19 +33,18 @@
<Item Name="Private TypeDefs" Type="Folder">
<Property Name="NI.LibItem.Scope" Type="Int">4</Property>
<Item Name="ConfigurationParameter.ctl" Type="VI" URL="../Helpers/TypeDefs/ConfigurationParameter.ctl"/>
<Item Name="ConfigurationParameter_AnnotationsEntry.ctl" Type="VI" URL="../Helpers/TypeDefs/ConfigurationParameter_AnnotationsEntry.ctl"/>
<Item Name="GetMetadataResponse.ctl" Type="VI" URL="../Helpers/TypeDefs/GetMetadataResponse.ctl"/>
<Item Name="google_protobuf_Field_Kind.ctl" Type="VI" URL="../Helpers/TypeDefs/google_protobuf_Field_Kind.ctl"/>
<Item Name="MeasurementSignature.ctl" Type="VI" URL="../Helpers/TypeDefs/MeasurementSignature.ctl"/>
<Item Name="MeasureRequest.ctl" Type="VI" URL="../Helpers/TypeDefs/MeasureRequest.ctl"/>
<Item Name="MeasureResponse.ctl" Type="VI" URL="../Helpers/TypeDefs/MeasureResponse.ctl"/>
<Item Name="Output.ctl" Type="VI" URL="../Helpers/TypeDefs/Output.ctl"/>
<Item Name="OutputParameter.ctl" Type="VI" URL="../Helpers/TypeDefs/OutputParameter.ctl"/>
<Item Name="Parameter_AnnotationsEntry.ctl" Type="VI" URL="../Helpers/TypeDefs/Parameter_AnnotationsEntry.ctl"/>
<Item Name="PinMapContext.ctl" Type="VI" URL="../Helpers/TypeDefs/PinMapContext.ctl"/>
<Item Name="UserInterfaceDetails.ctl" Type="VI" URL="../Helpers/TypeDefs/UserInterfaceDetails.ctl"/>
</Item>
<Item Name="Public Helpers" Type="Folder">
<Property Name="NI.LibItem.Scope" Type="Int">1</Property>
<Item Name="Create Enum Type Specialization.vi" Type="VI" URL="../Helpers/Create Enum Type Specialization.vi"/>
<Item Name="Get Discovery Service Address.vi" Type="VI" URL="../Helpers/Get Discovery Service Address.vi"/>
</Item>
<Item Name="Public TypeDefs" Type="Folder">
Expand Down

0 comments on commit 6fdd748

Please sign in to comment.