You've already forked OpenUxAS-SoI
mirror of
https://github.com/AdaCore/OpenUxAS-SoI.git
synced 2026-02-12 13:04:49 -08:00
This is about as bare-bones an integration as we can get. Next step: passing arguments across the language boundary.
1.4 KiB
1.4 KiB
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:
- open a terminal window in the directory: "examples/01_HelloRust/"
- 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:
- Change the rate that messages are sent out. This is done by editing the
cfg_HelloRust.xmlfile and changing the value ofSendPeriod_ms. Note: the time is entered in milliseconds, i.e. 1000 milliseconds == 1 second. - Change the message sent by each of the services. This is done by editing the
cfg_HelloRust.xmlfile and changing the value ofStringToSend.