SeqOut.h
Go to the documentation of this file.
1 // -*- C++ -*-
10 #ifndef SEQOUT_H
11 #define SEQOUT_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 // Connector Listener Dump Flag
33 extern bool g_Listener_dump_enabled;
34 
35 class DataListener
36  : public ConnectorDataListenerT<RTC::TimedLong>
37 {
38 public:
39  DataListener(const char* name) : m_name(name) {}
40  virtual ~DataListener()
41  {
42  // Connector Listener Dump check
44  {
45  std::cout << "dtor of " << m_name << std::endl;
46  }
47  }
48 
49  virtual void operator()(const ConnectorInfo& info,
50  const TimedLong& data)
51  {
52  // Connector Listener Dump check
54  {
55  std::cout << "------------------------------" << std::endl;
56  std::cout << "Data Listener: " << m_name << std::endl;
57  std::cout << "Profile::name: " << info.name << std::endl;
58  std::cout << "Profile::id: " << info.id << std::endl;
59 // std::cout << "Profile::properties: " << std::endl;
60 // std::cout << info.properties;
61 // std::cout << std::endl;
62  std::cout << "Data: " << data.data << std::endl;
63  std::cout << "------------------------------" << std::endl;
64  }
65  }
66  std::string m_name;
67 };
68 
69 
70 class ConnListener
71  : public ConnectorListener
72 {
73 public:
74  ConnListener(const char* name) : m_name(name) {}
75  virtual ~ConnListener()
76  {
77  // Connector Listener Dump check
79  {
80  std::cout << "dtor of " << m_name << std::endl;
81  }
82  }
83 
84  virtual void operator()(const ConnectorInfo& info)
85  {
86  // Connector Listener Dump check
88  {
89  std::cout << "------------------------------" << std::endl;
90  std::cout << "Connector Listener: " << m_name << std::endl;
91  std::cout << "Profile::name: " << info.name << std::endl;
92  std::cout << "Profile::id: " << info.id << std::endl;
93  std::cout << "Profile::properties: " << std::endl;
94  std::cout << info.properties;
95  std::cout << std::endl;
96  std::cout << "------------------------------" << std::endl;
97  }
98  };
99  std::string m_name;
100 };
101 
102 
103 class SeqOut
105 {
106  public:
108  ~SeqOut();
109 
110  // The initialize action (on CREATED->ALIVE transition)
111  // formaer rtc_init_entry()
112  virtual RTC::ReturnCode_t onInitialize();
113 
114  // The finalize action (on ALIVE->END transition)
115  // formaer rtc_exiting_entry()
116  // virtual RTC::ReturnCode_t onFinalize();
117 
118  // The startup action when ExecutionContext startup
119  // former rtc_starting_entry()
120  // virtual RTC::ReturnCode_t onStartup(RTC::UniqueId ec_id);
121 
122  // The shutdown action when ExecutionContext stop
123  // former rtc_stopping_entry()
124  // virtual RTC::ReturnCode_t onShutdown(RTC::UniqueId ec_id);
125 
126  // The activated action (Active state entry action)
127  // former rtc_active_entry()
128  // virtual RTC::ReturnCode_t onActivated(RTC::UniqueId ec_id);
129 
130  // The deactivated action (Active state exit action)
131  // former rtc_active_exit()
132  // virtual RTC::ReturnCode_t onDeactivated(RTC::UniqueId ec_id);
133 
134  // The execution action that is invoked periodically
135  // former rtc_active_do()
136  virtual RTC::ReturnCode_t onExecute(RTC::UniqueId ec_id);
137 
138  // The aborting action when main logic error occurred.
139  // former rtc_aborting_entry()
140  // virtual RTC::ReturnCode_t onAborting(RTC::UniqueId ec_id);
141 
142  // The error action in ERROR state
143  // former rtc_error_do()
144  // virtual RTC::ReturnCode_t onError(RTC::UniqueId ec_id);
145 
146  // The reset action that is invoked resetting
147  // This is same but different the former rtc_init_entry()
148  // virtual RTC::ReturnCode_t onReset(RTC::UniqueId ec_id);
149 
150  // The state update action that is invoked after onExecute() action
151  // no corresponding operation exists in OpenRTm-aist-0.2.0
152  // virtual RTC::ReturnCode_t onStateUpdate(RTC::UniqueId ec_id);
153 
154  // The action that is invoked when execution context's rate is changed
155  // no corresponding operation exists in OpenRTm-aist-0.2.0
156  // virtual RTC::ReturnCode_t onRateChanged(RTC::UniqueId ec_id);
157 
158  protected:
159  // DataInPort declaration
160  // <rtc-template block="inport_declare">
161 
162  // </rtc-template>
163 
164 
165  // DataOutPort declaration
166  // <rtc-template block="outport_declare">
167  TimedOctet m_Octet;
169  TimedShort m_Short;
171  TimedLong m_Long;
173  TimedFloat m_Float;
175  TimedDouble m_Double;
177  TimedOctetSeq m_OctetSeq;
179  TimedShortSeq m_ShortSeq;
181  TimedLongSeq m_LongSeq;
183  TimedFloatSeq m_FloatSeq;
185  TimedDoubleSeq m_DoubleSeq;
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  // Configuration variable declaration
206  // <rtc-template block="config_declare">
207  std::string m_data_type;
208 
209  // </rtc-template>
210 
211  private:
212 
213 };
214 
215 extern "C"
216 {
218 };
219 
220 #endif // SEQOUT_H
OutPort< TimedFloat > m_FloatOut
Definition: SeqOut.h:174
virtual void operator()(const ConnectorInfo &info, const TimedLong &data)
Definition: SeqOut.h:49
OutPort< TimedDouble > m_DoubleOut
Definition: SeqOut.h:176
coil::Properties properties
Connection properties.
RT-Component.
DLL_EXPORT void SeqOutInit(RTC::Manager *manager)
Definition: SeqOut.cpp:392
Definition: SeqOut.h:103
OutPort< TimedFloatSeq > m_FloatSeqOut
Definition: SeqOut.h:184
TimedFloat m_Float
Definition: SeqOut.h:173
DataFlowComponentBase class.
ReturnCode_t
Definition: doil.h:53
virtual ~ConnListener()
Definition: SeqOut.h:75
TimedShortSeq m_ShortSeq
Definition: SeqOut.h:179
TimedOctetSeq m_OctetSeq
Definition: SeqOut.h:177
TimedLongSeq m_LongSeq
Definition: SeqOut.h:181
Manager class.
Definition: Manager.h:80
virtual void operator()(const ConnectorInfo &info)
Virtual Callback method.
Definition: SeqOut.h:84
OutPort< TimedLong > m_LongOut
Definition: SeqOut.h:172
Base class of OutPort.
CorbaPort class.
TimedFloatSeq m_FloatSeq
Definition: SeqOut.h:183
DataListener(const char *name)
Definition: SeqOut.h:39
RTComponent manager class.
TimedShort m_Short
Definition: SeqOut.h:169
OutPort< TimedShortSeq > m_ShortSeqOut
Definition: SeqOut.h:180
ExecutionContextHandle_t UniqueId
OutPort< TimedLongSeq > m_LongSeqOut
Definition: SeqOut.h:182
ConnectorDataListenerT class.
Base class of InPort.
std::string m_data_type
Definition: SeqOut.h:207
#define DLL_EXPORT
Definition: PluginC.cpp:8
std::string name
Connection name.
OutPort< TimedShort > m_ShortOut
Definition: SeqOut.h:170
TimedDoubleSeq m_DoubleSeq
Definition: SeqOut.h:185
virtual ~DataListener()
Definition: SeqOut.h:40
bool g_Listener_dump_enabled
Definition: SeqIn.cpp:14
OutPort< TimedOctet > m_OctetOut
Definition: SeqOut.h:168
TimedLong m_Long
Definition: SeqOut.h:171
TimedOctet m_Octet
Definition: SeqOut.h:167
ConnListener(const char *name)
Definition: SeqOut.h:74
OutPort< TimedOctetSeq > m_OctetSeqOut
Definition: SeqOut.h:178
TimedDouble m_Double
Definition: SeqOut.h:175
OutPort< TimedDoubleSeq > m_DoubleSeqOut
Definition: SeqOut.h:186
std::string id
ConnectionID.


openrtm_aist
Author(s): Noriaki Ando
autogenerated on Mon Feb 28 2022 23:00:45