Skip to content

Commit

Permalink
update doc
Browse files Browse the repository at this point in the history
  • Loading branch information
nevstop committed Oct 24, 2023
1 parent 65a864b commit e56256b
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 139 deletions.
11 changes: 1 addition & 10 deletions CSM API String Arguments Support.lvproj
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
</Item>
<Item Name="API String Arguments Support.lvlib" Type="Library" URL="../API-String-Arugments-Support/API String Arguments Support.lvlib"/>
<Item Name="CSM API String Arguments Support.vipb" Type="Document" URL="../CSM API String Arguments Support.vipb"/>
<Item Name="README.md" Type="Document" URL="../README.md"/>
<Item Name="Dependencies" Type="Dependencies">
<Item Name="user.lib" Type="Folder">
<Item Name="1D Array to String__ogtk.vi" Type="VI" URL="/&lt;userlib&gt;/_OpenG.lib/string/string.llb/1D Array to String__ogtk.vi"/>
Expand Down Expand Up @@ -120,23 +121,16 @@
<Item Name="Filter 1D Array with Scalar (U64)__ogtk.vi" Type="VI" URL="/&lt;userlib&gt;/_OpenG.lib/array/array.llb/Filter 1D Array with Scalar (U64)__ogtk.vi"/>
<Item Name="Filter 1D Array with Scalar (Variant)__ogtk.vi" Type="VI" URL="/&lt;userlib&gt;/_OpenG.lib/array/array.llb/Filter 1D Array with Scalar (Variant)__ogtk.vi"/>
<Item Name="Filter 1D Array__ogtk.vi" Type="VI" URL="/&lt;userlib&gt;/_OpenG.lib/array/array.llb/Filter 1D Array__ogtk.vi"/>
<Item Name="Format Variant Into String__ogtk.vi" Type="VI" URL="/&lt;userlib&gt;/_OpenG.lib/string/string.llb/Format Variant Into String__ogtk.vi"/>
<Item Name="Get Array Element TDEnum__ogtk.vi" Type="VI" URL="/&lt;userlib&gt;/_OpenG.lib/lvdata/lvdata.llb/Get Array Element TDEnum__ogtk.vi"/>
<Item Name="Get Data Name from TD__ogtk.vi" Type="VI" URL="/&lt;userlib&gt;/_OpenG.lib/lvdata/lvdata.llb/Get Data Name from TD__ogtk.vi"/>
<Item Name="Get Data Name__ogtk.vi" Type="VI" URL="/&lt;userlib&gt;/_OpenG.lib/lvdata/lvdata.llb/Get Data Name__ogtk.vi"/>
<Item Name="Get Header from TD__ogtk.vi" Type="VI" URL="/&lt;userlib&gt;/_OpenG.lib/lvdata/lvdata.llb/Get Header from TD__ogtk.vi"/>
<Item Name="Get Last PString__ogtk.vi" Type="VI" URL="/&lt;userlib&gt;/_OpenG.lib/lvdata/lvdata.llb/Get Last PString__ogtk.vi"/>
<Item Name="Get PString__ogtk.vi" Type="VI" URL="/&lt;userlib&gt;/_OpenG.lib/lvdata/lvdata.llb/Get PString__ogtk.vi"/>
<Item Name="Get Refnum Type Enum from Data__ogtk.vi" Type="VI" URL="/&lt;userlib&gt;/_OpenG.lib/lvdata/lvdata.llb/Get Refnum Type Enum from Data__ogtk.vi"/>
<Item Name="Get Refnum Type Enum from TD__ogtk.vi" Type="VI" URL="/&lt;userlib&gt;/_OpenG.lib/lvdata/lvdata.llb/Get Refnum Type Enum from TD__ogtk.vi"/>
<Item Name="Get Strings from Enum TD__ogtk.vi" Type="VI" URL="/&lt;userlib&gt;/_OpenG.lib/lvdata/lvdata.llb/Get Strings from Enum TD__ogtk.vi"/>
<Item Name="Get Strings from Enum__ogtk.vi" Type="VI" URL="/&lt;userlib&gt;/_OpenG.lib/lvdata/lvdata.llb/Get Strings from Enum__ogtk.vi"/>
<Item Name="Get TDEnum from Data__ogtk.vi" Type="VI" URL="/&lt;userlib&gt;/_OpenG.lib/lvdata/lvdata.llb/Get TDEnum from Data__ogtk.vi"/>
<Item Name="Get Variant Attributes__ogtk.vi" Type="VI" URL="/&lt;userlib&gt;/_OpenG.lib/lvdata/lvdata.llb/Get Variant Attributes__ogtk.vi"/>
<Item Name="Get Waveform Type Enum from Data__ogtk.vi" Type="VI" URL="/&lt;userlib&gt;/_OpenG.lib/lvdata/lvdata.llb/Get Waveform Type Enum from Data__ogtk.vi"/>
<Item Name="Get Waveform Type Enum from TD__ogtk.vi" Type="VI" URL="/&lt;userlib&gt;/_OpenG.lib/lvdata/lvdata.llb/Get Waveform Type Enum from TD__ogtk.vi"/>
<Item Name="Parse String with TDs__ogtk.vi" Type="VI" URL="/&lt;userlib&gt;/_OpenG.lib/lvdata/lvdata.llb/Parse String with TDs__ogtk.vi"/>
<Item Name="Refnum Subtype Enum__ogtk.ctl" Type="VI" URL="/&lt;userlib&gt;/_OpenG.lib/lvdata/lvdata.llb/Refnum Subtype Enum__ogtk.ctl"/>
<Item Name="Remove Duplicates from 1D Array (Boolean)__ogtk.vi" Type="VI" URL="/&lt;userlib&gt;/_OpenG.lib/array/array.llb/Remove Duplicates from 1D Array (Boolean)__ogtk.vi"/>
<Item Name="Remove Duplicates from 1D Array (CDB)__ogtk.vi" Type="VI" URL="/&lt;userlib&gt;/_OpenG.lib/array/array.llb/Remove Duplicates from 1D Array (CDB)__ogtk.vi"/>
<Item Name="Remove Duplicates from 1D Array (CSG)__ogtk.vi" Type="VI" URL="/&lt;userlib&gt;/_OpenG.lib/array/array.llb/Remove Duplicates from 1D Array (CSG)__ogtk.vi"/>
Expand Down Expand Up @@ -200,7 +194,6 @@
<Item Name="Reorder 2D Array2 (Variant)__ogtk.vi" Type="VI" URL="/&lt;userlib&gt;/_OpenG.lib/array/array.llb/Reorder 2D Array2 (Variant)__ogtk.vi"/>
<Item Name="Reorder Array2__ogtk.vi" Type="VI" URL="/&lt;userlib&gt;/_OpenG.lib/array/array.llb/Reorder Array2__ogtk.vi"/>
<Item Name="Reshape Array to 1D VArray__ogtk.vi" Type="VI" URL="/&lt;userlib&gt;/_OpenG.lib/lvdata/lvdata.llb/Reshape Array to 1D VArray__ogtk.vi"/>
<Item Name="Resolve Timestamp Format__ogtk.vi" Type="VI" URL="/&lt;userlib&gt;/_OpenG.lib/string/string.llb/Resolve Timestamp Format__ogtk.vi"/>
<Item Name="Search 1D Array (Boolean)__ogtk.vi" Type="VI" URL="/&lt;userlib&gt;/_OpenG.lib/array/array.llb/Search 1D Array (Boolean)__ogtk.vi"/>
<Item Name="Search 1D Array (CDB)__ogtk.vi" Type="VI" URL="/&lt;userlib&gt;/_OpenG.lib/array/array.llb/Search 1D Array (CDB)__ogtk.vi"/>
<Item Name="Search 1D Array (CSG)__ogtk.vi" Type="VI" URL="/&lt;userlib&gt;/_OpenG.lib/array/array.llb/Search 1D Array (CSG)__ogtk.vi"/>
Expand Down Expand Up @@ -258,15 +251,13 @@
<Item Name="Sort Array__ogtk.vi" Type="VI" URL="/&lt;userlib&gt;/_OpenG.lib/array/array.llb/Sort Array__ogtk.vi"/>
<Item Name="Split Cluster TD__ogtk.vi" Type="VI" URL="/&lt;userlib&gt;/_OpenG.lib/lvdata/lvdata.llb/Split Cluster TD__ogtk.vi"/>
<Item Name="String to 1D Array__ogtk.vi" Type="VI" URL="/&lt;userlib&gt;/_OpenG.lib/string/string.llb/String to 1D Array__ogtk.vi"/>
<Item Name="Strip Units__ogtk.vi" Type="VI" URL="/&lt;userlib&gt;/_OpenG.lib/lvdata/lvdata.llb/Strip Units__ogtk.vi"/>
<Item Name="Trim Whitespace (String Array)__ogtk.vi" Type="VI" URL="/&lt;userlib&gt;/_OpenG.lib/string/string.llb/Trim Whitespace (String Array)__ogtk.vi"/>
<Item Name="Trim Whitespace (String)__ogtk.vi" Type="VI" URL="/&lt;userlib&gt;/_OpenG.lib/string/string.llb/Trim Whitespace (String)__ogtk.vi"/>
<Item Name="Trim Whitespace__ogtk.vi" Type="VI" URL="/&lt;userlib&gt;/_OpenG.lib/string/string.llb/Trim Whitespace__ogtk.vi"/>
<Item Name="Type Descriptor Enumeration__ogtk.ctl" Type="VI" URL="/&lt;userlib&gt;/_OpenG.lib/lvdata/lvdata.llb/Type Descriptor Enumeration__ogtk.ctl"/>
<Item Name="Type Descriptor Header__ogtk.ctl" Type="VI" URL="/&lt;userlib&gt;/_OpenG.lib/lvdata/lvdata.llb/Type Descriptor Header__ogtk.ctl"/>
<Item Name="Type Descriptor__ogtk.ctl" Type="VI" URL="/&lt;userlib&gt;/_OpenG.lib/lvdata/lvdata.llb/Type Descriptor__ogtk.ctl"/>
<Item Name="Variant to Header Info__ogtk.vi" Type="VI" URL="/&lt;userlib&gt;/_OpenG.lib/lvdata/lvdata.llb/Variant to Header Info__ogtk.vi"/>
<Item Name="Waveform Subtype Enum__ogtk.ctl" Type="VI" URL="/&lt;userlib&gt;/_OpenG.lib/lvdata/lvdata.llb/Waveform Subtype Enum__ogtk.ctl"/>
</Item>
<Item Name="vi.lib" Type="Folder">
<Item Name="Add State(s) to Queue__JKI_lib_State_Machine.vi" Type="VI" URL="/&lt;vilib&gt;/addons/_JKI Toolkits/State Machine/_JKI_lib_State_Machine.llb/Add State(s) to Queue__JKI_lib_State_Machine.vi"/>
Expand Down
132 changes: 8 additions & 124 deletions CSM API String Arguments Support.vipb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<VI_Package_Builder_Settings Version="2020.1" Created_Date="2023-08-12 17:59:50" Modified_Date="2023-10-20 11:36:16" Creator="yaoli" Comments="" ID="8526fe7dbad2468d24974b38c13e5bc4">
<VI_Package_Builder_Settings Version="2020.1" Created_Date="2023-08-12 17:59:50" Modified_Date="2023-10-24 09:57:53" Creator="yaoli" Comments="" ID="c95af80153ad3b5971420001215173de">
<Library_General_Settings>
<Package_File_Name>NEVSTOP_lib_CSM_API_String_Arguments_Support</Package_File_Name>
<Library_Version>0.2.0.15</Library_Version>
Expand Down Expand Up @@ -35,9 +35,10 @@
<VI_Package_Configuration_File>CSM API String Arguments Support.vipc</VI_Package_Configuration_File>
<Description>
<One_Line_Description_Summary>API string argument support enhancement for CSM</One_Line_Description_Summary>
<Description># JKISMPP-API-String-Arugments-Support
<Description>The purpose of this library is to enhance the API parameters for Communicable State Machine (CSM). It allows for the inclusion of various data types in plain text format. Two more templates which include "Data: Get Configuration", "Data: Set Configuration" and "Data: Get Internal Status" states, are provided in the library. These templates can serve as a starting point for building your CSM module with the ability to access data stored in the '&gt;&gt; internal data &gt;&gt;' shift register.

