Files
Adam C. Foltzer 029a7b3658 add HelloRust example
This is about as bare-bones an integration as we can get. Next step:
passing arguments across the language boundary.
2017-06-19 17:08:53 -07:00
..
2017-06-19 17:08:53 -07:00
2017-06-19 17:08:53 -07:00
2017-06-19 17:08:53 -07:00
2017-06-19 17:08:53 -07:00

Hello Rust Example

This is a basic example of a UxAS service that sends/receives KeyValuePair messages and prints out the results.

Files:

*runUxAS_HelloRust.sh* - This is a bash shell script used to execute the example

*cfg_HelloRust.xml* - This is the file used to configure the example for UxAS

*HelloRust.cpp* - the C++ source code for the example. Note: this file is located in the following directory:
    src/Services/

*HelloRust.h* - the C++ header file for the example. Note: this file is located in the following directory:
    src/Services/

Running the Example:

  1. open a terminal window in the directory: "examples/01_HelloRust/"
  2. enter the command: ./runUxAS_HelloRust.sh

What Happens?

Two copies of the HelloRust service start up and begin sending messages. One copy sends a message once a second and the other sends a message every 5 seconds. Each service receives the messsages sent by the other service. When messages are received the services print them out.

Things to Try:

  1. Change the rate that messages are sent out. This is done by editing the cfg_HelloRust.xml file and changing the value of SendPeriod_ms. Note: the time is entered in milliseconds, i.e. 1000 milliseconds == 1 second.
  2. Change the message sent by each of the services. This is done by editing the cfg_HelloRust.xml file and changing the value of StringToSend.