プロジェクト

全般

プロフィール

ModuleName.java

katami, 2018/03/02 09:12

 
1
// -*- Java -*-
2
/*!
3
 * @file ModuleName.java
4
 * @date $Date$
5
 *
6
 * $Id$
7
 */
8

    
9
import jp.go.aist.rtm.RTC.Manager;
10
import jp.go.aist.rtm.RTC.RTObject_impl;
11
import jp.go.aist.rtm.RTC.RtcDeleteFunc;
12
import jp.go.aist.rtm.RTC.RtcNewFunc;
13
import jp.go.aist.rtm.RTC.RegisterModuleFunc;
14
import jp.go.aist.rtm.RTC.util.Properties;
15

    
16
/**
17
 * ModuleName
18
 * <p> 
19
 * ModuleDescription
20
 */
21
public class ModuleName implements RtcNewFunc, RtcDeleteFunc, RegisterModuleFunc {
22

    
23
//  Module specification
24
//  <rtc-template block="module_spec">
25
    public static String component_conf[] = {
26
            "implementation_id", "ModuleName",
27
            "type_name",         "ModuleName",
28
            "description",       "ModuleDescription",
29
            "version",           "1.0.0",
30
            "vendor",            "VenderName",
31
            "category",          "Category",
32
            "activity_type",     "STATIC",
33
            "max_instance",      "1",
34
            "language",          "Java",
35
            "lang_type",         "compile",
36
            ""
37
            };
38
//  </rtc-template>
39

    
40
    public RTObject_impl createRtc(Manager mgr) {
41
        return new ModuleNameImpl(mgr);
42
    }
43

    
44
    public void deleteRtc(RTObject_impl rtcBase) {
45
        rtcBase = null;
46
    }
47
    public void registerModule() {
48
        Properties prop = new Properties(component_conf);
49
        final Manager manager = Manager.instance();
50
        manager.registerFactory(prop, new ModuleName(), new ModuleName());
51
    }
52
}