### Supported Data Type

## Supported Data Type

- String/Path
- Boolean
Expand All @@ -47,133 +48,16 @@
- Array
- Cluster

#### String/Path

It Follows JKISM++'s rule. '-&gt;|' '-&gt;' '-@' '-&amp;' '&gt;&gt;' ',' ';' should be replaced with %[Hex] String before passing. You can use **JKISM++ AdvanceAPI\JKISM++ Make String Arguments Safe.vi**.

#### Boolean

```
TRUE/FALSE String Pairs:
- T/F
- True/False
- On/Off
- Enable/Disable
- Active/Inactive
- valid/Invalid
- 1/0
- Open/Close
- Non-null/null
```

#### Integer

```
Supported format:
- 12345
- 0d12345
- 0x1234
- 0b10101010
- 0o777
- 1234H
- 10101010H
- 7777O
- 10k
- 1M
```

#### Float(DBL/SGL)

```
Supported Format:
- 1.2345
- 1.23E+2
- 1.23E-2
- 1.23M (1.23*10^6)
- 1.23k (1.23*10^3)
- 1.23m (1.23*0.001)
- 1.23u (1.23*0.000001)
```

### Enum

**Condition1**

Enum = {AAA,BBBB,CCCC}

- String "AAA" will be converted to Enum(AAA), IntegerValue = 0
- String "CCC" will be converted to Enum(CCC), IntegerValue = 2

