Table of Contents |
---|
Number to Enum
We have now created tools to make it easier to convert numeric points to enums. This will allow the user to specify a string text value for a numerical value. (Available in v183 or newer)These tools can be found in Legacy Folio > Tools >
1. The user will have to select on the Folio application which is under the Advanced Apps
2. Once Folio has launched, the user can select on the Tools button located on the right
- In the tool list, navigate towards the following: Advanced > Number to Enum
Note |
---|
Make sure the numeric points don't have units before converting or else an error will be thrown. |
...
The user will have to specify a name for the enum map that contains a list of enum options.
- For example, if the user wants to create a list of options for a "Fan Status" numeric point. They will name the enum map as "fanStatus" as an example and the enum options would be whatever they want.
- Once created, this map can then be used for all numerical points that would be considered "Fan Status" points.
Enum Map = "fanStatus"
List of enum options with their numerical value for fanStatus are:
...
We will use the above example in the below tools.
Create Enum Options
This is The Create Enum Option tool is where the user will create their enum maps of enum options. The user will go to Legacy Folio > Tools > Advanced > Number to Enum > Create Enum Options.Once
1. Once the user selects the tool, they will be prompted with the below:
- In our example, our name will be "fanStatus" and number of options will be 4
Info |
---|
|
In our example, our name will be "fanStatus" and number of options will be 4.
2. Once that is configured, the user will be prompted with the below:
- In our example, we have unknown = -1, off = 0, slow = 1, fast = 2.
Info |
---|
|
...
|
In our example, we have unknown = -1, off = 0, slow = 1, fast = 2.
3. Thats it, now the user can apply this enum map to points by using the "Apply Enum Options" tool tool.
Apply Enum Options
This The Apply Enum Option tool allows the user to apply their enum map to points so that they are converted to enums so that they display the correct string text per number value. The user will go to Legacy Folio > Tools > Advanced > Number to Enum > Apply Enum Options.Once
1. Once the user selects the tool, they will be prompted with the below:
- In our example, we are only applying this to one point so we used the id of the point, but it can be tags, navName, or by id
- We picked the only option we have which is 'fanStatus' and checked the writable box since our point is writable
Info |
---|
|
...
|
In our example, we are only applying this to one point so we used the id of the point, but it can be tags, navName, or by id. We picked the only option we have which is 'fanStatus' and checked the wrtiable box since our point is writable.
2. Thats it, once the user applies the change, they will be prompted with the below pop up regarding how many points were changed.
Example
Below is an example of a point that was converted to an enum. As you can see, the tags that get modified/added are kind, enum, curConvert, and writeConvert (if writable).
The points should now be working as an enum. If writable, you can see the actions list gets automatically updated.
Edit Enum Options
If the user needs to modify any of their existing enum maps, they can do so by using the "Edit Enum Options" tool. The user will go to Legacy Folio > Tools > Advanced > Number to Enum > Edit Enum Options.Once tool
1. Once the user selects the tool, they will be prompted with the below:
- Name of the set of options - the user selects the enum map of options they would like to edit from the list
2. In our example, we only have 'fanStatus' so we select that. Once selected, the user will get a pop up of the enum options available for that enum map to modify.
- Here they can change the numerical or string text value
3. Once done, that is it. It is automatically applied to existing points using this particular enum map.
- Don't need to re-apply since points are already have them.
Delete Enum Options
If the user no longer needs an enum map they have created, they can delete them using this tool. The user will go to Legacy Folio > Tools > Advanced > Number to Enum > Delete Enum Options.Once
1. Once the user selects the Delete Enum Option tool, they will be prompted with the below:
Here the user selects from the drop down an enum map they would like to delete.
...
To do this manually, it was covered in the CurConvert Options doc.
Common Errors
Most common errors are below.
...