This document describes a server application design pattern that supports multiple client connections. It extends the command-based STM communication example to handle dynamic connections and disconnections.
Client/server systems provide access to a central application from one or more remote clients. For example, a server application may perform some measurement or automation function (such as test cell control) and client applications may provide operators with a user interface for monitoring the state or progress of that function.
In multi-client applications, clients may connect and disconnect at random times. For example, during HIL batch tests that run for extended periods of time, various users may connect to the system several times a day to check on the progress and status of test that are of interest to them.
A detailed description of this design pattern and the STM Connection Manager is provided in the Multi-Client Server Application Design Pattern Using Simple Messaging Library (STM) tutorial.
The example provides a design pattern for implementing an application that provides a single network-based server and has multiple clients connect to the server to exchange data between client and server. It uses the STM (Simple Messaging) Reference Library for data communication between client and server.
The example application has the following features:
Sends data to each of the connected clients. Each client only receives the data they requested.
Client (each client is identical)
Steps to Run Example
Running the RT Server VI on an RT targets requires the LabVIEW Real-Time module, and the driver specific to your target hardware.
A real-time hardware target, such as a PXI or CompactRIO controller, is required to run the RT Server VI.
Installation and Support
The contents of the attached ZIP file can be placed in any directory.
Questions and feedback on this example should be posted in the STM Discussion Forum.
|Any attached Code is provided As Is. It has not been tested or validated as a product, for use in a deployed application or system, or for |
use in hazardous environments. You assume all risks for use of the Code, and use of the Code is subject to the Sample Code License.