プロジェクト

全般

プロフィール

SdoServiceConsumer.java

katami, 2018/01/29 09:35

 
1
package RTMExamples.SimpleSdoService;
2

    
3
import jp.go.aist.rtm.RTC.Manager;
4
import jp.go.aist.rtm.RTC.RTObject_impl;
5
import jp.go.aist.rtm.RTC.RtcDeleteFunc;
6
import jp.go.aist.rtm.RTC.RtcNewFunc;
7
import jp.go.aist.rtm.RTC.RegisterModuleFunc;
8
import jp.go.aist.rtm.RTC.util.Properties;
9

    
10
public class SdoServiceConsumer 
11
    implements RtcNewFunc, RtcDeleteFunc, RegisterModuleFunc {
12

    
13
//  Module specification
14
//  <rtc-template block="module_spec">
15
  public static String component_conf[] = {
16
    "implementation_id", "SdoServiceConsumer",
17
    "type_name",         "SdoServiceConsumer",
18
    "description",       "Console output component",
19
    "version",           "1.0",
20
    "vendor",            "Noriaki Ando, AIST",
21
    "category",          "example",
22
    "activity_type",     "DataFlowComponent",
23
    "max_instance",      "10",
24
    "language",          "Java",
25
    "lang_type",         "compile",
26
    ""
27
    };
28
//  </rtc-template>
29

    
30
  public RTObject_impl createRtc(Manager mgr) {
31
    return new SdoServiceConsumerImpl(mgr);
32
  }
33

    
34
  public void deleteRtc(RTObject_impl rtcBase) {
35
    rtcBase = null;
36
  }
37
  public void registerModule() {
38
    Properties prop = new Properties(component_conf);
39
    final Manager manager = Manager.instance();
40
    manager.registerFactory(prop, 
41
                            new SdoServiceConsumer(), 
42
                            new SdoServiceConsumer());
43
  }
44
}