Code generation/Save and load

(G)Code generation

After setting various profile information of RT target component to be generated, generate template code. When you click the [Generate Code] button on the basic profile input page, template code is generated according to the entered profile information.

CodeGen.png
Generate template code


The template files generated at the time of executing code generation when selecting each language are as follows.

Generated file list

  • C++ ( When you do not select the check box of "Use old build environment." )
file name Description
<RTC name> Comp.cpp Code to launch the RT component.
<RTC name>.h It is the header of the RT component body.
<RTC name>.cpp This is the code of the RT component body.
<Service type name>SVC_impl.h It is the header of the service provider.(*
Only Type specified by ServiceProvider is output.
<Service type name>SVC_impl. cpp The implementation code of the service provider.(*
Only Type specified by ServiceProvider is output.
CMakeLists.txt It is a configuration file file for CMake.
doc/
doxyfile.in It is a setting file file for Doxygen.
cmake/
uninstall_target.cmake.in Uninstall target addition template file (for CMake)
cpack_options.cmake WiX package creation module (for CMake/WiX)
License.rtf License display included in package information (for CMake/WiX)
wix.xsl.in Template for specifying files to be included in WiX package (for CMake/WiX)
cmake/Modules/
FindOpenRTM.cmake OpenRTM-aist Environment setting acquisition module (for CMake)
  • C++ ( When the check box of [Use old build environment.] Is turned on )
file name Description
<RTC name> Comp.cpp Code to launch the RT component.
<RTC name>.h It is the header of the RT component body.
<RTC name>.cpp This is the code of the RT component body.
<Service type name>SVC_impl.h It is the header of the service provider.(*
Only Type specified by ServiceProvider is output.
<Service type name>SVC_impl. cpp The implementation code of the service provider.(*
Only Type specified by ServiceProvider is output.
Makefile.<RTC name> Makefile for compiling.
<RTC name>_vc8.sln It is a solution file for Visual Studio 2005.
<RTC name>_vc8.vcproj RT component project file for Visual Studio 2005.
<RTC name>Comp_vc8.vcproj Project code for start code for Visual Studio 2005.
<RTC name>_vc9.sln It is a solution file for Visual Studio 2008.
<RTC name>_vc9.vcproj RT component project file for Visual Studio 2008.
<RTC name>Comp_vc9.vcproj Project code for start code for Visual Studio 2008.
Copyprops.bat Property file This is a batch file for copying.
User_config.vsprops User defined property file.
OpenRTM-aist.vsprops Property file for OpenRTM-aist.
  • Java
file name Description
<RTC name>Comp.java Class for starting RT component.
<RTC name>.java Component Profile of RT component, Initialization processing, etc.
<RTC name>Impl.java It is the body of the RT component.
build_<RTC name>.xml It is a file for RT component build.
<Service type name> SVC_impl.java Implementation class of the service provider.(*
CMakeLists.txt It is a configuration file file for CMake.
doc/
doxyfile.in It is a setting file file for Doxygen.
cmake_modules/
cmake_javacompile.cmake.in Model file for adding Java compilation targets (for CMake)
FindOpenRTMJava.cmake OpenRTM-aist-Java environment setting acquisition module (for CMake)
cmake/
uninstall_target.cmake.in Uninstall target addition template file (for CMake)
cpack_options.cmake WiX package creation module (for CMake/WiX)
License.rtf License display included in package information (for CMake/WiX)
cpack_resources/
wix.xsl.in Template for specifying files to be included in WiX package (for CMake/WiX)
  • Python
file name Description
<RTC name>.py This is the code of the RT component.
<Service type name>_idl.py
<Service type name>_idl_example.py Implementation file of the service provider.(*
CMakeLists.txt It is a configuration file file for CMake.
doc/
doxyfile.in It is a setting file file for Doxygen.
cmake_modules/
FindOpenRTMPython.cmake OpenRTM-aist-Python Environment setting acquisition module (for CMake)
cmake/
uninstall_target.cmake.in Uninstall target addition template file (for CMake)
cpack_options.cmake WiX package creation module (for CMake/WiX)
License.rtf License display included in package information (for CMake/WiX)
cpack_resources/
Description.txt Description included in package information (for CMake)
License.txt License display included in package information (for CMake/Linux)
wix.xsl.in Template for specifying files to be included in WiX package (for CMake/WiX)
RtcBuilder parses IDL to generate an operation template when outputting this service provider's implementation file. However, the following restrictions exist in this parsing function.
  • Only #include directives can be used in the preprocessor. (#ifdef etc. are simply ignored)
  • The operation to be created is only the operation of the directly specified interface, and the operation inherited from the parent is not included.

(G)Output selection

RtcBuilder displays a confirmation screen for selecting which output to use, if a file with the same name as the generated file already exists in the output destination and there is a difference in the output content between the existing file and the generated file I will.

fig4-2SelectOutPut_ja.png
Output selection screen


For output selection, select from the following three output candidates.
  • Original: Leave existing files as they are
  • Merge: Merge using merge block ( *1 )
  • Generate: Overwrite with newly generated content

*1 Merge overwrites only the range enclosed by the <rtc-template block="block"> tag with the latest generation content. In this generated template, this tag encloses the range that the user does not change beforehand. Please keep in mind that this tag will disappear after merging, so please do not modify it.

(G)Perspective switching

If the development environment plug-in of the target language is installed, a confirmation message of perspective switching will be displayed after code generation is executed. If the target plug-in is installed, the following message will be displayed, so please select whether to switch the perspective.

fig4-3MessagePerspectiveSwitch_ja.png
Perspective switching confirmation message


The relationship between the generated language and the development environment plug-in is as follows.
  • Java: JDT (Java Development Tools) → It is a development environment included in Eclipse in advance.
  • C++: CDT (C/C++ Development Tooling)
  • Python: PyDev

If the development environment plug-in for each language is installed and the output target project is a newly created project, the target language attribute is set in the property of each project.

(G)Generation file packaging function

It is a function to archive the generated template file, binary file for execution of the RT component created based on the template file, etc. in various formats. Clicking on the [Package] button on the basic profile entry page will display the "RT Component Packaging" screen for setting the packaging content.

fig6-1FunctionPack_ja.png
Packaging function of various deliverables



fig6-2ExportRTC_ja.png
RT Component Packaging Screen


Each item is explained below.

RT Component Packaging Screen Item Description

Item Description
Target project Please select the project to be packaged.
Destination directory Please enter the directory to output packaged artifacts. By using the "Browse" button, the directory selection dialog will be displayed.
Archive method Please select the format of the archive to be created.
Optional A brief description of the operation within each action. Optional items.
Archive format It is possible to create an archive using the ZIP format and an archive using the tar format. Please select the format format to use.
Compression of archive contents To compress the contents of the archive, please select the check box.
Directory structure Please select whether to archive with the directory structure of the project to be archived as it is, or archive all in the root directory.

For each archive method ("source" "binary" "source+binary"), which file type to include in the archive can be set in the "setting screen" described later.


(G)Saving and Loading Settings

RTCBuilder allows you to save the contents entered in the RTC Profile Editor in the RTC profile XML (RTC.xml) and reload the saved content.

(G)Save

The contents entered in RTC profile editor can be saved in RTC profile XML (RTC.xml). The input contents can be saved by the following operation.
  • Right-click on the editor and select [Save] or [Save As ...] from the displayed context menu
  • Select [File] > [Save...] or [File] > [Save As...] on the menu bar

If you select [Save As ...], it can be saved in any project. *[Save As…] を選んだ場合、任意のプロジェクト内に保存することが可能です。

fig5-1Save_ja.png
fig5-1Save2_ja.png
Save

(G)Load

The RTC profile XML (RTC.xml) that saved the contents of the RTC profile editor can be read by the following operation.
  • Right-click the editor and select [Open] from the context menu
  • Select [File] > [Open file...] from the menu bar
fig5-2Load_ja.png
fig5-2Load2_ja.png
Lord

Download

latest Releases

For Begginers

Windows msi(installer) package (only trying samples)

C++,Python,Java,
Toolsを含む
1.2.1-RELEASE

Development environment is required for RT-Component development. See download page for details.

Number of Projects

Choreonoid

Motion editor/Dynamics simulator

OpenHRP3

Dynamics simulator

OpenRTP

Integrated Development Platform

AIST RTC collection

RT-Components collection by AIST

TORK

Tokyo Opensource Robotics Association

DAQ-Middleware

Middleware for DAQ (Data Aquisition) by KEK