Use the Simple Messaging (STM) Reference Library to communicate between processes in a robotics application when you need to stream data losslessly with TCP or transfer data quickly on unreliable networks with UDP. STM is a thin, lightweight protocol that sends metadata with each data point so your processes can parse many different data types. STM consists of a set of VIs that you download from the National Instruments Web site at ni.com. STM does not work with all third party TCP, UDP, and serial-based devices that use fixed protocols. Additionally, STM does not buffer data, which is an important component of applications with processes that must run in parallel while also running at different rates. However, you can create your own buffering architecture using queues.
The following figure shows an example of a robotics application that uses STM.
|Note Refer to the National Instruments Web site at ni.com to download source code for this example.|
The following events occur in the previous figure.
|The GPS acquisition process on the RT target broadcasts GPS data to the path planning process on the desktop computer.
|The STM UDP listener in the path planning process receives the GPS data, and the waypoint generator uses that data to plan a path.|
|The path planning process streams every waypoint to the steering process on the RT target.