プロジェクト

全般

プロフィール

SdoServiceConsumerImpl.java

katami, 2018/01/29 09:36

 
1
package RTMExamples.SimpleSdoService;
2

    
3
import RTC.ReturnCode_t;
4
import jp.go.aist.rtm.RTC.DataFlowComponentBase;
5
import jp.go.aist.rtm.RTC.Manager;
6

    
7
import org.omg.CORBA.portable.OutputStream;
8

    
9
public class SdoServiceConsumerImpl  extends DataFlowComponentBase {
10

    
11
  public SdoServiceConsumerImpl(Manager manager) {
12
    super(manager);
13
    // <rtc-template block="initializer">
14
    // </rtc-template>
15

    
16
    // Registration: InPort/OutPort/Service
17
    // <rtc-template block="registration">
18
    
19
    // Set OutPort buffer
20
    
21
    // Set service provider to Ports
22
    
23
    // Set service consumers to Ports
24
    
25
    // Set CORBA Service Ports
26
    
27
    // </rtc-template>
28
  }
29

    
30
  // The initialize action (on CREATED->ALIVE transition)
31
  // formaer rtc_init_entry() 
32
  @Override
33
  protected ReturnCode_t onInitialize() {
34

    
35
    return super.onInitialize();
36
  }
37
  // The finalize action (on ALIVE->END transition)
38
  // formaer rtc_exiting_entry()
39
//  @Override
40
//  protected ReturnCode_t onFinalize() {
41
//    return super.onFinalize();
42
//  }
43
  //
44
  // The startup action when ExecutionContext startup
45
  // former rtc_starting_entry()
46
//  @Override
47
//  protected ReturnCode_t onStartup(int ec_id) {
48
//    return super.onStartup(ec_id);
49
//  }
50
  //
51
  // The shutdown action when ExecutionContext stop
52
  // former rtc_stopping_entry()
53
//  @Override
54
//  protected ReturnCode_t onShutdown(int ec_id) {
55
//    return super.onShutdown(ec_id);
56
//  }
57
  //
58
  // The activated action (Active state entry action)
59
  // former rtc_active_entry()
60
//  @Override
61
//  protected ReturnCode_t onActivated(int ec_id) {
62
//    return super.onActivated(ec_id);
63
//  }
64
  //
65
  // The deactivated action (Active state exit action)
66
  // former rtc_active_exit()
67
//  @Override
68
//  protected ReturnCode_t onDeactivated(int ec_id) {
69
//    return super.onDeactivated(ec_id);
70
//  }
71
  //
72
  // The execution action that is invoked periodically
73
  // former rtc_active_do()
74
  @Override
75
  protected ReturnCode_t onExecute(int ec_id) {
76
    try {
77
      Thread.sleep(1);
78
    } catch (InterruptedException e) {
79
      e.printStackTrace();
80
    }
81

    
82
    return super.onExecute(ec_id);
83
  }
84
  //
85
  // The aborting action when main logic error occurred.
86
  // former rtc_aborting_entry()
87
//  @Override
88
//  public ReturnCode_t onAborting(int ec_id) {
89
//    return super.onAborting(ec_id);
90
//  }
91
  //
92
  // The error action in ERROR state
93
  // former rtc_error_do()
94
//  @Override
95
//  public ReturnCode_t onError(int ec_id) {
96
//    return super.onError(ec_id);
97
//  }
98
  //
99
  // The reset action that is invoked resetting
100
  // This is same but different the former rtc_init_entry()
101
//  @Override
102
//  protected ReturnCode_t onReset(int ec_id) {
103
//    return super.onReset(ec_id);
104
//  }
105
//  
106
  // The state update action that is invoked after onExecute() action
107
  // no corresponding operation exists in OpenRTm-aist-0.2.0
108
//  @Override
109
//  protected ReturnCode_t onStateUpdate(int ec_id) {
110
//    return super.onStateUpdate(ec_id);
111
//  }
112
  //
113
  // The action that is invoked when execution context's rate is changed
114
  // no corresponding operation exists in OpenRTm-aist-0.2.0
115
//  @Override
116
//  protected ReturnCode_t onRateChanged(int ec_id) {
117
//    return super.onRateChanged(ec_id);
118
//  }
119
//
120
  // DataInPort declaration
121
  // <rtc-template block="inport_declare">
122
  
123
  // </rtc-template>
124

    
125
  // DataOutPort declaration
126
  // <rtc-template block="outport_declare">
127
  
128
  // </rtc-template>
129

    
130
  // CORBA Port declaration
131
  // <rtc-template block="corbaport_declare">
132
  
133
  // </rtc-template>
134

    
135
  // Service declaration
136
  // <rtc-template block="service_declare">
137
  
138
  // </rtc-template>
139

    
140
  // Consumer declaration
141
  // <rtc-template block="consumer_declare">
142
  
143
  // </rtc-template>
144

    
145
}