|
1 |
| -<VI_Package_Builder_Settings Version="2020.1" Created_Date="2023-09-27 14:21:53" Modified_Date="2025-02-13 11:09:15" Creator="liyao" Comments="" ID="5b9ce7589ab42f4a81209695e3e6a4fd"> |
| 1 | +<VI_Package_Builder_Settings Version="2020.1" Created_Date="2023-09-27 14:21:53" Modified_Date="2025-02-28 15:22:55" Creator="liyao" Comments="" ID="87a1501566075aebed5513952fe62c41"> |
2 | 2 | <Library_General_Settings>
|
3 | 3 | <Package_File_Name>NEVSTOP_lib_CSM_TCP_Router_Example</Package_File_Name>
|
4 | 4 | <Library_Version>2025.2.0.2</Library_Version>
|
|
18 | 18 | <Advanced_Settings>
|
19 | 19 | <Package_Dependencies>
|
20 | 20 | <Additional_External_Dependencies>jki_lib_tcp_server >=5.0.0.8</Additional_External_Dependencies>
|
21 |
| - <Additional_External_Dependencies>nevstop_lib_communicable_state_machine >=2025.1.27.141432</Additional_External_Dependencies> |
| 21 | + <Additional_External_Dependencies>nevstop_lib_communicable_state_machine >=2025.2.28.95859</Additional_External_Dependencies> |
22 | 22 | <Additional_External_Dependencies>nevstop_lib_csm_api_string_arguments_support >=2025.1.27.145038</Additional_External_Dependencies>
|
23 |
| - <Additional_External_Dependencies>nevstop_lib_csm_ini_static_variable_support >=2025.1.27.143156</Additional_External_Dependencies> |
| 23 | + <Additional_External_Dependencies>nevstop_lib_csm_ini_static_variable_support >=2025.2.28.100053</Additional_External_Dependencies> |
24 | 24 | <Additional_External_Dependencies>nevstop_lib_csm_massdata_parameter_support >=2024.12.31.84154</Additional_External_Dependencies>
|
25 | 25 | <Additional_External_Dependencies>nevstop_lib_globalstop >=2022.12.12.102654</Additional_External_Dependencies>
|
26 | 26 | <Additional_External_Dependencies>oglib_error >=4.2.0.23</Additional_External_Dependencies>
|
|
37 | 37 | <VI_Package_Configuration_File>CSM-TCP-Router.vipc</VI_Package_Configuration_File>
|
38 | 38 | <Description>
|
39 | 39 | <One_Line_Description_Summary>Application Example to show how to setup a TCP Server and Client using CSM and JKI TCP Server.</One_Line_Description_Summary>
|
40 |
| - <Description>Application Example to show how to setup a TCP Server and Client using CSM and JKI TCP Server. |
| 40 | + <Description>This repository demonstrates how to create a reusable TCP communication layer (CSM-TCP-Router) to turn a local program into a TCP server for remote control. This example showcases the advantages of the CSM framework's invisible bus. |
41 | 41 |
|
42 |
| -How to test it: |
| 42 | +## Features |
43 | 43 |
|
44 |
| -1. Open Project in <LabVIEW>/examples\NEVSTOP\Communicable State Machine(CSM)\CSM TCP Router Application |
45 |
| -2. Run Server VI: CSM-TCP-Router(Server).vi |
46 |
| -3. Run Client Console VI: Client.vi and try it.</Description> |
| 44 | +- All CSM messages that can be sent locally can be transmitted to the local program via TCP connection using CSM synchronous and asynchronous message formats. |
| 45 | +- Based on the JKI-TCP-Server library, it supports multiple TCP clients connecting simultaneously. |
| 46 | +- [client] Provides a standard TCP client that can connect to the server to verify remote connections and message sending. |
| 47 | + |
| 48 | +> [!IMPORTANT] |
| 49 | +> `TCP Packet Format:` | Data Length (4 bytes) | CSM Command String (plain text) | |
| 50 | + |
| 51 | +> [!NOTE] |
| 52 | +> Example: Suppose there is a CSM module named DAQmx locally with an interface "API: Start Sampling". |
| 53 | +> Locally, we can send messages to this module to control the start and stop of sampling: |
| 54 | +> |
| 55 | +> - API: Start Sampling -@ DAQmx // Synchronous message |
| 56 | +> - API: Start Sampling -> DAQmx // Asynchronous message |
| 57 | +> - API: Start Sampling ->| DAQmx // Asynchronous message without return |
| 58 | +> |
| 59 | +> Now, by sending the same text message via TCP connection, remote control can be achieved. |
| 60 | + |
| 61 | +> [!WARNING] |
| 62 | +> Currently, CSM-TCP-Router only supports synchronous messages (-@) and asynchronous messages without return (->|). Asynchronous messages (->) will be treated as asynchronous messages without return. |
| 63 | + |
| 64 | +## Usage |
| 65 | + |
| 66 | +1. Install this tool and dependencies via VIPM |
| 67 | +2. Open the example project CSM-TCP-Router.lvproj in the CSM examples |
| 68 | +3. Start the CSM-TCP-Router(Server).vi in the code project |
| 69 | +4. Start Client.vi, enter the server's IP address and port number, and click connect |
| 70 | +5. Enter commands and click send to see the returned messages in the console |
| 71 | +6. View the history of executed messages in the log interface of the Server program |
| 72 | +7. Enter `Bye` in Client.vi to disconnect |
| 73 | +8. Close the Server program |
| 74 | +</Description> |
47 | 75 | <Copyright/>
|
48 | 76 | <Packager>NEVSTOP</Packager>
|
49 | 77 | <URL>https://github.com/NEVSTOP-LAB/CSM-TCP-Router-App</URL>
|
@@ -189,6 +217,7 @@ How to test it:
|
189 | 217 | <close_labview_before_install>false</close_labview_before_install>
|
190 | 218 | <restart_labview_after_install>false</restart_labview_after_install>
|
191 | 219 | <skip_mass_compile_after_install>false</skip_mass_compile_after_install>
|
| 220 | + <install_into_global_environment>false</install_into_global_environment> |
192 | 221 | </LabVIEW>
|
193 | 222 | <VI_Docs>
|
194 | 223 | <Edit_VI_Description>true</Edit_VI_Description>
|
|
0 commit comments