Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
7 changes: 1 addition & 6 deletions .github/workflows/Build_VIPM_Library.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,7 @@ jobs:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3

- name: vipm-InstallPackage
uses: NEVSTOP-LAB/vipm-InstallPackage@main
with:
LabVIEW_Version: 2017
# Package could be PackageName/PacakgeWithVersion/vipFilePath
Package: "Epoch Date & Time"
#不再依赖 Epoch Date & Time 包

- uses: NEVSTOP-LAB/InstallNevstopPackage@main
with:
Expand Down
9 changes: 2 additions & 7 deletions .github/workflows/Check_Broken_VIs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ on:
- '**.svg'
- '**.json'
- '**.yml'

push:
paths-ignore:
- '**.md'
Expand All @@ -42,12 +42,7 @@ jobs:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3

- name: vipm-InstallPackage
uses: NEVSTOP-LAB/vipm-InstallPackage@main
with:
LabVIEW_Version: 2017
# Package could be PackageName/PacakgeWithVersion/vipFilePath
Package: "Epoch Date & Time"
#銝�靘� Epoch Date & Time ��

- uses: NEVSTOP-LAB/InstallNevstopPackage@main
with:
Expand Down
13 changes: 5 additions & 8 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="2026-01-06 14:27:18" Creator="yaoli" Comments="" ID="364b0482be4befe0feaff83d08f77cef">
<VI_Package_Builder_Settings Version="2020.1" Created_Date="2023-08-12 17:59:50" Modified_Date="2026-03-28 20:21:04" Creator="yaoli" Comments="" ID="521fa139301b0f81f36d68bc0327b080">
<Library_General_Settings>
<Package_File_Name>NEVSTOP_lib_CSM_API_String_Arguments_Support</Package_File_Name>
<Library_Version>2025.11.0.1</Library_Version>
<Library_Version>2026.1.1.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,12 +52,9 @@ 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
[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>
<Release_Notes>[update] #109 disable &lt;safestr&gt; for string datatype
[fix] #105 Correct parsing and formatting of numeric values with "B" (byte) suffix, e.g. "100B"
[fix] #107 fix potential bug in "Strip Trailing Zeros for Float String.vi"</Release_Notes>
</Description>
<Destinations>
<Toolkit_VIs>
Expand Down
68 changes: 35 additions & 33 deletions README(zh-cn).md
Original file line number Diff line number Diff line change
@@ -1,40 +1,40 @@
# CSM-API-String-Arguments-Support

[English](./README.md) | [銝剜�](./README(CN).md)
[English](./README.md) | [銝剜�](./README(zh-cn).md)

[![摰��(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/)
[![�漣霂�](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/)
[![霈詨霂(https://img.shields.io/badge/License-Apache_2.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
[![霈詨霂(https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)
[![GitHub銝蝸�(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)

霂亙��其�憓撩�縑�嗆€嚗SM嚗�API��嚗�誑蝥舀��祆撘���蝘�桃掩��銝�思����颲雿��
�砍��拙�鈭� [CSM](https://github.com/NEVSTOP-LAB/Communicable-State-Machine)嚗€縑�嗆€嚗��嗥� API ��嚗�誑蝥舀��祆撘���蝘�桃掩�€

摨葉��鈭舅銝芣�SM璅⊥嚗�隞祇�"Data: Get Configuration"��"Data: Set Configuration"銝支葵�蔭�嗆€��其�霈輸摮��'>> internal data >>'蝘颱�撖��其葉��蝵格�柴€�
摨葉餈�撣虫舅銝� CSM 璅⊥嚗�蝵� `Data: Get Configuration`�Data: Set Configuration` �� `Data: Get Internal Data` �嗆€��臭�銝箸�撱粹�閬粉�� `>> internal data >>` 蝘颱�撖��冽�桃� CSM 璅∪��絲�嫘€�

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

## �舀���桃掩��

- 摮泵銝� (String)
- 頝臬� (Path)
- 撣��� (Boolean)
- �倌 (Tag)
- 撘�� (Refnum嚗��施VI/VISA/UserDefinedRefnumTag)
- �湔 (I8,I16,I32,I64,U8,U16,U32,U64)
- 撘�� (Refnum嚗��� IVI/VISA/UserDefinedRefnumTag)
- 撣��� (Boolean)
- �湔 (I8, I16, I32, I64, U8, U16, U32, U64)
- 瘚桃�� (DBL/SGL)
- 憭 (DBL/SGL)
- �園�� (Timestamp)
- �蜀 (Enum)
- �啁� (Array)
- 蝪� (Cluster)
- �嗡�蝐餃� (雿輻CSM-Hexstr銵函內)
- �嗡�蝐餃� (雿輻 CSM-Hexstr 銵函內)

### 摮泵銝�(String)/頝臬�(Path)/撘��(Refnum)/�倌(Tag)

摮泵銝脣�頝臬�蝐餃��萄儐CSM�����寞�摮泵憒�'->|'��'->'��'-@'��'-&'��'>>'��','��';'�其���隡�刻蓮�V蛹%[�餈]摮泵銝莎���蝑�鈭蝙��**CSM AdvanceAPI\CSM Make String Arguments Safe.vi**��
摮泵銝脣�頝臬�蝐餃�銝哨�CSM �喲摮�`->|`�->`�-@`�-&`�>>`�,`�;`嚗隡€�隡�刻蓮�V蛹 `%[�餈]` 摮泵銝莎���蝑�鈭**CSM AdvanceAPI\CSM Make String Arguments Safe.vi**��

> [!NOTE]
> LabVIEW���典(Refnum嚗��施VI/VISA/UserDefinedRefnumTag)��蝑�(Tag)銋��頧祆閫�銝tring蝐餃��詨���
> 撘�瘀�Refnum嚗��� IVI/VISA/UserDefinedRefnumTag嚗��倌嚗ag嚗�頧祆閫�銝� String 蝐餃��詨���

### 撣���(Boolean)

Expand All @@ -45,6 +45,7 @@
- True/False
- On/Off
- Enable/Disable
- Active/Inactive
- valid/Invalid
- 1/0
- Open/Close
Expand Down Expand Up @@ -169,31 +170,31 @@ _**�寞��霂湔�**_:

### �蜀(Enum)

`Indexed Enum` 摰�銝� [蝝W�蝻(index)][��蝚�(separator)][�蜀摮泵銝淫 �澆���蝚虫葡��誑銝”颲暹撘�
`Indexed Enum` 摰�銝� `[蝝W�蝻][��蝚因[�蜀摮泵銝淫` �澆���蝚虫葡��誑銝”颲暹撘�

> ���嗆摮�銝箇揣撘�== 雿蛹��蝚佗�
>
> - 1 == boolean
> - 2 == string
> - 4 == dbl
> - 8 == number
>
> �餈�啣�雿蛹蝝W�嚗�-- 雿蛹��蝚佗�
> �餈蝝W�嚗--` 雿蛹��蝚佗�
>
> - 0x01 -- boolean
> - 0x02 -- string
> - 0x04 -- dbl
> - 0x08 -- number
>
> 鈭��嗆摮�銝箇揣撘�__ 雿蛹��蝚佗�
> 鈭��嗥揣撘�`__` 雿蛹��蝚佗�
>
> - 0b0001 __ boolean
> - 0b0010 __ string
> - 0b0100 __ dbl
> - 0b1000 __ number
>
> ���嗥揣撘�`==` 雿蛹��蝚佗�
>
> - 1 == boolean
> - 2 == string
> - 4 == dbl
> - 8 == number

> [!NOTE]
> 蝝W�蝻(index)�舀��€��啁�銵刻噢�孵���
> 蝝W�蝻�舀��€��啁�銵刻噢�孵���

_**頧祆閫�1: 瘝⊥�蝝W�蝻��**_

Expand All @@ -215,10 +216,10 @@ _**頧祆閫�2嚗��怎揣撘��瑟**_
- 摮泵銝� "9 - CCCC" 撠蓮�V蛹 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".
> - 摮泵銝脣���箏�憭批��€�
> - 摮泵銝脣���冽迤�”颲曉�嚗��蜀�”蝚砌�銝芸�蝝�憪�甈∪���游�曉蝚砌�銝芰泵�★銝箸迫嚗�甇斗���€�
> 靘��蜀銝綽�0x00 -- Spring | 0x01 -- Summer | 0x02 -- Autumn | 0x03 -- Winter
> 颲摮泵銝� "aut" 撠� "Autumn"��

### �啁�(Array)

Expand Down Expand Up @@ -254,15 +255,16 @@ a2 b2 c2 d2 e2

### 蝪�(Cluster)

**頧祆閫�1: �倌-�唳撖�(Tag:Value)璅∪�**
**頧祆閫�1嚗�蝑�-�唳撖�(Tag:Value)璅∪�**

�冽�蝑�-�唳撖寞芋撘�嚗��亙�蝚虫葡�勗�銝芣�蝑�-�唳撖寧����(:)�其����倌��殷��(;)�其���銝�����砍({ �� })�其�颲寧�蝚血�笆鈭�憭��毽��桃掩���望�瑕隞亦��乓€隞���銝�
�冽�蝑�-�唳撖寞芋撘�嚗��亙�蝚虫葡�勗�銝� `�倌:�嬋 撖寧����嚗:`嚗���蝑曆��潘��嚗;`嚗�����蝝笆��砍嚗{` �� `}`嚗蛹颲寧�蝚佗�蝞€��桃掩���隞���銝�

- �倌撖孵�蝪葉����蝘堆��潔��寞撖孵�����桃掩��銵蓮�U€�
- �芷��膩�€閬耨�寧���嚗��唳��銝€�渡����臭誑���
- ���妍�寥���嚗◇摨��喟揮閬€�
- 撖嫣�撋�蝪�摮�����蝑暹撘蛹"�嗥��倌.摮����倌"��
- 撋�蝪葉嚗���蝪�蝝��倌�妍�臭�嚗隞亦��亦蝪��倌��
- �倌撖孵�蝪葉����蝘堆��潭�桀笆摨�蝝��唳蝐餃�餈�頧祆��
- �芷��膩�€閬耨�寧���嚗����潔��渡����舐��乓€�
- ���妍�寥���嚗◇摨��喋€�
- 撖嫣�撋�蝪�摮�����蝑暹撘蛹 `�嗥��倌.摮����倌`��
- �亙�蝪�蝝�蝑曉�港葵蝪葉�臭�嚗��嗥��倌��
- �交���倌嚗�颲摮泵銝脣�頧祆銝箇��洵銝€銝芸�蝝��嫣噶隡�霈曄蔭蝚砌�銝芸�蝝€�

**蝷箔�:**

Expand All @@ -286,7 +288,7 @@ typedef cluster{
>
> `{subCluster.b2:On}` 銵函內撠�銝剖�蝪�撣�蝐餃��唳 `b2` 霈曄蔭銝� TRUE�隞�蝝��潔������亙€潔��€鈭� `b2` �臬銝€���臭誑��嗥��倌嚗�乩蝙�� `b2:On` 銋”蝷箇��頧祆��

**頧祆閫�2: ��蝑暹芋撘�**
**頧祆閫�2嚗��倌璅∪�**

撖嫣�蝪�銋��颲�唳摮泵銝莎��€潔��渡�����

Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@

[![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)
[![License](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)
[![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 and is specially optimized for manual input experience.
This library extends the [CSM](https://github.com/NEVSTOP-LAB/Communicable-State-Machine) (Communicable State Machine) framework's API parameters to support various data types in plain text format.

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.
It also includes two templates with built-in `Data: Get Configuration`, `Data: Set Configuration`, and `Data: Get Internal Data` states �� a ready-to-use starting point for CSM modules that need to read and write data in the `>> internal data >>` shift register.

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

Expand Down Expand Up @@ -310,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 first converted to variants and then transformed using CSM-HexStr.
Other data types are treated as variants and transformed using CSM-HexStr.
Binary file modified _test/Untitled 1.vi
Binary file not shown.
Loading
Loading