Skip to content

Commit 9ef3064

Browse files
authored
23 cluster more support (#24)
* [improve] for cluster/array, empty string will be ignore and use the connected prototype as output [update] #23 for cluster, if the label is not specified, the string will be converted to first element * update readme * [update] For SGL/DBL/Integer/Path/Complex/Array/Cluster, empty string will be converted to the input prototype value [update] For Timestamp, empty string will be converted to current time. * 更新 README.md
1 parent 9e0a073 commit 9ef3064

File tree

8 files changed

+305
-271
lines changed

8 files changed

+305
-271
lines changed
Binary file not shown.

CSM API String Arguments Support.vipb

Lines changed: 274 additions & 271 deletions
Large diffs are not rendered by default.
Binary file not shown.
Binary file not shown.
8.86 KB
Binary file not shown.
Binary file not shown.
884 Bytes
Binary file not shown.

README.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,10 @@ It Follows CSM's rule. '->|' '->' '-@' '-&' '>>' ',' ';' should be replaced with
2828

2929
### Boolean
3030

31+
_**special case**_:
32+
33+
- For Boolean, empty string will be converted to the input prototype value
34+
3135
``` text
3236
TRUE/FALSE String Pairs:
3337
- T/F
@@ -43,6 +47,10 @@ TRUE/FALSE String Pairs:
4347

4448
### Integer
4549

50+
_**special case**_:
51+
52+
- For Integer, empty string will be converted to the input prototype value
53+
4654
``` text
4755
Supported format:
4856
- 12345
@@ -59,6 +67,10 @@ Supported format:
5967

6068
### Float(DBL/SGL)
6169

70+
_**special case**_:
71+
72+
- For SGL/DBL, empty string will be converted to the input prototype value
73+
6274
``` text
6375
Supported Format:
6476
- 1.2345
@@ -75,8 +87,16 @@ Supported Format:
7587

7688
String of `a+bi` or `a-bi` stands of complex data type. `a` and `b` is supporting all Float format.
7789

90+
_**special case**_:
91+
92+
- For Complex, empty string will be converted to the input prototype value
93+
7894
### Timestamp
7995

96+
_**special case**_:
97+
98+
- For Timestamp, empty string will be converted to current time.
99+
80100
_**Condition1**_
81101

82102
`TimeStamp String(FormatString)`is supported. `FormatString` in "" will be used to parse `TimeStamp String`.
@@ -115,6 +135,10 @@ Enum = {1- AAA,5 - BBBB, 9 - CCCC}
115135

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

138+
_**special case**_:
139+
140+
- Empty String will be ignored and the prototype input will be used as output.
141+
118142
**Example:**
119143

120144
`a,b,c,d,e` and `[a,b,c,d,e]` stands for 5 elements array
@@ -145,6 +169,11 @@ a2 b2 c2 d2 e2
145169
':' is used for separating name and value, ';' is usd for separating elements. '{' & '}' are used for boundary symbol. If it's not within other array/cluster, boundary symbol is not indispensable. Not all elements should be described but the changing ones.
146170
It's helpful for CSM to reduce configuration setting API numbers. You can defined the configuration within a cluster and one single setting API for the config API.
147171

172+
_**special case**_:
173+
174+
- Empty String will be ignored and the prototype input will be used as output.
175+
- if no name is given, the string input will be converted to the first element of cluster. This is useful to make the first element primary.
176+
148177
**Example:**
149178

150179
Suppose a cluster as below:
@@ -161,6 +190,8 @@ U32 integer
161190

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

193+
`On`,`{On}` are similar to `{b:On}`. The first element of cluster will be changed to TRUE.
194+
164195
#### Other DataType
165196

166197
Other Datatype will be treated as variant and use CSM-HexStr for data transformation.

0 commit comments

Comments
 (0)