This example is a client server design pattern that can run indefinitely, continuously monitoring for new connections and servicing them accordingly.
Requirements
Software
Hardware
A real-time hardware target, such as a PXI or CompactRIO controller, is required to run the RT Server VI.
Installation and Support
Background
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.
Example Application
A detailed description of this design pattern and the STM Connection Manager is provided in the in the attachment PDF below - Multi-Client Server Application Design Pattern Using Simple Messaging Library (STM).pdf.
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:
Server
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