Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
18271e2
init dev branch
nevstop Nov 25, 2025
2df8738
add help folder
nevstop Nov 25, 2025
ea05218
add testcase for #98
nevstop Nov 25, 2025
1aa1217
已经找到这个错误的原因,是因为cluster中有个中文的符号
nevstop Nov 25, 2025
75c5279
1. Empty String to Typical data types.vi
nevstop Nov 26, 2025
1150150
[fix] #98
nevstop Nov 26, 2025
aa740b8
[fix] #100 for enum type, empty string should be converted to the ref…
nevstop Nov 26, 2025
3c4db9e
3. Incorrect usage collections.vi
nevstop Nov 26, 2025
1e3b260
4.1 CSM API String to Float.vi
nevstop Nov 26, 2025
8e9423b
4.2. CSM API String (Float with Unit) to Float.vi
nevstop Nov 26, 2025
2ca22f4
4.3 CSM API String to Complex Numeric.vi
nevstop Nov 26, 2025
f603973
4.4 CSM API String to TimeStamp.vi
nevstop Nov 26, 2025
9655f96
5.1 CSM API String to Array.vi
nevstop Nov 26, 2025
5f31753
### 5.2 Cluster 1D Array to CSM API String.vi
nevstop Nov 26, 2025
5f54f02
6.2 CSM API String to Cluster.vi
nevstop Nov 26, 2025
f042dc5
## 一些复杂的情况
nevstop Nov 26, 2025
6fcb5ca
[fix] #102 for cluster type, all elements will be used in no-tag mode…
nevstop Nov 26, 2025
076173c
整理example
nevstop Nov 28, 2025
a4117cc
add help/NEVSTOP/Communicable State Machine(CSM)/VI Description/VI De…
nevstop Dec 3, 2025
8529315
docs(CSM): 更新API String Addon中文文档内容
nevstop Dec 3, 2025
57fe1bb
docs(CSM): 修正API String文档中的格式和术语一致性
nevstop Dec 3, 2025
a673775
set vi controls Format (Empty to Use UTC)
nevstop Dec 4, 2025
80e0119
update example readme
nevstop Dec 8, 2025
5d4932b
刷新范例
nevstop Dec 12, 2025
655a605
刷新 example 文档
nevstop Dec 12, 2025
4fc84fe
整理依赖
nevstop Dec 21, 2025
23498e1
update doc
nevstop Dec 25, 2025
47185f6
更新文档
nevstop Dec 25, 2025
ff0323f
更新文档
nevstop Dec 29, 2025
2044e1d
update vipb
nevstop Jan 3, 2026
0a30a3a
update dir
nevstop Jan 3, 2026
36c0b58
fix deps
nevstop Jan 6, 2026
064acb5
[fix] #104 Throw up error if API String doesn't match any enum option
nevstop Jan 6, 2026
b9978b5
[update] #99 support leaf name searching in Query Data as API String …
nevstop Jan 6, 2026
5677f2a
fix potential bug of Search 1D String Array by Pattern.vi
nevstop Jan 6, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .markdownlint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"MD033": false,
"MD013": false,
"MD032": false,
"MD028": false,
"MD024": false,
"MD007": false,
"MD022": false,
"MD040": false
}
20 changes: 20 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"cSpell.words": [
"Cacher",
"csmdoc",
"csmlog",
"CSMLS",
"CSMP",
"CSMQ",
"Evnt",
"Gevt",
"HEXSTR",
"lvclass",
"ogtk",
"Refnum",
"Splite",
"Struct",
"usecase"
],
"files.autoGuessEncoding": true
}
5 changes: 3 additions & 2 deletions CSM API String Arguments Support.lvproj
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,16 @@
<Item Name="Example" Type="Folder" URL="../Example">
<Property Name="NI.DISK" Type="Bool">true</Property>
</Item>
<Item Name="help" Type="Folder" URL="../help">
<Property Name="NI.DISK" Type="Bool">true</Property>
</Item>
<Item Name="Template" Type="Folder" URL="../Template">
<Property Name="NI.DISK" Type="Bool">true</Property>
</Item>
<Item Name="testcase" Type="Folder">
<Item Name="testcase-Supported-Datatype.lvclass" Type="LVClass" URL="../testcases/testcase-Supported-Datatype/testcase-Supported-Datatype.lvclass"/>
</Item>
<Item Name="CSM API String Arguments Support.vipb" Type="Document" URL="../CSM API String Arguments Support.vipb"/>
<Item Name="README(CN).md" Type="Document" URL="../README(CN).md"/>
<Item Name="README.md" Type="Document" URL="../README.md"/>
<Item Name="Dependencies" Type="Dependencies">
<Item Name="user.lib" Type="Folder">
<Item Name="Communicable State Machine.lvlib" Type="Library" URL="/&lt;userlib&gt;/_NEVSTOP/Communicable State Machine(CSM)/Communicable State Machine.lvlib"/>
Expand Down
34 changes: 30 additions & 4 deletions CSM API String Arguments Support.vipb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<VI_Package_Builder_Settings Version="2020.1" Created_Date="2023-08-12 17:59:50" Modified_Date="2025-10-12 21:32:46" Creator="yaoli" Comments="" ID="7a8bbf4799d4bff39203a26ae1f42bc6">
<VI_Package_Builder_Settings Version="2020.1" Created_Date="2023-08-12 17:59:50" Modified_Date="2026-01-06 14:27:18" Creator="yaoli" Comments="" ID="364b0482be4befe0feaff83d08f77cef">
<Library_General_Settings>
<Package_File_Name>NEVSTOP_lib_CSM_API_String_Arguments_Support</Package_File_Name>
<Library_Version>2025.10.0.1</Library_Version>
<Library_Version>2025.11.0.1</Library_Version>
<Auto_Increment_Version>false</Auto_Increment_Version>
<Library_Source_Folder>.</Library_Source_Folder>
<Library_Output_Folder>vip</Library_Output_Folder>
Expand Down Expand Up @@ -52,7 +52,12 @@ More information for the supported datatype format, please visit: https://github
<Copyright/>
<Packager>NEVSTOP</Packager>
<URL>https://github.com/NEVSTOP-LAB/CSM-API-String-Arugments-Support</URL>
<Release_Notes>[feature] #95 support lvlibp</Release_Notes>
<Release_Notes>[feature] #95 support lvlibp
[update] #99 support leaf name searching in Query Data as API String Arguments.vim
[fix] #98 Do not check (), to avoid bugs
[fix] #100 for enum type, empty string should be converted to the reference enum value.
[fix] #102 for cluster type, all elements will be used in no-tag mode in ��Data To API String Arguments.vi��
[fix] #104 Throw up error if API String does'nt match any enum option</Release_Notes>
</Description>
<Destinations>
<Toolkit_VIs>
Expand Down Expand Up @@ -125,6 +130,12 @@ More information for the supported datatype format, please visit: https://github
<Preserve_Hierarchy>true</Preserve_Hierarchy>
<Path>&lt;user.lib&gt;\_NEVSTOP\Communicable State Machine(CSM)</Path>
</Additional_Destination>
<Additional_Destination>
<Name>LabVIEW</Name>
<LLB>false</LLB>
<Preserve_Hierarchy>true</Preserve_Hierarchy>
<Path>&lt;application&gt;</Path>
</Additional_Destination>
</Destinations>
<Source_Files>
<Destination_Overrides>
Expand Down Expand Up @@ -157,6 +168,12 @@ More information for the supported datatype format, please visit: https://github
<Additional_Destination>true</Additional_Destination>
<Additional_Destination_Index>1</Additional_Destination_Index>
</Destination_Overrides>
<Destination_Overrides>
<Path>help</Path>
<Destination>0</Destination>
<Additional_Destination>true</Additional_Destination>
<Additional_Destination_Index>2</Additional_Destination_Index>
</Destination_Overrides>
<Password_Overrides>
<Path>.</Path>
<Password/>
Expand Down Expand Up @@ -192,7 +209,16 @@ More information for the supported datatype format, please visit: https://github
<Path>testcases</Path>
</Exclusions>
<Exclusions>
<Path>README(CN).md</Path>
<Path>.vscode</Path>
</Exclusions>
<Exclusions>
<Path>README(zh-cn).md</Path>
</Exclusions>
<Exclusions>
<Path>CSM API String Arguments Support.lvcsm</Path>
</Exclusions>
<Exclusions>
<Path>.markdownlint.json</Path>
</Exclusions>
<Place_Folder_Contents>
<Path/>
Expand Down
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.
7 changes: 6 additions & 1 deletion README(CN).md → README(zh-cn).md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@
- True/False
- On/Off
- Enable/Disable
- Active/Inactive
- valid/Invalid
- 1/0
- Open/Close
Expand Down Expand Up @@ -215,6 +214,12 @@ _**转换规则2:包含索引编号时**_
- 字符串 "5" 将转换为 Enum(5 - BBBB),数字值为 1
- 字符串 "9 - CCCC" 将转换为 Enum(9 - CCCC),数字值为 2

