SeqIn.h
Go to the documentation of this file.
1 // -*- C++ -*-
10 #ifndef SEQIN_H
11 #define SEQIN_H
12 
13 #include <rtm/idl/BasicDataTypeSkel.h>
14 #include <rtm/Manager.h>
16 #include <rtm/CorbaPort.h>
17 #include <rtm/DataInPort.h>
18 #include <rtm/DataOutPort.h>
19 
20 // Service implementation headers
21 // <rtc-template block="service_impl_h">
22 
23 // </rtc-template>
24 
25 // Service Consumer stub headers
26 // <rtc-template block="consumer_stub_h">
27 
28 // </rtc-template>
29 
30 using namespace RTC;
31 
32 extern bool g_Listener_dump_enabled;
33 
35  : public ConnectorDataListenerT<RTC::TimedLong>
36 {
37 public:
38  DataListener(const char* name) : m_name(name) {}
39  virtual ~DataListener()
40  {
41  // Connector Listener Dump check
43  {
44  std::cout << "dtor of " << m_name << std::endl;
45  }
46  }
47 
48  virtual void operator()(const ConnectorInfo& info,
49  const TimedLong& data)
50  {
51  // Connector Listener Dump check
53  {
54  std::cout << "------------------------------" << std::endl;
55  std::cout << "Data Listener: " << m_name << std::endl;
56  std::cout << "Profile::name: " << info.name << std::endl;
57  std::cout << "Profile::id: " << info.id << std::endl;
58 // std::cout << "Profile::properties: " << std::endl;
59 // std::cout << info.properties;
60 // std::cout << std::endl;
61  std::cout << "Data: " << data.data << std::endl;
62  std::cout << "------------------------------" << std::endl;
63  }
64  };
65  std::string m_name;
66 };
67 
68 
70  : public ConnectorListener
71 {
72 public:
73  ConnListener(const char* name) : m_name(name) {}
74  virtual ~ConnListener()
75  {
76  // Connector Listener Dump check
78  {
79  std::cout << "dtor of " << m_name << std::endl;
80  }
81  }
82 
83  virtual void operator()(const ConnectorInfo& info)
84  {
85  // Connector Listener Dump check
87  {
88  std::cout << "------------------------------" << std::endl;
89  std::cout << "Connector Listener: " << m_name << std::endl;
90  std::cout << "Profile::name: " << info.name << std::endl;
91  std::cout << "Profile::id: " << info.id << std::endl;
92  std::cout << "Profile::properties: " << std::endl;
93  std::cout << info.properties;
94  std::cout << std::endl;
95  std::cout << "------------------------------" << std::endl;
96  }
97  };
98  std::string m_name;
99 };
100 
101 
102 class SeqIn
104 {
105  public:
107  ~SeqIn();
108 
109  // The initialize action (on CREATED->ALIVE transition)
110  // formaer rtc_init_entry()
111  virtual RTC::ReturnCode_t onInitialize();
112 
113  // The finalize action (on ALIVE->END transition)
114  // formaer rtc_exiting_entry()
115  // virtual RTC::ReturnCode_t onFinalize();
116 
117  // The startup action when ExecutionContext startup
118  // former rtc_starting_entry()
119  // virtual RTC::ReturnCode_t onStartup(RTC::UniqueId ec_id);
120 
121  // The shutdown action when ExecutionContext stop
122  // former rtc_stopping_entry()
123  // virtual RTC::ReturnCode_t onShutdown(RTC::UniqueId ec_id);
124 
125  // The activated action (Active state entry action)
126  // former rtc_active_entry()
127  // virtual RTC::ReturnCode_t onActivated(RTC::UniqueId ec_id);
128 
129  // The deactivated action (Active state exit action)
130  // former rtc_active_exit()
131  // virtual RTC::ReturnCode_t onDeactivated(RTC::UniqueId ec_id);
132 
133  // The execution action that is invoked periodically
134  // former rtc_active_do()
135  virtual RTC::ReturnCode_t onExecute(RTC::UniqueId ec_id);
136 
137  // The aborting action when main logic error occurred.
138  // former rtc_aborting_entry()
139  // virtual RTC::ReturnCode_t onAborting(RTC::UniqueId ec_id);
140 
141  // The error action in ERROR state
142  // former rtc_error_do()
143  // virtual RTC::ReturnCode_t onError(RTC::UniqueId ec_id);
144 
145  // The reset action that is invoked resetting
146  // This is same but different the former rtc_init_entry()
147  // virtual RTC::ReturnCode_t onReset(RTC::UniqueId ec_id);
148 
149  // The state update action that is invoked after onExecute() action
150  // no corresponding operation exists in OpenRTm-aist-0.2.0
151  // virtual RTC::ReturnCode_t onStateUpdate(RTC::UniqueId ec_id);
152 
153  // The action that is invoked when execution context's rate is changed
154  // no corresponding operation exists in OpenRTm-aist-0.2.0
155  // virtual RTC::ReturnCode_t onRateChanged(RTC::UniqueId ec_id);
156 
157 
158  protected:
159  // DataInPort declaration
160  // <rtc-template block="inport_declare">
161  TimedOctet m_Octet;
163  TimedShort m_Short;
165  TimedLong m_Long;
167  TimedFloat m_Float;
169  TimedDouble m_Double;
171  TimedOctetSeq m_OctetSeq;
173  TimedShortSeq m_ShortSeq;
175  TimedLongSeq m_LongSeq;
177  TimedFloatSeq m_FloatSeq;
179  TimedDoubleSeq m_DoubleSeq;
181 
182  // </rtc-template>
183 
184 
185  // DataOutPort declaration
186  // <rtc-template block="outport_declare">
187 
188  // </rtc-template>
189 
190  // CORBA Port declaration
191  // <rtc-template block="corbaport_declare">
192 
193  // </rtc-template>
194 
195  // Service declaration
196  // <rtc-template block="service_declare">
197 
198  // </rtc-template>
199 
200  // Consumer declaration
201  // <rtc-template block="consumer_declare">
202 
203  // </rtc-template>
204 
205  private:
206 
207 };
208 
209 
210 extern "C"
211 {
213 };
214 
215 #endif // SEQIN_H
virtual void operator()(const ConnectorInfo &info, const TimedLong &data)
Definition: SeqIn.h:48
InPort< TimedShortSeq > m_ShortSeqIn
Definition: SeqIn.h:174
TimedLong m_Long
Definition: SeqIn.h:165
coil::Properties properties
Connection properties.
RT-Component.
DLL_EXPORT void SeqInInit(RTC::Manager *manager)
Definition: SeqIn.cpp:436
TimedFloat m_Float
Definition: SeqIn.h:167
bool g_Listener_dump_enabled
Definition: SeqIn.cpp:14
TimedFloatSeq m_FloatSeq
Definition: SeqIn.h:177
InPort< TimedOctet > m_OctetIn
Definition: SeqIn.h:162
InPort< TimedOctetSeq > m_OctetSeqIn
Definition: SeqIn.h:172
DataFlowComponentBase class.
ReturnCode_t
Definition: doil.h:53
virtual ~ConnListener()
Definition: SeqIn.h:74
InPort< TimedShort > m_ShortIn
Definition: SeqIn.h:164
Manager class.
Definition: Manager.h:80
InPort< TimedFloat > m_FloatIn
Definition: SeqIn.h:168
virtual void operator()(const ConnectorInfo &info)
Virtual Callback method.
Definition: SeqIn.h:83
TimedLongSeq m_LongSeq
Definition: SeqIn.h:175
Base class of OutPort.
CorbaPort class.
TimedOctetSeq m_OctetSeq
Definition: SeqIn.h:171
DataListener(const char *name)
Definition: SeqIn.h:38
RTComponent manager class.
TimedShortSeq m_ShortSeq
Definition: SeqIn.h:173
ExecutionContextHandle_t UniqueId
ConnectorDataListenerT class.
InPort< TimedLongSeq > m_LongSeqIn
Definition: SeqIn.h:176
Base class of InPort.
#define DLL_EXPORT
Definition: PluginC.cpp:8
std::string name
Connection name.
InPort< TimedLong > m_LongIn
Definition: SeqIn.h:166
TimedDoubleSeq m_DoubleSeq
Definition: SeqIn.h:179
InPort< TimedDoubleSeq > m_DoubleSeqIn
Definition: SeqIn.h:180
virtual ~DataListener()
Definition: SeqIn.h:39
std::string m_name
Definition: SeqIn.h:97
Definition: SeqIn.h:102
ConnListener(const char *name)
Definition: SeqIn.h:73
InPort< TimedDouble > m_DoubleIn
Definition: SeqIn.h:170
TimedShort m_Short
Definition: SeqIn.h:163
TimedOctet m_Octet
Definition: SeqIn.h:161
std::string id
ConnectionID.
InPort< TimedFloatSeq > m_FloatSeqIn
Definition: SeqIn.h:178
TimedDouble m_Double
Definition: SeqIn.h:169
std::string m_name
Definition: SeqIn.h:64


openrtm_aist
Author(s): Noriaki Ando
autogenerated on Mon Jun 10 2019 14:07:56