**Condition2**

Enum = {1- AAA,5 - BBBB, 9 - CCCC}

- String "AAA" will be converted to Enum(1- AAA), IntegerValue = 0
- String "5" will be converted to Enum(5 - BBBB), IntegerValue = 1
- String "9 - CCCC" will be converted to Enum(9 - CCCC), IntegerValue = 2

### Array

',' is used for element seperator, ';' is usd for row seperator. '[' &amp; ']' are used for boundary symbol. If it's not in cluster, boundary symbol is not indispensable.

**Example:**

`a,b,c,d,e` and `[a,b,c,d,e]` stands for 5 elements array

```
a b c d e
```

`a;b;c;d;e` and `[a;b;c;d;e]` stands for 5 elements array

```
a
b
c
d
e
```

`a1, b1, c1, d1, e1; a2, b2, c2, d2, e2` and `[a1, b1, c1, d1, e1; a2, b2, c2, d2, e2]` stands for 2*5 2D array

```
a1 b1 c1 d1 e1
a2 b2 c2 d2 e2
```

### Cluster


':' is used for seperating name and value, ';' is usd for seperating elements. '{' &amp; '}' are used for boundary symbol. If it's not within other array/cluster, boundary symbol is not indispensable. Not all elements should be descripted but the changing ones.
It's helpful for JKISM++ to reduce configuration setting API numbers. You can defined the configuration within a cluster and one single setting API for the config API.