> [!NOTE]
> - String matching is case-insensitive.
> - String matching performs regular expression matching starting from the first element in the enum list until the first match is found. Therefore, partial writing is supported.
> For example: 0x00 -- Spring | 0x01 -- Summer | 0x02 -- Autumn | 0x03 -- Winter
> The input string "aut" will match to "Autumn".

### 数组(Array)

逗号(,) 用于元素分隔,分号(;) 用于行分隔。方括号([ 和 ]) 用作边界符号。对于非复杂的混合数据类型,方括号可以省略。
Expand Down
15 changes: 11 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
# CSM-API-String-Arguments-Support

[English](./README.md) | [中文](./README(CN).md)
[English](./README.md) | [中文](./README(zh-cn).md)

[![Installs](https://www.vipm.io/package/nevstop_lib_csm_api_string_arguments_support/badge.svg?metric=installs)](https://www.vipm.io/package/nevstop_lib_csm_api_string_arguments_support/)
[![Stars](https://www.vipm.io/package/nevstop_lib_csm_api_string_arguments_support/badge.svg?metric=stars)](https://www.vipm.io/package/nevstop_lib_csm_api_string_arguments_support/)
[![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
[![GitHub Downloads](https://img.shields.io/github/downloads/NEVSTOP-LAB/CSM-API-String-Arguments-Support/total)](https://github.com/NEVSTOP-LAB/CSM-API-String-Arguments-Support/releases)

This library enhances the API parameters for the Communicable State Machine (CSM) framework by enabling the inclusion of various data types in plain text format.
This library enhances the API parameters for the Communicable State Machine (CSM) framework by enabling the inclusion of various data types in plain text format and is specially optimized for manual input experience.

The library also provides two additional templates that include "Data: Get Configuration", "Data: Set Configuration", and "Data: Get Internal Data" states. These templates serve as a starting point for building CSM modules with the ability to access data stored in the '>> internal data >>' shift register.
The library also provides two additional templates that include "Data: Get Configuration" and "Data: Set Configuration" states. These templates serve as a starting point for building CSM modules with the ability to access data stored in the '>> internal data >>' shift register.

![example](.github/doc.png)

Expand Down Expand Up @@ -218,6 +219,12 @@ Example: Enum = {1- AAA, 5 - BBBB, 9 - CCCC}
- String "5" converts to Enum(5 - BBBB), IntegerValue = 1
- String "9 - CCCC" converts to Enum(9 - CCCC), IntegerValue = 2

> [!NOTE]
> - String matching is case-insensitive.
> - String matching performs regex matching from the first element in the enum list until the first match is found. Therefore, partial writing is supported.
> For example: 0x00 -- Spring | 0x01 -- Summer | 0x02 -- Autumn | 0x03 -- Winter
> Input string "aut" will match to "Autumn".

### Array

Commas (',') are used as element separators, and semicolons (';') are used as row separators. Square brackets ('[' and ']') serve as boundary symbols but can be omitted for simple data types.
Expand Down Expand Up @@ -303,4 +310,4 @@ In Non-Tag mode, the input string consists only of data values separated by semi

### Other Data Types

Other data types are treated as variants and transformed using CSM-HexStr.
Other data types are first converted to variants and then transformed using CSM-HexStr.
Binary file modified _test/Untitled 1.vi
Binary file not shown.
Binary file modified _test/Untitled 15.vi
Binary file not shown.
Binary file modified _test/benchmark of to 1d array.vi
Binary file not shown.
Binary file modified _test/test tag value mode.vi
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 @@ -8,13 +8,20 @@
<Item Name="Utility" Type="Folder">
<Item Name="CSM - Timestamp to API String Arguments.vi" Type="VI" URL="../CSM - Timestamp to API String Arguments.vi"/>
<Item Name="CSM - Convert HexStr to Data.vim" Type="VI" URL="../CSM - Convert HexStr to Data.vim"/>
<Item Name="CSM - Query Internal Data Names By API String.vi" Type="VI" URL="../CSM - Query Internal Data Names By API String.vi"/>
<Item Name="CSM - Broadcast Data As API String.vim" Type="VI" URL="../CSM - Broadcast Data As API String.vim"/>
<Item Name="Text to Timestamp(RFC3339).vi" Type="VI" URL="../_Support/_JDP Science/Text to Timestamp(RFC3339).vi"/>
<Item Name="Timestamp to Text(RFC3339).vi" Type="VI" URL="../_Support/_JDP Science/Timestamp to Text(RFC3339).vi"/>
<Item Name="CSM - Query Internal Data Names By API String.vi" Type="VI" URL="../CSM - Query Internal Data Names By API String.vi"/>
</Item>
<Item Name="Support" Type="Folder">
<Item Name="StringAnalyze" Type="Folder">
<Item Name="_obselete" Type="Folder">
<Item Name="Indexed String To Enum_csm.vi" Type="VI" URL="../_Support/Indexed String To Enum_csm.vi"/>
</Item>
<Item Name="FGV" Type="Folder">
<Item Name="Boolean Strings.vi" Type="VI" URL="../_Support/Boolean Strings.vi"/>
<Item Name="Boolean Strings(lvlibp).vi" Type="VI" URL="../_Support/Boolean Strings(lvlibp).vi"/>
<Item Name="Float Precision.vi" Type="VI" URL="../_Support/Float Precision.vi"/>
<Item Name="Float Precision(lvlibp).vi" Type="VI" URL="../_Support/Float Precision(lvlibp).vi"/>
</Item>
<Item Name="String" Type="Folder">
<Item Name="bracket code.vi" Type="VI" URL="../_Support/StringAnalyze/bracket code.vi"/>
<Item Name="check if brackets Matched 2.vi" Type="VI" URL="../_Support/StringAnalyze/check if brackets Matched 2.vi"/>
<Item Name="check if brackets Matched.vi" Type="VI" URL="../_Support/StringAnalyze/check if brackets Matched.vi"/>
Expand All @@ -23,32 +30,33 @@
<Item Name="Strip brackets with Option.vi" Type="VI" URL="../_Support/StringAnalyze/Strip brackets with Option.vi"/>
<Item Name="Strip brackets.vi" Type="VI" URL="../_Support/StringAnalyze/Strip brackets.vi"/>
<Item Name="Cluster API String Mode.vi" Type="VI" URL="../_Support/StringAnalyze/Cluster API String Mode.vi"/>
<Item Name="API String to 1D Array.vi" Type="VI" URL="../_Support/API String to 1D Array.vi"/>
<Item Name="Match Multiple Pattern_csm.vi" Type="VI" URL="../_Support/Match Multiple Pattern_csm.vi"/>
<Item Name="Concatenate Strings If not Empty_csm.vi" Type="VI" URL="../_Support/Concatenate Strings If not Empty_csm.vi"/>
<Item Name="Strip Tag in Tag Value Pair.vi" Type="VI" URL="../_Support/Strip Tag in Tag Value Pair.vi"/>
<Item Name="Reorder String Array Breadth-firstly.vi" Type="VI" URL="../_Support/Reorder String Array Breadth-firstly.vi"/>
</Item>
<Item Name="FGV" Type="Folder">
<Item Name="Boolean Strings.vi" Type="VI" URL="../_Support/Boolean Strings.vi"/>
<Item Name="Boolean Strings(lvlibp).vi" Type="VI" URL="../_Support/Boolean Strings(lvlibp).vi"/>
<Item Name="Float Precision.vi" Type="VI" URL="../_Support/Float Precision.vi"/>
<Item Name="Float Precision(lvlibp).vi" Type="VI" URL="../_Support/Float Precision(lvlibp).vi"/>
<Item Name="Data" Type="Folder">
<Item Name="SingleElementsArray To Data_csm.vi" Type="VI" URL="../_Support/SingleElementsArray To Data_csm.vi"/>
<Item Name="Data To SingleElementsArray_csm.vi" Type="VI" URL="../_Support/Data To SingleElementsArray_csm.vi"/>
<Item Name="Data To SingleElementsArray_with_itself_csm.vi" Type="VI" URL="../_Support/Data To SingleElementsArray_with_itself_csm.vi"/>
</Item>
<Item Name="Timestamp" Type="Folder">
<Item Name="Text to Timestamp(RFC3339).vi" Type="VI" URL="../_Support/_JDP Science/Text to Timestamp(RFC3339).vi"/>
<Item Name="Timestamp to Text(RFC3339).vi" Type="VI" URL="../_Support/_JDP Science/Timestamp to Text(RFC3339).vi"/>
</Item>
<Item Name="API String to 1D Array.vi" Type="VI" URL="../_Support/API String to 1D Array.vi"/>
<Item Name="Cluster API String to 1D Array(Splite Nested Cluster).vi" Type="VI" URL="../_Support/Cluster API String to 1D Array(Splite Nested Cluster).vi"/>
<Item Name="Convert API String Arguments to Data(variant).vi" Type="VI" URL="../_Support/Convert API String Arguments to Data(variant).vi"/>
<Item Name="Data To API String Arguments.vi" Type="VI" URL="../_Support/Data To API String Arguments.vi"/>
<Item Name="Query Data as API String Arguments(variant).vi" Type="VI" URL="../_Support/Query Data as API String Arguments(variant).vi"/>
<Item Name="Compare Two Numbers_csm.vim" Type="VI" URL="../_Support/Compare Two Numbers_csm.vim"/>
<Item Name="Concatenate Strings If not Empty_csm.vi" Type="VI" URL="../_Support/Concatenate Strings If not Empty_csm.vi"/>
<Item Name="Data To SingleElementsArray_csm.vi" Type="VI" URL="../_Support/Data To SingleElementsArray_csm.vi"/>
<Item Name="Data To SingleElementsArray_with_itself_csm.vi" Type="VI" URL="../_Support/Data To SingleElementsArray_with_itself_csm.vi"/>
<Item Name="Indexed String To Enum_csm.vi" Type="VI" URL="../_Support/Indexed String To Enum_csm.vi"/>
<Item Name="Match Multiple Pattern_csm.vi" Type="VI" URL="../_Support/Match Multiple Pattern_csm.vi"/>
<Item Name="SingleElementsArray To Data_csm.vi" Type="VI" URL="../_Support/SingleElementsArray To Data_csm.vi"/>
<Item Name="String to Boolean_csm.vi" Type="VI" URL="../_Support/String to Boolean_csm.vi"/>
<Item Name="String To Float_csm.vi" Type="VI" URL="../_Support/String To Float_csm.vi"/>
<Item Name="String To Number(I64)_csm.vi" Type="VI" URL="../_Support/String To Number(I64)_csm.vi"/>
<Item Name="Strip Tag in Tag Value Pair.vi" Type="VI" URL="../_Support/Strip Tag in Tag Value Pair.vi"/>
<Item Name="String To Indexed Enum_csm.vi" Type="VI" URL="../_Support/String To Indexed Enum_csm.vi"/>
<Item Name="Indexed Enum to Numeric_csm.vim" Type="VI" URL="../_Support/Indexed Enum to Numeric_csm.vim"/>
<Item Name="Numeric to Indexed Enum_csm.vim" Type="VI" URL="../_Support/Numeric to Indexed Enum_csm.vim"/>
<Item Name="Search 1D String Array by Pattern.vi" Type="VI" URL="../_Support/Search 1D String Array by Pattern.vi"/>
</Item>
<Item Name="Configure" Type="Folder">
<Item Name="API String - Add Boolean Strings.vi" Type="VI" URL="../API String - Add Boolean Strings.vi"/>
Expand All @@ -59,7 +67,7 @@
<Item Name="API String - Set Float Format String.vi" Type="VI" URL="../API String - Set Float Format String.vi"/>
<Item Name="API String - Is Supported Datatype.vi" Type="VI" URL="../API String - Is Supported Datatype.vi"/>
</Item>
<Item Name="Convert API String Arguments to Data.vim" Type="VI" URL="../Convert API String Arguments to Data.vim"/>
<Item Name="Convert Data To API String Arguments.vim" Type="VI" URL="../Convert Data To API String Arguments.vim"/>
<Item Name="Convert API String Arguments to Data.vim" Type="VI" URL="../Convert API String Arguments to Data.vim"/>
<Item Name="Query Data as API String Arguments.vim" Type="VI" URL="../Query Data as API String Arguments.vim"/>
</Library>
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 modified addons/API-String-Arugments-Support/_Support/Boolean Strings.vi
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified addons/API-String-Arugments-Support/_Support/Float Precision.vi
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 modified addons/API-String-Arugments-Support/_Support/String To Float_csm.vi
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.
Loading