diff --git a/.markdownlint.json b/.markdownlint.json new file mode 100644 index 0000000..738430f --- /dev/null +++ b/.markdownlint.json @@ -0,0 +1,10 @@ +{ + "MD033": false, + "MD013": false, + "MD032": false, + "MD028": false, + "MD024": false, + "MD007": false, + "MD022": false, + "MD040": false +} \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..9fcb4ce --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,20 @@ +{ + "cSpell.words": [ + "Cacher", + "csmdoc", + "csmlog", + "CSMLS", + "CSMP", + "CSMQ", + "Evnt", + "Gevt", + "HEXSTR", + "lvclass", + "ogtk", + "Refnum", + "Splite", + "Struct", + "usecase" + ], + "files.autoGuessEncoding": true +} \ No newline at end of file diff --git a/CSM INI Static Variable Support.lvproj b/CSM INI Static Variable Support.lvproj index be94066..5fed078 100644 --- a/CSM INI Static Variable Support.lvproj +++ b/CSM INI Static Variable Support.lvproj @@ -102,8 +102,6 @@ - - @@ -146,12 +144,6 @@ - - - - - - @@ -212,7 +204,6 @@ - @@ -226,21 +217,13 @@ - - - - - - - - @@ -390,11 +373,6 @@ - - - - - @@ -403,8 +381,6 @@ - - diff --git a/CSM INI Static Variable Support.vipb b/CSM INI Static Variable Support.vipb index 2b3af0c..19cf213 100644 --- a/CSM INI Static Variable Support.vipb +++ b/CSM INI Static Variable Support.vipb @@ -1,7 +1,7 @@ - + NEVSTOP_lib_CSM_INI_Static_Variable_Support - 2025.9.0.1 + 2025.11.0.1 false . vip @@ -113,6 +113,12 @@ true <user.lib>\_NEVSTOP\Communicable State Machine(CSM)\_tool + + LabVIEW + false + true + <application> + @@ -139,6 +145,12 @@ true 1 + + help + 0 + true + 2 + . diff --git a/CSM Tool/CSM-INI Variable Viewer - DebugTool.vi b/CSM Tool/CSM-INI Variable Viewer - DebugTool.vi index 6990baa..43123e0 100644 Binary files a/CSM Tool/CSM-INI Variable Viewer - DebugTool.vi and b/CSM Tool/CSM-INI Variable Viewer - DebugTool.vi differ diff --git a/CSM Tool/_support/Populate all INI Variables to Tree.vi b/CSM Tool/_support/Populate all INI Variables to Tree.vi index 415b43a..9f9dbbb 100644 Binary files a/CSM Tool/_support/Populate all INI Variables to Tree.vi and b/CSM Tool/_support/Populate all INI Variables to Tree.vi differ diff --git a/Example/1. Used as parameters parsed by CSM.vi b/Example/1. Used as parameters parsed by CSM.vi index 33f4e11..b1c92b9 100644 Binary files a/Example/1. Used as parameters parsed by CSM.vi and b/Example/1. Used as parameters parsed by CSM.vi differ diff --git a/Example/2. Load the corresponding configuration by providing the prototype.vi b/Example/2. Load the corresponding configuration by providing the prototype.vi index 84ca2fb..959de27 100644 Binary files a/Example/2. Load the corresponding configuration by providing the prototype.vi and b/Example/2. Load the corresponding configuration by providing the prototype.vi differ diff --git a/Example/3. In CSM API parameters.vi b/Example/3. In CSM API parameters.vi index 0ce456a..529b98c 100644 Binary files a/Example/3. In CSM API parameters.vi and b/Example/3. In CSM API parameters.vi differ diff --git a/Example/4. Multi-file configuration systemvi.vi b/Example/4. Multi-file configuration system.vi similarity index 51% rename from Example/4. Multi-file configuration systemvi.vi rename to Example/4. Multi-file configuration system.vi index 374606d..02328d6 100644 Binary files a/Example/4. Multi-file configuration systemvi.vi and b/Example/4. Multi-file configuration system.vi differ diff --git a/Example/5. import Config.ini with include section.vi b/Example/5. import Config.ini with include section.vi new file mode 100644 index 0000000..baff924 Binary files /dev/null and b/Example/5. import Config.ini with include section.vi differ diff --git a/Example/6. Read Nested Variables.vi b/Example/6. Read Nested Variables.vi new file mode 100644 index 0000000..955a4c1 Binary files /dev/null and b/Example/6. Read Nested Variables.vi differ diff --git a/Example/6. import Config.ini with __include section.vi b/Example/6. import Config.ini with __include section.vi deleted file mode 100644 index a7db325..0000000 Binary files a/Example/6. import Config.ini with __include section.vi and /dev/null differ diff --git a/Example/7. Read Nested Variables.vi b/Example/7. Read Nested Variables.vi deleted file mode 100644 index b2ee484..0000000 Binary files a/Example/7. Read Nested Variables.vi and /dev/null differ diff --git a/Example/5. Write and Read Configuration.vi b/Example/7. Write and Read Configuration.vi similarity index 56% rename from Example/5. Write and Read Configuration.vi rename to Example/7. Write and Read Configuration.vi index 69b74b5..99d35cf 100644 Binary files a/Example/5. Write and Read Configuration.vi and b/Example/7. Write and Read Configuration.vi differ diff --git a/INI-Static-Variable-Support/As String.mnu b/INI-Static-Variable-Support/As String.mnu index 0da7f92..7c69eaf 100644 Binary files a/INI-Static-Variable-Support/As String.mnu and b/INI-Static-Variable-Support/As String.mnu differ diff --git a/INI-Static-Variable-Support/CSM - Configuration File Path.vi b/INI-Static-Variable-Support/CSM - Configuration File Path.vi index 8b069b9..2a6df12 100644 Binary files a/INI-Static-Variable-Support/CSM - Configuration File Path.vi and b/INI-Static-Variable-Support/CSM - Configuration File Path.vi differ diff --git a/INI-Static-Variable-Support/CSM - Load Configuration Variables From File.vi b/INI-Static-Variable-Support/CSM - Load Configuration Variables From File.vi index 2d4467c..d656450 100644 Binary files a/INI-Static-Variable-Support/CSM - Load Configuration Variables From File.vi and b/INI-Static-Variable-Support/CSM - Load Configuration Variables From File.vi differ diff --git a/INI-Static-Variable-Support/CSM - Mark All Temp Variables as Permanent.vi b/INI-Static-Variable-Support/CSM - Mark All Temp Variables as Permanent.vi index 5206847..de418f4 100644 Binary files a/INI-Static-Variable-Support/CSM - Mark All Temp Variables as Permanent.vi and b/INI-Static-Variable-Support/CSM - Mark All Temp Variables as Permanent.vi differ diff --git a/INI-Static-Variable-Support/CSM - Populate Configuration Variables.vi b/INI-Static-Variable-Support/CSM - Populate Configuration Variables.vi index cca40d3..8c8bf15 100644 Binary files a/INI-Static-Variable-Support/CSM - Populate Configuration Variables.vi and b/INI-Static-Variable-Support/CSM - Populate Configuration Variables.vi differ diff --git a/INI-Static-Variable-Support/CSM - Read Cluster Elements From Key.vim b/INI-Static-Variable-Support/CSM - Read Cluster Elements From Key.vim index 696a79a..a9815a6 100644 Binary files a/INI-Static-Variable-Support/CSM - Read Cluster Elements From Key.vim and b/INI-Static-Variable-Support/CSM - Read Cluster Elements From Key.vim differ diff --git a/INI-Static-Variable-Support/CSM - Read Cluster Elements From Session.vim b/INI-Static-Variable-Support/CSM - Read Cluster Elements From Session.vim index f04c19f..29c414b 100644 Binary files a/INI-Static-Variable-Support/CSM - Read Cluster Elements From Session.vim and b/INI-Static-Variable-Support/CSM - Read Cluster Elements From Session.vim differ diff --git a/INI-Static-Variable-Support/CSM - Read Configuration Variable.vim b/INI-Static-Variable-Support/CSM - Read Configuration Variable.vim index 9d05cb1..47b89c5 100644 Binary files a/INI-Static-Variable-Support/CSM - Read Configuration Variable.vim and b/INI-Static-Variable-Support/CSM - Read Configuration Variable.vim differ diff --git a/INI-Static-Variable-Support/CSM - Reset to Default.vi b/INI-Static-Variable-Support/CSM - Reset to Default.vi index e07c71b..3ba1aa7 100644 Binary files a/INI-Static-Variable-Support/CSM - Reset to Default.vi and b/INI-Static-Variable-Support/CSM - Reset to Default.vi differ diff --git a/INI-Static-Variable-Support/CSM - Restore Variable Value.vi b/INI-Static-Variable-Support/CSM - Restore Variable Value.vi index c44c43c..a3e5e73 100644 Binary files a/INI-Static-Variable-Support/CSM - Restore Variable Value.vi and b/INI-Static-Variable-Support/CSM - Restore Variable Value.vi differ diff --git a/INI-Static-Variable-Support/CSM - Sync Configuration Variables to File.vi b/INI-Static-Variable-Support/CSM - Sync Configuration Variables to File.vi index 8be8098..3cc77e3 100644 Binary files a/INI-Static-Variable-Support/CSM - Sync Configuration Variables to File.vi and b/INI-Static-Variable-Support/CSM - Sync Configuration Variables to File.vi differ diff --git a/INI-Static-Variable-Support/CSM - Unload Configuration Variable File.vi b/INI-Static-Variable-Support/CSM - Unload Configuration Variable File.vi index 16d23f6..b7b8249 100644 Binary files a/INI-Static-Variable-Support/CSM - Unload Configuration Variable File.vi and b/INI-Static-Variable-Support/CSM - Unload Configuration Variable File.vi differ diff --git a/INI-Static-Variable-Support/CSM - Write Configuration Variable.vim b/INI-Static-Variable-Support/CSM - Write Configuration Variable.vim index 9550995..5c89eaf 100644 Binary files a/INI-Static-Variable-Support/CSM - Write Configuration Variable.vim and b/INI-Static-Variable-Support/CSM - Write Configuration Variable.vim differ diff --git a/INI-Static-Variable-Support/Convert API String to Cluster(Default in Key).vim b/INI-Static-Variable-Support/Convert API String to Cluster(Default in Key).vim index 978de1f..ca87f2f 100644 Binary files a/INI-Static-Variable-Support/Convert API String to Cluster(Default in Key).vim and b/INI-Static-Variable-Support/Convert API String to Cluster(Default in Key).vim differ diff --git a/INI-Static-Variable-Support/Convert API String to Cluster(Default in Session).vim b/INI-Static-Variable-Support/Convert API String to Cluster(Default in Session).vim index 9d320e3..815c8ec 100644 Binary files a/INI-Static-Variable-Support/Convert API String to Cluster(Default in Session).vim and b/INI-Static-Variable-Support/Convert API String to Cluster(Default in Session).vim differ diff --git a/INI-Static-Variable-Support/INI-Static-Variable-Support.lvlib b/INI-Static-Variable-Support/INI-Static-Variable-Support.lvlib index b2be4ee..3b75705 100644 --- a/INI-Static-Variable-Support/INI-Static-Variable-Support.lvlib +++ b/INI-Static-Variable-Support/INI-Static-Variable-Support.lvlib @@ -6,6 +6,10 @@ true 3 + + + + @@ -30,30 +34,31 @@ - + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - + + diff --git a/INI-Static-Variable-Support/Multiple Files Support.mnu b/INI-Static-Variable-Support/Multiple Files Support.mnu index f72041c..5b092a8 100644 Binary files a/INI-Static-Variable-Support/Multiple Files Support.mnu and b/INI-Static-Variable-Support/Multiple Files Support.mnu differ diff --git a/INI-Static-Variable-Support/_Support/CSM - Read All Variable Names.vi b/INI-Static-Variable-Support/_Support/CSM - Read All Variable Names.vi index cb26f37..ac2f7f5 100644 Binary files a/INI-Static-Variable-Support/_Support/CSM - Read All Variable Names.vi and b/INI-Static-Variable-Support/_Support/CSM - Read All Variable Names.vi differ diff --git a/INI-Static-Variable-Support/_Support/CSM - Read File Logger Configuration from INI String.vi b/INI-Static-Variable-Support/_Support/CSM - Read File Logger Configuration from INI String.vi index 2ad95ea..21e09dd 100644 Binary files a/INI-Static-Variable-Support/_Support/CSM - Read File Logger Configuration from INI String.vi and b/INI-Static-Variable-Support/_Support/CSM - Read File Logger Configuration from INI String.vi differ diff --git a/INI-Static-Variable-Support/_Support/CSM - Read INI String.vi b/INI-Static-Variable-Support/_Support/CSM - Read INI String.vi index aa10588..6941861 100644 Binary files a/INI-Static-Variable-Support/_Support/CSM - Read INI String.vi and b/INI-Static-Variable-Support/_Support/CSM - Read INI String.vi differ diff --git a/INI-Static-Variable-Support/_Support/CSM - Read Key Names.vi b/INI-Static-Variable-Support/_Support/CSM - Read Key Names.vi index 7d9c5ed..15032ea 100644 Binary files a/INI-Static-Variable-Support/_Support/CSM - Read Key Names.vi and b/INI-Static-Variable-Support/_Support/CSM - Read Key Names.vi differ diff --git a/INI-Static-Variable-Support/_Support/CSM - Read Log Filter Rules from INI Strings.vi b/INI-Static-Variable-Support/_Support/CSM - Read Log Filter Rules from INI Strings.vi index d714ef3..9319832 100644 Binary files a/INI-Static-Variable-Support/_Support/CSM - Read Log Filter Rules from INI Strings.vi and b/INI-Static-Variable-Support/_Support/CSM - Read Log Filter Rules from INI Strings.vi differ diff --git a/INI-Static-Variable-Support/_Support/CSM - Read Sections.vi b/INI-Static-Variable-Support/_Support/CSM - Read Sections.vi new file mode 100644 index 0000000..683e1ec Binary files /dev/null and b/INI-Static-Variable-Support/_Support/CSM - Read Sections.vi differ diff --git a/INI-Static-Variable-Support/_Support/CSM - Read Sessions.vi b/INI-Static-Variable-Support/_Support/CSM - Read Sessions.vi index a473168..8440007 100644 Binary files a/INI-Static-Variable-Support/_Support/CSM - Read Sessions.vi and b/INI-Static-Variable-Support/_Support/CSM - Read Sessions.vi differ diff --git a/INI-Static-Variable-Support/_Support/CSM - Write INI String.vi b/INI-Static-Variable-Support/_Support/CSM - Write INI String.vi index 2c8714c..c9f594d 100644 Binary files a/INI-Static-Variable-Support/_Support/CSM - Write INI String.vi and b/INI-Static-Variable-Support/_Support/CSM - Write INI String.vi differ diff --git a/INI-Static-Variable-Support/_Support/CSMSVMgr/List Sessions.vi b/INI-Static-Variable-Support/_Support/CSMSVMgr/List Sessions.vi index 9c6f414..02e4e55 100644 Binary files a/INI-Static-Variable-Support/_Support/CSMSVMgr/List Sessions.vi and b/INI-Static-Variable-Support/_Support/CSMSVMgr/List Sessions.vi differ diff --git a/INI-Static-Variable-Support/_Support/INI-FGV(lvlibp).vi b/INI-Static-Variable-Support/_Support/INI-FGV(lvlibp).vi index 19d354e..998b972 100644 Binary files a/INI-Static-Variable-Support/_Support/INI-FGV(lvlibp).vi and b/INI-Static-Variable-Support/_Support/INI-FGV(lvlibp).vi differ diff --git a/INI-Static-Variable-Support/_Support/INI-FGV.vi b/INI-Static-Variable-Support/_Support/INI-FGV.vi index 7e1e151..53c575a 100644 Binary files a/INI-Static-Variable-Support/_Support/INI-FGV.vi and b/INI-Static-Variable-Support/_Support/INI-FGV.vi differ diff --git a/INI-Static-Variable-Support/_Support/Parse Used Session and Name.vi b/INI-Static-Variable-Support/_Support/Parse Used Session and Name.vi index 0e6e13b..b912854 100644 Binary files a/INI-Static-Variable-Support/_Support/Parse Used Session and Name.vi and b/INI-Static-Variable-Support/_Support/Parse Used Session and Name.vi differ diff --git a/INI-Static-Variable-Support/dir.mnu b/INI-Static-Variable-Support/dir.mnu index 6d6fd39..2d24ec8 100644 Binary files a/INI-Static-Variable-Support/dir.mnu and b/INI-Static-Variable-Support/dir.mnu differ diff --git a/README(zh-cn).md b/README(zh-cn).md index 1388a5c..fa6d642 100644 --- a/README(zh-cn).md +++ b/README(zh-cn).md @@ -70,7 +70,6 @@ CSM INI-Static-Variable-Support 库的架构设计如下图所示: - 初始化时,显式发送的参数具有最高优先级。 - 若未发送参数,则使用配置文件中的参数。 - 在没有配置文件参数的情况下,应用默认常量参数。 -- 参数可以部分指定,缺失的值会自动使用下一优先级的配置信息填充。 ![示例](.github/3.png) diff --git a/README.md b/README.md index 2d19d2e..1db8f43 100644 --- a/README.md +++ b/README.md @@ -70,7 +70,6 @@ Provides functionality to fix CSM API parameters with a defined priority hierarc - When initializing, explicitly sent parameters take precedence. - If no parameters are sent, configuration file parameters are used. - In the absence of configuration file parameters, default constant parameters are applied. -- Parameters can be partially specified, with missing values automatically filled using the next priority level. ![Example](.github/3.png) diff --git a/help/NEVSTOP/Communicable State Machine(CSM)/Examples/CSM INI-Variable Support(en-us).md b/help/NEVSTOP/Communicable State Machine(CSM)/Examples/CSM INI-Variable Support(en-us).md new file mode 100644 index 0000000..894748f --- /dev/null +++ b/help/NEVSTOP/Communicable State Machine(CSM)/Examples/CSM INI-Variable Support(en-us).md @@ -0,0 +1,242 @@ +# CSM INI-Variable Support + +## CSM Parsable Parameters (1. Used as parameters parsed by CSM.vi) + +### Overview + +CSM INI Variable Support provides CSM with simple and easy-to-use configuration file support, enabling users to configure applications without explicitly reading or writing configuration files. + +This example demonstrates how to use the INI Variable Support parsable parameters feature within CSM. + +### Introduction + +This example shows how to use the CSM INI Variable Support feature to store parameter information in an INI configuration file. INI variables use the CSM API String format. + +Variable Syntax: `${section.variable:defaultValue}` + +- **section:** The section name in the configuration file. The `section` parameter is optional. If omitted, the default configuration section `SectionName=LabVIEW` is used. +- **variable:** The variable name in the configuration file. +- **defaultValue:** The default value used when the variable is not defined in the configuration file. The `defaultValue` is optional. If unspecified, it defaults to an empty string (`""`). + +### Steps + +- Step1: Generate a temporary INI file and load it using the CSM - Load Configuration Variables From File VI. + +- Step2: Simulate a CSM module using a regular loop and use the CSM - Populate Configuration Variables VI to parse variables within a string into actual values. After running, compare the information displayed on the front panel with the comments to verify consistency. + + - Step2.1: In the code for this part, note that the section/variable does not exist in the configuration information. + - Step2.2: Expected result for the code execution in Step2.1. + - Step2.3: In the code for this part, note that CSM INI Variable Support is not limited to parameters. It can be used with any field. + - Step2.4: Expected result for the code execution in Step2.3. + + + +## Loading Configuration by Providing a Cluster Prototype (2. Load the corresponding configuration by providing the prototype.vi) + +### Overview + +Demonstrates loading configuration by providing a Cluster prototype. You can load configuration from an entire section or a specific key. + +### Introduction + +You can provide a Cluster prototype to load configuration. + +Functions supporting this feature: + +- **CSM - Read Cluster Elements From Session.vim:** Element names in the Cluster prototype are used as variable names in the configuration file. +- **CSM - Read Cluster Elements From Key.vim:** Requires a Key parameter. The cluster uses the API String format stored in the given section/key. + +**Special Case Note:** + +- If the variable is not defined in the configuration file, the element data from the provided prototype Cluster will be used. + +### Steps + +- Step1: Generate a temporary INI file and load it using `CSM - Load Configuration Variables From File.vi`. +- Step2: Load configuration using `CSM - Read Cluster Elements From Session.vim`. +- Step3: Use `CSM - Populate Configuration Variables.vi` to parse variables within strings into actual values. + + + +## Persisting CSM API Parameters (3. In CSM API parameters.vi) + +### Overview + +Demonstrates how to use the CSM INI Variable Support feature to persist parameter information in an INI configuration file. + +### Introduction + +This example shows how to persist parameter information in an INI configuration file using CSM INI Variable Support API, primarily through `Convert API String to Cluster(Default in Session).vim` or `Convert API String to Cluster(Default in Key).vim`. They function identically to their counterparts in CSM API String Support but add the functionality of reading INI configuration files. + +Data sources may include: information sent via message parameters, parameters in the configuration file, or default constant parameters provided at design time. They have a clear priority hierarchy: CSM API Parameters > Configuration File Parameters > Default Constant Parameters. + +**Notes:** + +- During initialization, explicitly sent parameters have the highest priority. +- If no parameters are sent, parameters from the configuration file are used. +- In the absence of configuration file parameters, default constant parameters are applied. +- Parameters can be partially specified. Missing values are automatically filled using configuration information from the next priority level. + +### Steps + +- Step1: Generate a temporary INI file and load it using `CSM - Load Configuration Variables From File.vi`. + +- Step2: Simulate a CSM module named "network" using a standard loop. + +- Step3: Assume the passed parameter is "ip:11.22.33.44". This information has the highest priority and overrides the configuration in the INI file. + + - Step3.1: `Convert API String to Cluster(Default in Session).vim` conversion loads the key with the same name from the section. The IP information is loaded from the parameter. The port is not provided in the parameter, but port is defined as 8080 in "network". So the final cluster port is 8080. + - Step3.2: `Convert API String to Cluster(Default in Session).vim` conversion loads configuration from the given section/key. The IP information is loaded from the parameter. The port is not provided in the parameter, but port is defined as 8081 in network.address1. Thus the final cluster port is 8081. + +- Step4: Assume the passed parameter is empty `""`, equivalent to providing no parameter. In this case, the configuration from the file is prioritized. + + - Step4.1: `Convert API String to Cluster(Default in Session).vim` conversion loads the key with the same name from the section. The IP information uses network.ip, resulting in IP: 10.144.41.41. The port uses network.port, resulting in 8080. + - Step4.2: `Convert API String to Cluster(Default in Session).vim` conversion loads configuration from the given section/key. Configuration is loaded from network.address1, resulting in IP:10.144.42.42 and port:8081. + +- Step5: Assume the passed parameter is empty `""`, equivalent to providing no parameter. The corresponding configuration is not defined in the INI configuration file. In this case, default constant parameters are used. + + - Step5.1: `Convert API String to Cluster(Default in Session).vim` conversion. The "non-existing module" section does not exist, so the provided reference data is used, resulting in IP:127.0.0.1 and port:80. + - Step5.2: `Convert API String to Cluster(Default in Session).vim` conversion. Load configuration from the given section/key, but neither exists. The provided reference data is used, resulting in IP:127.0.0.1 and port:80. + + + +## Multi-file Configuration System (4. Multi-file configuration system.vi) + +### Overview + +Demonstrates using CSM INI Variable Support API for multi-file configuration. + +### Introduction + +This example shows using CSM INI Variable Support API for multi-file configuration. You can use the multi-file configuration feature to implement a distributed configuration file system. + +CSM INI Variable Support API has a default configuration file that does not need to be explicitly loaded. The default configuration file automatically loads in the background when the application instance starts. You can find the default configuration file in one of the following locations: + +- **Development Mode:** The first INI configuration file found in the Application Directory. If no configuration file exists, it defaults to `csm-app.ini`. +- **Post-Compilation:** The INI configuration file with the same name as the executable located in the executable's directory. LabVIEW automatically generates this file after compilation. + +When loading multiple files, configuration items in subsequently loaded files overwrite identical items in previously loaded files. When saving cached changes to a file, modifications are saved to the last loaded configuration file. + +### Steps + +- **Step 1:** Generate a temporary INI file and load it using `CSM - Load Configuration Variables From File.vi`. +- **Step 2:** Generate another temporary INI file and load it using `CSM - Load Configuration Variables From File.vi`. Note that the resource key in the "RS232_Device" section will be overwritten. +- **Step 3:** Application scenario demonstration. + - **Step 3.1:** Read cluster configuration using `CSM - Read Cluster Elements From Session.vim`. + - **Step 3.2:** Used in parameter persistence. As you can see, without sending serial port information, `"SerialPort Initialize"` will initialize the serial port using information from the configuration file. + - **Step 3.3:** If serial port information is sent in Step 3.2, the sent information takes precedence, and `"SerialPort Initialize"` will initialize the serial port using the sent information. + + + +## Referencing Configuration Files with [__include] (5. import Config.ini with include section.vi) + +### Overview + +This example demonstrates CSM INI Variable Support API for referencing configuration files. You can use the reference configuration file feature to implement a distributed configuration file system. + +### Introduction + +In configuration files loaded by CSM INI Variable Support API, if a [__include] section is present, the specified configuration files will be automatically referenced. + +**Notes:** + +- Relative paths are resolved relative to the current configuration file's path. Absolute paths are used directly. +- Avoid circular dependencies, as they may lead to infinite loops. CSM INI Variable Support API maintains a record of loaded configuration files and skips loading if an attempt is made to load the same file a second time. +- The key names in [__include] are not important. They serve only as identifiers. The paths in the values are what matters. +- Configuration information in [__include] is loaded first, similar to loading first in a multi-file load scenario). Therefore, configuration items in the current configuration file will overwrite identical items in the referenced files. + +### Steps + +- Step1: Create multiple configuration files. Pay attention to internal reference relationships. Also note that [__include] is case-insensitive. +- Step2: Load the file using `CSM - Load Configuration Variables From File.vi`. +- Step3: Use `CSM - Configuration File Path.vi` to retrieve the paths of all currently loaded configuration files. +- Step4: Attempt to read configuration information, noting the actual effective configuration after considering overwrite relationships. + + + +## Nested Variables (6. Read Nested Variables.vi) + +### Overview + +CSM INI Variable Support API supports nested variable parsing, allowing keys to reference other keys for more flexible configuration definitions. The format follows ${section.variable:defaultValue}. This example demonstrates how to define and reference nested variables in a configuration file. + +### Introduction + +CSM INI Variable Support API supports nested variable parsing, allowing keys to reference other keys. + +- **Read API Behavior:** `CSM INI Read String.vi` retrieves the raw configuration value without parsing nested variables. All other read APIs automatically parse nested variables. +- **Write API Behavior:** All write APIs directly overwrite the configuration value. Generally, keys containing nested references should not be modified directly via write operations. + +**Configuration File Example:** + +``` +// Default Configuration +[network] +host = ${protocol}://${ip}:${port} +protocol = http +ip = "192.168.0.1" +port = 8080 +url = ${host}/API/v1/Get + +[case1] +addr = "${network.host}/API/v1/case1/Get" + +[case2] +network.host = 127.0.0.1 +addr = "${network.host}/API/v2/case2/Get" + +[RT] +select = 1 +addr = ${case${select}.addr} + +[info] +operator = mary +date = #fill by user +time = #fill by user +test = board + +[file] +root = d:/data +path = ${root}/${info.operator}/${info.date}/${info.test}${info.time}.tdms +``` + +Using the configuration file example above: + +**Scenario 1:** Reading `${file.path}` returns an actual file path dynamically composed of other configuration items, enabling flexible path definitions. + +**Scenario 2:** The `[case1]` and `[case2]` sections define two different sets of related configuration information. By modifying `${RT.select}`, you can switch the result of accessing `${RT.addr}`. + +### Steps + +- Step1: Generate a temporary INI file and load it using `CSM - Load Configuration Variables From File.vi`. +- Step2: Nested variables reference values in the same section. + - Step2.1: `CSM - Read INI String` loads the raw configuration and does not parse nested variables. + - Step2.2: `CSM - Read Configuration Variable.vim` parses nested variables. + - Step2.3: `CSM - Populate Configuration Variables.vi` parses nested variables. +- Step3: Reference configuration from other sections within nested variables. When a section is specified, the specified section is used. Otherwise, the current section's configuration is prioritized. +- Step4: Demonstrate that variable names in nested variables can also be references. For example, `${case${select}.addr}`. + - Step4.1: Modify `${RT.select}` to `2`. + - Step4.2: Reading `${RT.addr}` will return `${case2.addr}`. + - Step4.3: (Optional) Manually modify `${RT.select}` to `1`. Run again and observe the change in configuration information. +- Step5: Demonstrate the scenario of concatenating product paths using different field information. For example, defining `file.path = ${root}/${info.operator}/${info.date}/${info.test}${info.time}.tdms`). + - Step5.1: By modifying `info.date` and `info.time`, you can observe that the actually parsed path for `file.path` changes dynamically based on the configuration information. + + + +## Modifying Configuration Information (7. Write and Read Configuration.vi) + +### Overview + +Demonstrates modifying configuration information using CSM INI Variable Support API. + +### Introduction + +CSM INI VariableSupport provides APIs for modifying configuration information. You can use these APIs to dynamically update key-value pairs in the configuration file. Note that to improve efficiency, CSM INI Variable Support uses a global cache modification flag in read functions. When the overall configuration has not changed, cached data is used for rapid access. Frequent configuration changes will reduce the effectiveness of the caching mechanism in Read VIs. Therefore, this library is not recommended for scenarios requiring frequent configuration modifications. + +You can use `CSM - Write Configuration Variable.vi` and `CSM - Write INI String.vi` to modify configuration information. + +**Notes:** + +- By default, configurations modified in memory are not automatically synchronized to the configuration file. You need to call `CSM - Sync Configuration Variables to File.vi` to synchronize them to the file. +- Modified variables will only be preserved when synchronized to the file if the original configuration file defined those specific configuration items. If the original configuration file did not define certain items, the modified variables are saved only in memory by default and are not synchronized to the file. +- You can call `CSM - Mark All Temp Variables as Permanent.vi` to mark all temporary variables as permanent, ensuring that all variables are preserved when synchronized to the configuration file. \ No newline at end of file diff --git a/help/NEVSTOP/Communicable State Machine(CSM)/Examples/CSM INI-Variable Support(zh-cn).md b/help/NEVSTOP/Communicable State Machine(CSM)/Examples/CSM INI-Variable Support(zh-cn).md new file mode 100644 index 0000000..9a15be9 --- /dev/null +++ b/help/NEVSTOP/Communicable State Machine(CSM)/Examples/CSM INI-Variable Support(zh-cn).md @@ -0,0 +1,224 @@ +# CSM INI-Variable Support + +## CSM 可解析参数(1. Used as parameters parsed by CSM.vi) + +### Overview + +CSM INI Variable Support为CSM提供简单易用的配置文件支持功能,使用户能够配置应用程序而无需显式读写配置文件。 + +本范例用于展示如何在CSM中使用INI Variable Support可解析参数的功能。 + +### Introduction + +展示如何使用CSM INI Variable Support功能将参数信息固化在INI配置文件中。INI变量使用CSM API String的格式。 + +变量:${section.variable:defaultValue} + - section:配置文件中的节名。section参数为可选。省略时,使用默认配置段SectionName=LabVIEW。 + - variable:配置文件中的变量名。 + - defaultValue:默认值,当配置文件中未定义该变量时使用。默认值为可选,未指定时默认为空字符串("")。 + +### Steps + +- step1:生成一个临时的INI文件,使用CSM - Load Configuration Variables From File VI加载该文件。 +- step2:使用一个普通的循环模拟一个CSM模块,使用CSM - Populate Configuration Variables VI将字符串中的变量解析为实际值。运行后,可以比较界面显示的信息是否与注释相同。 + - step2.1:这部分的代码中,注意section/variable 在配置信息中是不存在的。 + - step2.2:step2.1部分代码运行的期望结果。 + - step2.3:这部分的代码中,注意并不只是参数可以使用CSM INI Variable Support,任意字段都可以使用。 + - step2.4:step2.3部分代码运行的期望结果。 + +## 提供参考Cluster的配置加载 (2. Load the corresponding configuration by providing the prototype.vi) + +### Overview + +本范例展示通过提供Cluster prototype加载配置。您可以从整个节或特定键加载配置。 + +### Introduction + +可以提供一个Cluster prototype来加载配置。 + +支持这个功能的函数为: + - CSM - Read Cluster Elements From Session.vim:Cluster prototype 中的元素名称会被作为配置文件中的变量名。 + - CSM - Read Cluster Elements From Key.vim:需要提供Key参数,cluster 使用API String格式存储在给定的section/key中。 + +特殊情况说明: +- 如果配置文件中未定义该变量,将使用提供原型的Cluster的元素数据。 + +### Steps + +- step1:生成一个临时的INI文件,使用CSM - Load Configuration Variables From File.vi加载该文件。 +- step2:使用CSM - Read Cluster Elements From Session.vim加载配置。 +- step3:使用CSM - Populate Configuration Variables.vi将字符串中的变量解析为实际值。 + + + +## 固化CSM API参数(3. In CSM API parameters.vi) + +### Overview + +本范例展示如何使用CSM INI Variable Support功能将参数信息固化在INI配置文件中。 + +### Introduction + +展示如何使用CSM INI Variable Support功能将参数信息固化在INI配置文件中。只要依靠`Convert API String to Cluster(Default in Session).vim`或`Convert API String to Cluster(Default in Key).vim`来实现。它们和CSM API String Support中同名的函数功能相同,但是添加了读取INI配置文件的功能。 + +在此情况下,数据的来源可能是:通过消息参数发送过的信息、配置文件中的参数或者当前编写时提供的默认常量参数。它们具有明确的优先级层次:CSM API参数 > 配置文件参数 > 默认常量参数。需要注意: +- 初始化时,显式发送的参数具有最高优先级。 +- 若未发送参数,则使用配置文件中的参数。 +- 在没有配置文件参数的情况下,应用默认常量参数。 +- 参数可以部分指定,缺失的值会自动使用下一优先级的配置信息填充。 + +### Steps + +- step1:生成一个临时的INI文件,使用`CSM - Load Configuration Variables From File.vi`加载该文件。 +- step2:使用一个普通的循环模拟一个CSM模块,模块的名称为“network”。 +- step3:假设传递过来的参数为“ip:11.22.33.44”,此时这个信息优先级最高,会覆盖配置文件中的配置。 + - step3.1:`Convert API String to Cluster(Default in Session).vim`转换,从section中载入同名的key。IP信息从参数中载入;port由于参数中没有提供,但是“network”中定义了port为8080,所以最后cluster中port为8080。 + - step3.2:`Convert API String to Cluster(Default in Session).vim`转换,从给定的section/key载入配置。IP信息从参数中载入;port由于参数中没有提供,但是network.address1中定义了port为8081,所以最后cluster中port为8081。 +- step4:假设传递过来的参数为空"",相当于没有提供参数,此时优先采用配置文件中的配置。 + - step4.1:`Convert API String to Cluster(Default in Session).vim`转换,从section中载入同名的key。ip信息使用network.ip,结果是10.144.41.41;port使用network.port,结果是 8080。 + - step4.2:`Convert API String to Cluster(Default in Session).vim`转换,从给定的section/key载入配置。从network.address1中载入配置,结果为ip:10.144.42.42,port:8081。 +- step5:假设传递过来的参数为空"",相当于没有提供参数;同时INI配置文件中也没有定义对应的配置,此时采用默认常量参数。 + - step5.1:`Convert API String to Cluster(Default in Session).vim`转换,"non-existing module" section不存在,使用提供的参考数据,结果为ip:127.0.0.1,port:80。 + - step5.2:`Convert API String to Cluster(Default in Session).vim`转换,从给定的section/key载入配置,但是section/key都不存在。使用提供的参考数据,结果为ip:127.0.0.1,port:80。 + + + +## 多文件配置系统(4. Multi-file configuration system.vi) + +### overview + +本范例展示CSM INI Variable Support API对于多文件配置的支持。 + +### Introduction + +本范例展示CSM INI Variable Support API对于多文件配置的支持。利用多文件配置功能,可实现分布式配置文件系统。 + +CSM INI Variable Support API具有一个默认的配置文件,无需显示加载,会在程序实例启动时后台自动载入。 + +- 开发状态:Application directory中找到的第一个INI配置文件。若不存在配置文件,则默认为`csm-app.ini`。 +- 编译后:可执行文件所在目录中与可执行文件同名的INI配置文件。LabVIEW编译后会自动生成此文件。 + +加载多个文件时,后加载的文件会覆盖先前加载文件中的相同配置项。将缓存更改保存到文件时,修改会保存到最后加载的配置文件中。 + +### Steps + +- step1:生成一个临时的INI文件,使用`CSM - Load Configuration Variables From File.vi`加载该文件。 +- step2:再生成一个临时的INI文件,使用`CSM - Load Configuration Variables From File.vi`加载该文件,需要注意的是,“RS232_Device” section中的resource key会被覆盖。 +- step3:应用场景展示。 + - step3.1:使用`CSM - Read Cluster Elements From Session.vim`读取cluster配置。 + - step3.2:在参数固化中使用。可以看出,无需发送串口的信息,"SerialPort Initialize"中会使用配置文件中的信息初始化串口。 + - step3.3:step3.2中如果发送了串口信息,以发送的信息为准,"SerialPort Initialize"中会使用发送的信息初始化串口。 + + + +## 使用 [__include] 引用配置文件(5. import Config.ini with include section.vi) + +### Overview + +本范例展示CSM INI Variable Support API对于引用配置文件的支持。利用引用配置文件功能,可实现分布式配置文件系统。 + +### Introduction + +CSM INI Variable Support API载入的配置文件中,若包含 [__include] 段落,会自动引用指定的配置文件。需要注意的是: + +- 如果是相对路径,会相对于当前配置文件的路径进行解析;如果是绝对路径,会直接使用该路径。 +- 请注意避免循环依赖,否则可能导致无限循环。CSM INI Variable Support API会维护已加载配置文件的记录,当第二次尝试加载同一文件时,将跳过该次加载操作。 +- [__include] 中的key名称不重要,只作为一个标识,value中的路径才是重要的。 +- [__include] 中的配置信息会先被载入,类似多文件加载时先加载,因此当前配置文件中的配置项会覆盖引用文件中的相同配置项。 + +### steps + +- step1:创建多个配置文件,注意内部引用关系。另外注意[__include]大消息不敏感。 +- step2:使用`CSM - Load Configuration Variables From File.vi`加载该文件 +- step3:可以使用`CSM - Configuration File Path.vi`获取当前加载的所有配置文件路径。 +- step4:尝试读取配置信息,请注意覆盖关系后,实际生效的配置。 + + + +## 嵌套变量(6. Read Nested Variables.vi) + +### Overview + +CSM INI Variable Support API支持嵌套变量解析,允许在键中引用其他键,实现更灵活的配置定义。格式遵循 ${section.variable:defaultValue}。本范例展示了如何在配置文件中定义和引用嵌套变量。 + +### Introduction + +CSM INI Variable Support API支持嵌套变量解析,允许在键中引用其他键,实现更灵活的配置定义。格式遵循 ${section.variable:defaultValue}。 + +- 读取API行为:`CSM INI Read String.vi`获取原始配置值而不解析嵌套变量。其他所有读取API都会自动解析嵌套变量。 +- 写入API行为:所有写入API都会直接覆盖配置值。通常情况下,包含嵌套引用的键不应通过写入操作直接修改。 + +举例: + +``` +// 默认配置 +[network] +host = ${protocol}://${ip}:${port} +protocol = http +ip = "192.168.0.1" +port = 8080 +url = ${host}/API/v1/Get + +[case1] +addr = "${network.host}/API/v1/case1/Get" + +[case2] +network.host = 127.0.0.1 +addr = "${network.host}/API/v2/case2/Get" + +[RT] +select = 1 +addr = ${case${select}.addr} + +[info] +operator = mary +date = #fill by user +time = #fill by user +test = board + +[file] +root = d:/data +path = ${root}/${info.operator}/${info.date}/${info.test}${info.time}.tdms +``` + +使用上面的配置文件示例: + +场景1:读取`${file.path}`会返回一个由其他配置项动态组合而成的实际文件路径,从而实现灵活的路径定义。 +场景2:`[case1]`和`[case2]`节定义了两组不同的相关配置信息。通过修改`${RT.select}`,您可以切换访问`${RT.addr}`的结果。 + +### steps + +- step1:生成一个临时的INI文件,使用`CSM - Load Configuration Variables From File.vi`加载该文件。 +- step2:嵌套变量中引用同一个section的配置。 + - step2.1:`CSM - Read INI String.vi`加载的是原始配置,不会解析嵌套变量。 + - step2.2:`CSM - Read Configuration Variable.vim`会解析嵌套变量。 + - step2.3:`CSM - Populate Configuration Variables.vi`会解析嵌套变量。 +- step3:嵌套变量中引用的其他section的配置,当指明section时,使用指定的section,否则优先使用当前section的配置。 +- step4:展示嵌套变量中变量名也可以引用的情况,例如:`${case${select}.addr}`。 + - step4.1:修改$`{RT.select}`为 2。 + - step4.2:读取`${RT.addr}`会返回`${case2.addr}`。 + - step4.3:(Optional)手动修改 修改`${RT.select}`为1, 再次运行,查看配置信息的变化。 +- step5:展示使用不同字段信息拼接产品路径的场景,例如定义了`file.path = ${root}/${info.operator}/${info.date}/${info.test}${info.time}.tdms`。 + - step5.1:通过修改`info.date`和`info.time`, 可以发现`file.path`实际解析的路径会根据配置信息动态变化。 + + + +## 修改配置信息(7. Write and Read Configuration.vi) + +### overview + +本范例展示CSM INI Variable Support API修改配置信息。 + +### Introduction + +CSM INI Variable Support提供了修改配置信息的API。您可以使用这些API来动态更新配置文件中的键值对。请注意,由于CSM INI Variable Support为了提高效率,在读取函数处均使用全局缓存修改标志,当整体配置没有发生变化时,会快速的使用缓存的数据,提高读取效率。频繁的配置更改会降低读取VI中缓存机制的有效性。因此,本库不建议用于需要频繁修改配置的场景。 + +可以使用`CSM - Write Configuration Variable.vi`和`CSM - Write INI String.vi`来修改配置信息。 + +需要注意的是: +- 默认内存中修改的配置,不会自动同步到配置文件中,需要调用`CSM - Sync Configuration Variables to File.vi`来同步到配置文件中。 +- 原始配置文件定义某些配置项,才可以在同步保存到配置文件时保留下来。如果原始配置文件没有定义某些配置项,修改的变量默认只会保存在内存中,不会同步到配置文件中。 +- 可以调用`CSM - Mark All Temp Variables as Permanent.vi`将所有临时变量标记为永久变量,这样在同步保存到配置文件时,所有变量都会被保留下来。 + + + diff --git a/help/NEVSTOP/Communicable State Machine(CSM)/VI Description/VI Description(en-us)/VI Description(en-us) - Addon INI-Variable.md b/help/NEVSTOP/Communicable State Machine(CSM)/VI Description/VI Description(en-us)/VI Description(en-us) - Addon INI-Variable.md new file mode 100644 index 0000000..156b8a8 --- /dev/null +++ b/help/NEVSTOP/Communicable State Machine(CSM)/VI Description/VI Description(en-us)/VI Description(en-us) - Addon INI-Variable.md @@ -0,0 +1,334 @@ +# CSM INI-Variable Addon + +> [!NOTE] +> CSM INI-Variable Addon +> +> Configuration files are an essential component of application development. The CSM INI-Variable Addon provides simple and easy-to-use configuration file support for CSM, allowing users to configure applications without explicitly reading or writing configuration files. +> +> CSM INI-Variable configuration file data uses the CSM API String format. +> +> The following are key features: +> 1. Default Configuration Handling: Automatically loads the default configuration file upon the first library function call, eliminating the need for explicit user loading. +> 2. Multi-File Support: Supports loading multiple configuration files via specialized functions. +> 3. Memory Caching: Maintains a cached copy in memory. Applications retrieve configuration information from this cache. +> 4. INI Format Compatibility: Both configuration files and the memory copy use the standard INI format, supporting sections and key-value pairs. +> 5. Efficient Caching Mechanism: Optimizes performance using a global modification flag, re-reading the memory copy only when the configuration has been modified. +> +> This library includes and utilizes a copy of [LabVIEW-Config](https://github.com/rcpacini/LabVIEW-Config) developed by [@rcpacini](https://github.com/rcpacini). + +> [!NOTE] +> CSM INI-Variable Format +> +> Format Definition: `${section.variable:defaultValue}` +> - `${}`: Variable reference syntax. +> - `section` (Optional): The section name in the configuration file. +> - `variable`: The variable name in the configuration file. +> - `defaultValue` (Optional): The default value used when the variable does not exist. +> +> Notes: +> - Supports nested variable references. For example, `${section1.variable1:${section2.variable2:defaultValue2}}`. +> - The `section` parameter is optional. If omitted, the default configuration section `SectionName=LabVIEW` is used. +> - The default value is optional. If unspecified, it defaults to an empty string (""). + +> [!NOTE] +> CSM INI-Variable Configuration File Path +> +> - Development State: The first INI configuration file found in the Application Directory. If no configuration file exists, it defaults to `csm-app.ini`. +> - Post-Compilation: An INI configuration file in the same directory as the executable file, with the same name as the executable. LabVIEW automatically generates this file after compilation. +> - Supports loading multiple configuration files. Configuration items in files loaded later will overwrite identical items in previously loaded files. +> - Configuration files can use the `[__include]` section to reference other configuration files. +> - Supports both relative and absolute paths. +> - Relative paths are relative to the path of the current configuration file. +> - The name of the configuration file in the `[__include]` section is not critical, as long as the path is correct. +> - To avoid circular references, the same configuration file will be automatically ignored if loaded a second time. + +> [!NOTE] +> CSM INI-Variable Multi-File Configuration Scenario +> +> - When loading multiple files, configuration items in files loaded later will overwrite identical items in previously loaded files. +> - When saving cache changes to a file, modifications are saved to the configuration file loaded last. + +> [!WARNING] CSM INI-Variable Caching Mechanism Warning +> +> Note that since this library uses a global cache modification flag, frequent configuration changes will reduce the effectiveness of the caching mechanism in reading VIs. Therefore, this library is not recommended for scenarios requiring frequent configuration modifications. + +## Core Function VIs + +### CSM - Populate Configuration Variables.vi +Populates configuration variables within a string. + +Application Scenario: Using INI-Variable variables directly in CSM scripts or serving as arguments for CSM messages. + +Reference Example: `1. Used as parameters parsed by CSM.vi`. + +> - Ref: CSM INI-Variable Addon +> - Ref: CSM INI-Variable Format +> - Ref: CSM INI-Variable Configuration File Path + +-- Controls -- +- Section Name ("" as Default): Section name. An empty string indicates the default section. +- String with INI-Variable: Input string containing variable references. + +-- Indicators -- +- String: Output string with populated variables. + +### CSM - Read Configuration Variable.vim +Reads a variable value from the configuration based on a prototype. +- It is recommended to use a cluster as the configuration prototype, where element names in the cluster correspond to variable names in the INI configuration file. +- If using other data types, the corresponding variable name is `Config`. +- If the variable corresponding to the prototype does not exist in the configuration, the Write If not found? parameter determines whether to write the default value. + +Application Scenario: Reading configuration directly from an INI configuration file into LabVIEW data. + +Reference Example: `2. Load the corresponding configuration by providing the prototype.vi`. + +> - Ref: CSM INI-Variable Configuration File Path + +-- Controls -- +- Configuration Prototype (Cluster Preferred): Configuration prototype (Cluster is preferred). +- Section Name ("" as Default): Section name. An empty string indicates the default section. +- Write If not found? (F): Whether to write the default value if the variable is not found. The default is FALSE. + +-- Indicators -- +- Configuration: Output configuration value. + +### CSM - Read Cluster Elements From Session.vim +Reads cluster data from the configuration. The data is stored in the specified section, and element names in the cluster correspond to keys in the section. +- If the specified section does not exist, the default section is used. +- If a key corresponding to a cluster element does not exist, the value from the input prototype is used as the default value. + +Application Scenario: Reading configuration directly from an INI configuration file into LabVIEW data. + +Reference Example: `2. Load the corresponding configuration by providing the prototype.vi`. + +> - Ref: CSM INI-Variable Configuration File Path + +-- Controls -- +- Cluster: Cluster prototype. +- Section Name ("" as Default): Section name. An empty string indicates the default section. + +-- Indicators -- +- Cluster out: Output cluster. + +### CSM - Read Cluster Elements From Key.vim +Reads cluster data from the configuration. The data is stored in a specified key within a specified section, and the data is saved in API String format. + +Application Scenario: Reading configuration directly from an INI configuration file into LabVIEW data. + +Reference Example: `2. Load the corresponding configuration by providing the prototype.vi`. + +> - Ref: CSM INI-Variable Configuration File Path + +-- Controls -- +- Cluster: Cluster prototype. +- Key: Key name. +- Section Name ("" as Default): Section name. An empty string indicates the default section. + +-- Indicators -- +- Cluster out: Output cluster. +- Key Found?: Whether the key exists. + +### CSM - Write Configuration Variable.vim +Writes a configuration variable. +- It is recommended to use a cluster as the configuration prototype, where element names in the cluster correspond to variable names in the INI configuration file. +- If using other data types, the corresponding variable name is `Config`. + +Reference Example: `7. Write and Read Configuration.vi`. + +> - Ref: CSM INI-Variable Configuration File Path +> - Ref: CSM INI-Variable Caching Mechanism Warning + +-- Controls -- +- Configuration: Configuration data to be written. +- Section Name ("" as Default): Section name. An empty string indicates the default section. + +-- Indicators -- +- Configuration (dup): A copy of the written configuration data. + +### Convert API String to Cluster(Default in Session).vim +Converts an API String to a cluster. The data is stored in the specified section, and element names in the cluster correspond to keys in the section. This VI follows a defined priority hierarchy: CSM API Parameters > Configuration File Parameters > Default Constant Parameters. This makes it simple to fix serial port initialization parameters in a configuration file. + +- During initialization, explicitly sent parameters have the highest priority. +- If no parameters are sent, parameters from the configuration file are used. +- In the absence of configuration file parameters, default constant parameters are applied. + +Application Scenario: Used to save CSM parameters into a configuration file. + +Reference Example: `3. In CSM API parameters.vi`. + +-- Controls -- +- API String: Input API String. +- Section Name ("" as Default): Section name. An empty string indicates the default section. +- Type: Data type. + +-- Indicators -- +- Data: Converted data. +- error: Error information. + +### Convert API String to Cluster(Default in Key).vim +Converts an API String to a cluster. The data is stored in a specified key within a specified section. This VI follows a defined priority hierarchy: CSM API Parameters > Configuration File Parameters > Default Constant Parameters. This makes it simple to fix serial port initialization parameters in a configuration file. + +- During initialization, explicitly sent parameters have the highest priority. +- If no parameters are sent, parameters from the configuration file are used. +- In the absence of configuration file parameters, default constant parameters are applied. + +Application Scenario: Used to save CSM parameters into a configuration file. + +Reference Example: `3. In CSM API parameters.vi`. + +-- Controls -- +- API String: Input API String. +- Section Name ("" as Default): Section name. An empty string indicates the default section. +- Type: Data type. +- Variable Name: Variable name. + +-- Indicators -- +- Data: Converted data. +- error: Error information. + +## Raw Configuration Read and Write + +### CSM - Read All Variable Names.vi +Reads all variable names currently in memory. + +-- Controls -- +- Permanent Variables Only? (F): Whether to read only permanent variables. + +-- Indicators -- +- All Variable Names: Array of variable names. + +### CSM - Read Sections.vi +Reads all section names currently in memory. + +-- Indicators -- +- Sections: Array of section names. + +### CSM - Read Key Names.vi +Reads all key names in a specified section. + +-- Controls -- +- Section Name ("" as Default): Section name. An empty string indicates the default section. + +-- Indicators -- +- Keys: Array of key names. + +### CSM - Read INI String.vi +Reads the configuration information string. This VI retrieves the raw string description without replacing INI variable references. + +Application Scenario: Need to read raw configuration information instead of configuration information after replacing internal variable references. + +Reference Example: `6. Read Nested Variables.vi`. + +-- Controls -- +- Section Name ("" as Default): Section name. An empty string indicates the default section. +- Key: Input string containing variable references. +- Default Value: Default value. +- Write If not found? (F): Whether to write the default value if not found. + +-- Indicators -- +- Value: Output string after replacing variables. +- Key Found?: Whether the key exists. + +### CSM - Write INI String.vi +Writes configuration information string. + +Reference Example: `6. Read Nested Variables.vi`. + +> - Ref: CSM INI-Variable Caching Mechanism Warning + +-- Controls -- +- Section Name ("" as Default): Section name. An empty string indicates the default section. +- Key: Key name. +- Value: Variable value string. + +-- Indicators -- +- Key Replace?: Whether the key was replaced. + +## Multi-File Support and Configuration Management + +### CSM - Configuration File Path.vi +Returns the paths of all loaded configuration files. + +Reference Example: `5. import Config.ini with __include section.vi`. + +> - Ref: CSM INI-Variable Configuration File Path + +-- Controls -- +- Include All Paths?(F): Whether to include all configuration file paths. + +-- Indicators -- +- Default Config File Path: Default configuration file path. +- All Config Files: List of all configuration files. + +### CSM - Load Configuration Variables From File.vi +Loads configuration variables from a specified file. If the section name postfix is not empty, the loaded section names will have this postfix appended. + +Section Postfix ("") is primarily used when loading multiple configuration files that have identical sections. For example, two configuration files `Hardware1.ini` and `Hardware2.ini` both have a section named `Serial` with identical internal keys indicating serial port configuration. In this case, the configuration in the file loaded later would overwrite the configuration in the file loaded earlier. Using Section Postfix ("") prevents section name conflicts. + +Reference Example: `5. import Config.ini with __include section.vi`. + +> - Ref: CSM INI-Variable Configuration File Path + +-- Controls -- +- Configuration Path: Configuration file path. +- Section Postfix (""): Section name postfix. + +### CSM - Unload Configuration Variable File.vi +Unloads a configuration variable file. + +> - Ref: CSM INI-Variable Configuration File Path + +-- Controls -- +- Path: Configuration file path. + +### CSM - Mark All Temp Variables as Permanent.vi +Marks all temporary variables as permanent variables and stores the variables into the specified configuration file. + +Note: Although marked as permanent variables, these variables will still not be synchronized to the file if CSM - Sync Configuration Variables to File VI is not used. + +> - Ref: CSM INI-Variable Configuration File Path + +-- Controls -- +- Path ("" to Use Default File): Configuration file path. An empty string indicates the default INI file. + +### CSM - Sync Configuration Variables to File.vi +Synchronizes variables in memory to the specified configuration file. + +Note: Only permanent variables are synchronized to the file. If you want to write temporary variables to the file, you need to mark the temporary variables as permanent in advance. + +> - Ref: CSM INI-Variable Configuration File Path + +-- Controls -- +- All Temp Variable to Default Ini(F): Whether to synchronize all temporary variables to the default INI file. +- Write UnSupported Datatype?(F): Whether to write unsupported data types. + +### CSM - Restore Variable Value.vi +Restores variable values. Refreshes all permanent variables to the configuration values loaded initially. Temporary variables are not be modified. + +> - Ref: CSM INI-Variable Configuration File Path + +### CSM - Reset to Default.vi +Resets the configuration to default values. All variables will be cleared, and all configurations will be reloaded from the currently loaded configuration files. + +> - Ref: CSM INI-Variable Configuration File Path + +## Utility VIs + +### CSM - Read Log Filter Rules from INI Strings.vi +Reads log filter rules from the configuration. This configuration is primarily used with the following VIs: + +- `CSM - Set Log Filter Rules.vi` +- `addons\Logger\CSM - Start File Logger.vi` + +### CSM - Read File Logger Configuration from INI String.vi +Reads log recording configuration from the configuration. This configuration is primarily used with the following VI: + +- `addons\Logger\CSM - Start File Logger.vi` + +## Debugging Tools + +### CSM-INI Variable Viewer - DebugTool.vi + +CSM INI-Variable is a global configuration information. This tool is used to view and debug the current configuration information in memory. + +> - Ref: CSM INI-Variable Addon diff --git a/help/NEVSTOP/Communicable State Machine(CSM)/VI Description/VI Description(zh-cn)/VI Description(zh-cn) - Addon INI-Variable.md b/help/NEVSTOP/Communicable State Machine(CSM)/VI Description/VI Description(zh-cn)/VI Description(zh-cn) - Addon INI-Variable.md new file mode 100644 index 0000000..732bc60 --- /dev/null +++ b/help/NEVSTOP/Communicable State Machine(CSM)/VI Description/VI Description(zh-cn)/VI Description(zh-cn) - Addon INI-Variable.md @@ -0,0 +1,333 @@ +# CSM INI-Variable Addon + +> [!NOTE] +> CSM INI-Variable Addon +> +> 配置文件是应用程序开发中不可或缺的组成部分。CSM INI-Variable Addon为CSM提供简单易用的配置文件支持功能,使用户能够配置应用程序而无需显式读写配置文件。 +> +> CSM INI-Variable配置文件数据的格式使用CSM API String格式。 +> +> 主要特点包括: +> 1. 默认配置处理: 首次调用库函数时自动加载默认配置文件,无需用户显式加载。 +> 2. 多文件支持: 通过专用函数支持加载多个配置文件。 +> 3. 内存缓存: 在内存中维护一个缓存副本,应用程序从该缓存中获取配置信息。 +> 4. INI格式兼容: 配置文件和内存副本均采用标准INI格式,支持节和键值对。 +> 5. 高效缓存机制: 使用全局修改标记优化性能,仅在配置发生修改时才重新读取内存副本。 +> +> 本库包含并使用了由[@rcpacini](https://github.com/rcpacini)开发的[LabVIEW-Config](https://github.com/rcpacini/LabVIEW-Config)的副本。 + +> [!NOTE] +> CSM INI-Variable变量格式 +> +> 格式定义: `${section.variable:defaultValue}` +> - `${}`: 变量引用语法。 +> - `section`(可选): 配置文件中的节名。 +> - `variable`: 配置文件中的变量名。 +> - `defaultValue`(可选): 默认值,当变量不存在时使用。 +> +> 说明: +> - 支持嵌套的变量引用,例如`${section1.variable1:${section2.variable2:defaultValue2}}`。 +> - `section`参数为可选。省略时,使用默认配置段 `SectionName=LabVIEW`。 +> - 默认值为可选,未指定时默认为空字符串("")。 + +> [!NOTE] +> CSM INI-Variable配置文件路径 +> +> - 开发状态: Application Directory中找到的第一个INI配置文件。若不存在配置文件,则默认为`csm-app.ini`。 +> - 编译后: 可执行文件所在目录中与可执行文件同名的INI配置文件。LabVIEW 编译后会自动生成此文件。 +> - 支持载入多个配置文件,后加载的文件会覆盖先前加载文件中的相同配置项。 +> - 配置文件中可以使用`[__include]`节引用其他配置文件 +> - 可以使用相对路径,也可以使用绝对路径。 +> - 使用相对路径时,相对于当前配置文件的路径。 +> - `[__include]`节中的配置文件名称不重要,只需要确保路径正确即可。 +> - 为了避免循环引用,同一个配置文件,第二次加载时会自动忽略。 + +> [!NOTE] +> CSM INI-Variable多文件配置场景 +> +> - 加载多个文件时,后加载的文件会覆盖先前加载文件中的相同配置项。 +> - 将缓存更改保存到文件时,修改会保存到最后加载的配置文件中。 + +> [!WARNING] +> CSM INI-Variable缓存机制警告 +> +> 请注意,由于本库使用全局缓存修改标志,频繁的配置更改会降低读取VI中缓存机制的有效性。因此,本库不建议用于需要频繁修改配置的场景。 + +## 核心功能 VI + +### CSM - Populate Configuration Variables.vi +在字符串中填充配置变量。 + +应用场景: 在CSM的脚本中直接使用INI-Variable变量,或充当CSM消息的参数。 + +参考范例: `1. Used as parameters parsed by CSM.vi`。 + +> - Ref: CSM INI-Variable Addon +> - Ref: CSM INI-Variable变量格式 +> - Ref: CSM INI-Variable配置文件路径 + +-- 输入控件(Controls) -- +- Section Name ("" as Default): 节名,空字符串表示使用默认节。 +- String with INI-Variable: 包含变量引用的输入字符串。 + +-- 输出控件(Indicators) -- +- String: 填充变量后的输出字符串。 + +### CSM - Read Configuration Variable.vim +根据原型读取配置中的变量值。 +- 推荐使用簇作为配置原型,簇中的元素名称对应INI配置文件中的变量名。 +- 如果是其他数据类型,对应的变量名称为`Config`。 +- 如果原型对应的变量在配置中不存在,则根据Write If not found?参数确定是否写入默认值。 + +应用场景: 直接将INI配置文件中的配置读取成LabVIEW数据。 + +参考范例: `2. Load the corresponding configuration by providing the prototype.vi`。 + +> - Ref: CSM INI-Variable配置文件路径 + +-- 输入控件(Controls) -- +- Configuration Prototype (Cluster Preferred): 配置原型(推荐使用簇)。 +- Section Name ("" as Default): 节名,空字符串表示使用默认节。 +- Write If not found? (F): 如果未找到,是否写入默认值。 + +-- 输出控件(Indicators) -- +- Configuration: 输出配置值。 + +### CSM - Read Cluster Elements From Session.vim +读取配置中的簇数据,数据保存在指定的节(section)中,簇中的元素名称对应节(section)中的键(key)。 +- 如果指定的节(section)不存在,则使用默认节。 +- 如果簇中的元素对应的键(key)不存在,则使用输入原型中的值作为默认值。 + +应用场景: 直接将INI配置文件中的配置读取成LabVIEW数据。 + +参考范例: `2. Load the corresponding configuration by providing the prototype.vi`。 + +> - Ref: CSM INI-Variable配置文件路径 + +-- 输入控件(Controls) -- +- Cluster: 簇原型。 +- Section Name ("" as Default): 节名,空字符串表示使用默认节。 + +-- 输出控件(Indicators) -- +- Cluster out: 输出簇。 + +### CSM - Read Cluster Elements From Key.vim +读取配置中的簇数据,数据保存在指定的节(section)中的指定键(key),数据以API String格式保存。 + +应用场景: 直接将INI配置文件中的配置读取成LabVIEW数据。 + +参考范例: `2. Load the corresponding configuration by providing the prototype.vi`。 + +> - Ref: CSM INI-Variable配置文件路径 + +-- 输入控件(Controls) -- +- Cluster: 簇原型。 +- Key: 键名。 +- Section Name ("" as Default): 节名,空字符串表示使用默认节。 + +-- 输出控件(Indicators) -- +- Cluster out: 输出簇。 +- Key Found?: 键是否存在。 + +### CSM - Write Configuration Variable.vim +写入配置变量。 +- 推荐使用簇作为配置原型,簇中的元素名称对应INI配置文件中的变量名。 +- 如果是其他数据类型,对应的变量名称为`Config`。 + +参考范例: `7. Write and Read Configuration.vi`。 + +> - Ref: CSM INI-Variable配置文件路径 +> - Ref: CSM INI-Variable缓存机制警告 + +-- 输入控件(Controls) -- +- Configuration: 要写入的配置数据。 +- Section Name ("" as Default): 节名,空字符串表示使用默认节。 + +-- 输出控件(Indicators) -- +- Configuration (dup): 写入的配置数据副本。 + +### Convert API String to Cluster(Default in Session).vim +将API String字符串转换为簇,数据保存在指定的节(section)中,簇中的元素名称对应节(section)中的键(key)。具有明确的优先级层次: CSM API参数>配置文件参数>默认常量参数。例如,这使得将串口初始化参数固定在配置文件中变得非常简单。 +- 初始化时,显式发送的参数具有最高优先级。 +- 若未发送参数,则使用配置文件中的参数。 +- 在没有配置文件参数的情况下,应用默认常量参数。 + +应用场景: 用于将CSM的参数固化到配置文件中。 + +参考范例: `3. In CSM API parameters.vi`。 + +-- 输入控件(Controls) -- +- API String: API String字符串。 +- Section Name ("" as Default): 节名,空字符串表示使用默认节。 +- Type: 数据类型。 + +-- 输出控件(Indicators) -- +- Data: 转换后的数据。 +- error: 错误信息。 + +### Convert API String to Cluster(Default in Key).vim +将API String字符串转换为簇,数据保存在指定的节(section)中的指定键(key)。具有明确的优先级层次: CSM API参数>配置文件参数>默认常量参数。例如,这使得将串口初始化参数固定在配置文件中变得非常简单。 +- 初始化时,显式发送的参数具有最高优先级。 +- 若未发送参数,则使用配置文件中的参数。 +- 在没有配置文件参数的情况下,应用默认常量参数。 + +应用场景: 用于将CSM的参数固化到配置文件中。 + +参考范例: `3. In CSM API parameters.vi`。 + +-- 输入控件(Controls) -- +- API String: API String字符串。 +- Section Name ("" as Default): 节名,空字符串表示使用默认节。 +- Type: 数据类型。 +- Variable Name: 变量名称。 + +-- 输出控件(Indicators) -- +- Data: 转换后的数据。 +- error: 错误信息。 + +## 原始配置信息读取与写入 + +### CSM - Read All Variable Names.vi +读取当前内存中所有变量名称。 + +-- 输入控件(Controls) -- +- Permanent Variables Only? (F): 是否仅读取永久变量。 + +-- 输出控件(Indicators) -- +- All Variable Names: 变量名称数组。 + +### CSM - Read Sections.vi +读取当前内存中所有节名称。 + +-- 输出控件(Indicators) -- +- Sections: 节名称数组。 + +### CSM - Read Key Names.vi +读取指定节中的所有键名。 + +-- 输入控件(Controls) -- +- Section Name ("" as Default): 节名,空字符串表示使用默认节。 + +-- 输出控件(Indicators) -- +- Keys: 键名数组。 + +### CSM - Read INI String.vi +读取配置信息字符串。此读取为获取原始的字符串描述,不替换INI变量引用。 + +应用场景: 需要读取原始的配置信息,而不是替换内部变量引用后的配置信息。 + +参考范例: `6. Read Nested Variables.vi`。 + +-- 输入控件(Controls) -- +- Section Name ("" as Default): 节名,空字符串表示使用默认节。 +- Key: 包含变量引用的输入字符串。 +- Default Value: 默认值。 +- Write If not found? (F): 如果未找到,是否写入默认值。 + +-- 输出控件(Indicators) -- +- Value: 替换变量后的输出字符串。 +- Key Found?: 键是否存在。 + +### CSM - Write INI String.vi +写入配置信息字符串。 + +参考范例: `6. Read Nested Variables.vi`。 + +> - Ref: CSM INI-Variable缓存机制警告 + +-- 输入控件(Controls) -- +- Section Name ("" as Default): 节名,空字符串表示使用默认节。 +- Key: 键名。 +- Value: 变量值字符串。 + +-- 输出控件(Indicators) -- +- Key Replace?: 键是否被替换。 + +## 多文件支持与配置管理 + +### CSM - Configuration File Path.vi +返回加载的所有配置文件路径。 + +参考范例: `5. import Config.ini with __include section.vi`。 + +> - Ref: CSM INI-Variable配置文件路径 + +-- 输入控件(Controls) -- +- Include All Paths?(F): 是否包含所有配置文件路径。 + +-- 输出控件(Indicators) -- +- Default Config File Path: 默认配置文件路径。 +- All Config Files: 所有配置文件列表。 + +### CSM - Load Configuration Variables From File.vi +从指定文件加载配置变量。如果节名后缀不为空,载入的节名称会加上该后缀。 + +Section Postfix ("")主要用于载入多个配置文件但具有相同节的情况。例如: 两个配置文件`Hardware1.ini`和`Hardware2.ini`,都有一个名为`Serial`的节且内部的Keys相同(表示串口配置),那么后载入的文件中的配置会覆盖先载入的文件中的配置。使用Section Postfix ("")可以避免节名冲突。 + +参考范例: `5. import Config.ini with __include section.vi`。 + +> - Ref: CSM INI-Variable配置文件路径 + +-- 输入控件(Controls) -- +- Configuration Path: 配置文件路径。 +- Section Postfix (""): 节名后缀。 + +### CSM - Unload Configuration Variable File.vi +卸载配置变量文件。 + +> - Ref: CSM INI-Variable配置文件路径 + +-- 输入控件(Controls) -- +- Path: 配置文件路径。 + +### CSM - Mark All Temp Variables as Permanent.vi +将所有临时变量标记为永久变量,并将变量存储到指定的配置文件中。 + +注意: 虽然已经标记为永久变量,但是如果不使用CSM - Sync Configuration Variables to File VI,依然不会将变量同步到文件中。 + +> - Ref: CSM INI-Variable配置文件路径 + +-- 输入控件(Controls) -- +- Path ("" to Use Default File): 配置文件路径,空字符串表示使用默认INI文件。 + +### CSM - Sync Configuration Variables to File.vi +将内存中的变量同步到指定的配置文件中。 + +注意: 只有永久变量才会同步到文件中,如果想将临时变量写入文件,需要提前将临时变量标记为永久变量。 + +> - Ref: CSM INI-Variable配置文件路径 + +-- 输入控件(Controls) -- +- All Temp Variable to Default Ini(F): 是否将所有临时变量同步到默认INI文件。 +- Write UnSupported Datatype?(F): 是否写入不支持的数据类型。 + +### CSM - Restore Variable Value.vi +恢复变量值,将所有的永久变量刷新为首次载入的配置值,临时变量不会被修改。 + +> - Ref: CSM INI-Variable配置文件路径 + +### CSM - Reset to Default.vi +将配置重置为默认值。所有的变量将被清空,所有的配置会从现在加载的配置文件中重新加载。 + +> - Ref: CSM INI-Variable配置文件路径 + +## 实用工具 VI + +### CSM - Read Log Filter Rules from INI Strings.vi +从配置中读取日志过滤规则。此配置主要配合以下几个VI使用: + +- `CSM - Set Log Filter Rules.vi` +- `addons\Logger\CSM - Start File Logger.vi` + +### CSM - Read File Logger Configuration from INI String.vi +从配置中读取日志记录配置。此配置主要配合以下几个VI使用: + +- `addons\Logger\CSM - Start File Logger.vi` + +## 调试工具 + +### 配置文件查看器(CSM-INI Variable Viewer - DebugTool.vi) + +CSM INI-Variable 是一个全局性的配置信息,此工具用于查看和调试当前内存中的配置信息。 + +> - Ref: CSM INI-Variable Addon diff --git a/test/Example/testcase - Convert API String to Cluster.vi b/test/Example/testcase - Convert API String to Cluster.vi index 9e8f143..1b059eb 100644 Binary files a/test/Example/testcase - Convert API String to Cluster.vi and b/test/Example/testcase - Convert API String to Cluster.vi differ diff --git a/test/Example/testcase - load and list configurations.vi b/test/Example/testcase - load and list configurations.vi index 7d751e3..1a95cc7 100644 Binary files a/test/Example/testcase - load and list configurations.vi and b/test/Example/testcase - load and list configurations.vi differ diff --git a/testcases/csm-ini-variable-addon/testVIs/test - NESTED read.vi b/testcases/csm-ini-variable-addon/testVIs/test - NESTED read.vi index 52d14f7..6da8f51 100644 Binary files a/testcases/csm-ini-variable-addon/testVIs/test - NESTED read.vi and b/testcases/csm-ini-variable-addon/testVIs/test - NESTED read.vi differ diff --git a/testcases/csm-ini-variable-addon/testVIs/test - Sync param Value to the top INI.vi b/testcases/csm-ini-variable-addon/testVIs/test - Sync param Value to the top INI.vi index d19c8f8..10a714c 100644 Binary files a/testcases/csm-ini-variable-addon/testVIs/test - Sync param Value to the top INI.vi and b/testcases/csm-ini-variable-addon/testVIs/test - Sync param Value to the top INI.vi differ diff --git a/testcases/csm-ini-variable-addon/testVIs/test - github 85 cannot write parameters into empty ini.vi b/testcases/csm-ini-variable-addon/testVIs/test - github 85 cannot write parameters into empty ini.vi index fe14994..a7837f3 100644 Binary files a/testcases/csm-ini-variable-addon/testVIs/test - github 85 cannot write parameters into empty ini.vi and b/testcases/csm-ini-variable-addon/testVIs/test - github 85 cannot write parameters into empty ini.vi differ diff --git a/testcases/csm-ini-variable-addon/testVIs/test - load and unload.vi b/testcases/csm-ini-variable-addon/testVIs/test - load and unload.vi index 415f73f..2dbee5a 100644 Binary files a/testcases/csm-ini-variable-addon/testVIs/test - load and unload.vi and b/testcases/csm-ini-variable-addon/testVIs/test - load and unload.vi differ diff --git a/testcases/csm-ini-variable-addon/testVIs/test - load config with __include section.vi b/testcases/csm-ini-variable-addon/testVIs/test - load config with __include section.vi index 5dd3cc4..b2bab4d 100644 Binary files a/testcases/csm-ini-variable-addon/testVIs/test - load config with __include section.vi and b/testcases/csm-ini-variable-addon/testVIs/test - load config with __include section.vi differ diff --git a/testcases/csm-ini-variable-addon/testVIs/test - loop references.vi b/testcases/csm-ini-variable-addon/testVIs/test - loop references.vi index 977b4cb..312a12b 100644 Binary files a/testcases/csm-ini-variable-addon/testVIs/test - loop references.vi and b/testcases/csm-ini-variable-addon/testVIs/test - loop references.vi differ diff --git a/testcases/csm-ini-variable-addon/testVIs/test - read Cluster From Session.vi b/testcases/csm-ini-variable-addon/testVIs/test - read Cluster From Session.vi index 8c12d0b..568ddf5 100644 Binary files a/testcases/csm-ini-variable-addon/testVIs/test - read Cluster From Session.vi and b/testcases/csm-ini-variable-addon/testVIs/test - read Cluster From Session.vi differ diff --git a/testcases/csm-ini-variable-addon/testVIs/test - restore variable value.vi b/testcases/csm-ini-variable-addon/testVIs/test - restore variable value.vi index 0f12f6a..abee6e2 100644 Binary files a/testcases/csm-ini-variable-addon/testVIs/test - restore variable value.vi and b/testcases/csm-ini-variable-addon/testVIs/test - restore variable value.vi differ diff --git a/testcases/csm-ini-variable-addon/testVIs/test - submodule case.vi b/testcases/csm-ini-variable-addon/testVIs/test - submodule case.vi index 4cc1808..eb1d5f7 100644 Binary files a/testcases/csm-ini-variable-addon/testVIs/test - submodule case.vi and b/testcases/csm-ini-variable-addon/testVIs/test - submodule case.vi differ