**Example:**

Suppose a cluster as below:
```
typedef cluster{
Boolean b;
String str;
U32 integer
}
```

`b:On` and `{b:On}` stands for change the input cluster's boolean b to TURE only. Other elements keep as before.

`b:On;str:abcdef` and `{b:On;str:abcdef}` stands for change the input cluster's boolean b to TURE and String str to "abcdef". Other elements keep as before.

More information for the supported datatype format, please visit: https://github.com/NEVSTOP-LAB/CSM-API-String-Arugments-Support

## Know Issue

1. Cluster in Array is not fully supported. Need to imporve.
2. 2D array in cluster is not supported now. Need to imporve.


</Description>
1. **Cluster in Array is not fully supported. Need to imporve.**
2. **2D array in cluster is not supported now. Need to imporve.**</Description>
<Copyright/>
<Packager>NEVSTOP</Packager>
<URL>https://github.com/NEVSTOP-LAB/CSM-API-String-Arugments-Support</URL>
<Release_Notes/>
<Release_Notes>First release. API is under CSM Add-on palette.</Release_Notes>
</Description>
<Destinations>
<Toolkit_VIs>
Expand Down
Binary file modified Example/Example/Main.vi
Binary file not shown.
Binary file modified Example/Example/Module.vi
Binary file not shown.
Binary file not shown.
9 changes: 4 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# CSM-API-String-Arugments-Support

The purpose of this library is to enhance the API parameters for Communicable State Machine (CSM). It allows for the inclusion of various data types in plain text format. Two more templates which include "Data: Get Configuration", "Data: Set Configuration" and "Data: Get Internal Status" states, are provided in the library. These templates can serve as a starting point for building your CSM module with the ability to access data stored in the '>> internal data >>' shift register.

### Supported Data Type

- String/Path
Expand Down Expand Up @@ -128,8 +130,5 @@ U32 integer

## Know Issue

1. Cluster in Array is not fully supported. Need to imporve.
2. 2D array in cluster is not supported now. Need to imporve.



1. **Cluster in Array is not fully supported. Need to imporve.**
2. **2D array in cluster is not supported now. Need to imporve.**
Binary file modified Template/CSM - With Event Structure Template(+Configuration).vi
Binary file not shown.
Binary file not shown.

0 comments on commit e56256b

Please sign in to comment.