BTR課題 : fawkes の interface を作ってみましょう.

BlackBoard 用のInterface を作る課題です.
Fawkes 上で使える共有メモリです.

まず,メモリの中身(構造体)を規定するファイルは,fawkes-robotino/src/libs/interfaces に置きます.
ここでは,BTRTestInterface としましょう.

ここに,.xml のファイルを置いてmake すると,.h,.cpp,.tolua ファイルができあがります.

なんて簡単!

BTRTestInterface.xml

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE interface SYSTEM "interface.dtd">
<interface name="BTRTestInterface" author="Wataru UEMURA" year="2016">
  <constants>
    <enum name="BTRTestState">
      <comment>Indicator of current or desired test state.</comment>
      <item name="STATE1">BTRTest State1</item>
      <item name="STATE2">BTRTest State2</item>
    </enum>
  </constants>
  <data>
    <comment>
      This interface provides support for a simple status.
    </comment>
    <field type="BTRTestState" name="btrtest_state">
      The current state of BTRTest.
    </field>
  </data>
</interface>

コメントを残す

メールアドレスが公開されることはありません。 が付いている欄は必須項目です

*