Start the MyServiceConsumer and MyServiceProvider components. Activate the Consumer component and a list of available commands will be displayed on the console. Try each command. (Use RTSystemEditor for connection between ports.)
Screenshots
Running the SimpleService sample.
The SimpleService sample viewed in RTSystemEditor.
How to use
SimpleService is a sample that sends a command from MyServiceConsumer and causes it to be processed by MyServiceProvider. Connect the corresponding ports of MyServiceConsumer and MyServiceProvider on RTSystemEditor. Activate both components (If the Consumer component is activated, it may activate the Provider too). A list of commands will be displayed at the Consumer prompt, so try to use the commands. The response of the Provider can be observed on the prompt.
Procedure
Start RTSystemEditor and open a new SystemEditor. See RTSystemEditor for details on how to use RTSystemEditor
Start both MyServiceConsumer and MyServiceProvider components.
The startup of the component differs depending on the OS and the language of OpenRTM-aist, so start regarding the table below.
Windows
Linux
MyServiceConsumer component
MyServiceProvider component
MyServiceConsumer component
MyServiceProvider component
C++
MyServiceConsumer.bat
MyServiceProvider.bat
MyServiceConsumerComp
MyServiceProviderComp
Python
MyServiceConsumer.bat
MyServiceProvider.bat
MyServiceConsumer.py
MyServiceProvider.py
Java
MyServiceConsumer.bat
MyServiceProvider.bat
MyServiceConsumer.sh
MyServiceProvider.sh
Both components are displayed on Name Service View of RTSystemEditor. Drag and drop the components from the Name Service View into the System Editor.
Drag and drop between two ports to connect them.
Activate both components by right-clinking one of components and selecting [Activate Systems] (in this case, if the Consumer is activated, the provider is activated too.)
Input commands at the Consumer console.
Commands
echo <message>: Displays a message.
set_value <value>: Sets a value to the Provider.
get_value: Displays the value set on the Provider.
get_echo_history: Displays messages that have been set on the Provider.
get_value_history: Displays values that have been set on the Provider.
This sample is included with the C++, Python and the Java editions of OpenRTM-aist.
Overview
This is a sample that shows how to use ServicePort. The service is defined using the IDL shown below.
Start the MyServiceConsumer and MyServiceProvider components. Activate the Consumer component and a list of available commands will be displayed on the console. Try each command. (Use RTSystemEditor for connection between ports.)
Screenshots
How to use
SimpleService is a sample that sends a command from MyServiceConsumer and causes it to be processed by MyServiceProvider. Connect the corresponding ports of MyServiceConsumer and MyServiceProvider on RTSystemEditor. Activate both components (If the Consumer component is activated, it may activate the Provider too). A list of commands will be displayed at the Consumer prompt, so try to use the commands. The response of the Provider can be observed on the prompt.
The startup of the component differs depending on the OS and the language of OpenRTM-aist, so start regarding the table below.