Use DataPort with Original Data Type


Suppose you want to use your original data-type or struct.
In such cases, you will describe IDL file to define your data type and load your IDL file in your RTC builder.

Look for the data type which is similar to your object

The most important work is to search for a similar data types.
>> Look the drop-down menu in the data types of RTC builder editor.
>> See Common interface specification sheet
>> Search for the other RT-component similar to yours.

Definition (IDL file)

Description rules of IDL file is a bit complicated to explain in this website. See CORBA books or some other documentation around IDL file.

This is my example.

// TestIDL.idl

module ssr {

  struct TestStruct1 {
    long value1;
    float value2;
  };

  typedef sequence TestSequence1;
  
  struct TestStruct2 {
    TestStruct1 header;
    TestSequence1 data;
  };
};

Setting of Loading IDL file

Open Eclipse and open property dialog. In OSX, Eclipse > Preference.

Then, select RTC Builder in the left side menu of the dialog, and you can see the display like belo:
Preferences_と_RTC_Builder_-_Eclipse_SDK
Select the folder that includes your IDL file.

Reboot Eclipse.

Build RTC with your original data type

You can build the skeleton code in the ordinary process.
RT-Component_Builder_Project_と_RTC_Builder_-_Eclipse_SDK

RTC_Builder_-_IDLTest01_RTC.xml_-_Eclipse_SDK 2

When you select the data type of the data port, you can find your data type is included
RTC_Builder_-_IDLTest02_RTC.xml_-_Eclipse_SDK

Before you launch cmake, you must modify idl/CMakeLists.txt

Comment out the last 4 lines. They contains errors.
CMakeLists.txt_と_idl_と_Updating_Software_と_RTC_Builder_-_IDLTest01_RTC.xml_-_Eclipse_SDK

Please enjoy your RTC development.