PublisherFlushTests.cpp
Go to the documentation of this file.
1 // -*- C++ -*-
12 /*
13  * $Log: PublisherFlushTests.cpp,v $
14  * Revision 1.2 2008/01/23 09:20:42 arafune
15  * modified some tests.
16  *
17  * Revision 1.1 2007/12/20 07:50:18 arafune
18  * *** empty log message ***
19  *
20  * Revision 1.2 2007/01/12 14:54:32 n-ando
21  * The constructor's signature was changed.
22  * InPortConsumer base class is now abstruct class. It needs concrete class.
23  *
24  * Revision 1.1 2006/12/18 06:51:31 n-ando
25  * The first commitment.
26  *
27  *
28  */
29 
30 #ifndef PublisherFlush_cpp
31 #define PublisherFlush_cpp
32 
33 #include <cppunit/ui/text/TestRunner.h>
34 #include <cppunit/TextOutputter.h>
35 #include <cppunit/extensions/TestFactoryRegistry.h>
36 #include <cppunit/extensions/HelperMacros.h>
37 #include <cppunit/TestAssert.h>
38 
40 #include <rtm/PublisherFlush.h>
41 #include <rtm/CdrRingBuffer.h>
42 
43 #include <rtm/idl/BasicDataTypeSkel.h>
44 #include <rtm/ConnectorListener.h>
45 
46 #include <sys/time.h>
52 namespace PublisherFlush
53 {
54 
55  int m_OnCheck = 0;
56 
61  : public RTC::ConnectorDataListenerT<RTC::TimedLong>
62  {
63  public:
64  DataListener(const char* name) : m_name(name) {}
65  virtual ~DataListener()
66  {
67  }
68 
69  virtual void operator()(const RTC::ConnectorInfo& info,
70  const RTC::TimedLong& data)
71  {
72  std::cout << "------------------------------" << std::endl;
73  std::cout << "Listener: " << m_name << std::endl;
74  std::cout << " Data: " << data.data << std::endl;
75  std::cout << "------------------------------" << std::endl;
76  };
77  std::string m_name;
78  };
79 
86  {
87  public:
93  {
94  m_buffer = new RTC::CdrRingBuffer();
95  }
101  {
102  delete m_buffer;
103  }
108  virtual ReturnCode put(const cdrMemoryStream& data)
109  {
110  if (m_buffer->full())
111  {
113  }
114 
115 
116  RTC::BufferStatus::Enum ret = m_buffer->write(data);
117 
118  //Listener check
119  if(m_OnCheck == 0) {
120  switch(ret)
121  {
124  break;
127  break;
130  break;
133  break;
136  break;
137  default:
139  }
141  }
142  else if(m_OnCheck == 1) {
144  }
145  else if(m_OnCheck == 2) {
147  }
148  else if(m_OnCheck == 3) {
150  }
151  else if(m_OnCheck == 4) {
153  }
154  else if(m_OnCheck == 5) {
156  }
157 
158 
159  }
164  cdrMemoryStream get_m_put_data(void)
165  {
166  cdrMemoryStream cdr;
167  m_buffer->read(cdr);
168 
169  return cdr;
170  }
171  private:
173  ::OpenRTM::CdrData m_put_data;
174  };
175 
177  : public CppUnit::TestFixture
178  {
179  CPPUNIT_TEST_SUITE(PublisherFlushTests);
180 
181  CPPUNIT_TEST(test_setConsumer);
182  CPPUNIT_TEST(test_activate_deactivate_isActive);
183  CPPUNIT_TEST(test_write);
184 // CPPUNIT_TEST(test_update_immediacy);
185 
186  CPPUNIT_TEST_SUITE_END();
187 
188  private:
189 
190  public:
192 
197  {
198  }
199 
204  {
205  }
206 
210  virtual void setUp()
211  {
212  }
213 
217  virtual void tearDown()
218  {
219 // sleep(1);
220  }
221 
226  void test_setConsumer(void)
227  {
228  RTC::InPortCorbaCdrConsumer *consumer0
230  RTC::InPortCorbaCdrConsumer *consumer1
232  RTC::PublisherFlush publisher;
233 
234  //NULLを渡した場合INVALID_ARGSとなることを確認する。
235  CPPUNIT_ASSERT_EQUAL(RTC::PublisherFlush::INVALID_ARGS,
236  publisher.setConsumer(NULL));
237 
238  //
239  CPPUNIT_ASSERT_EQUAL(RTC::PublisherFlush::PORT_OK,
240  publisher.setConsumer(consumer0));
241 
242  //
243  CPPUNIT_ASSERT_EQUAL(RTC::PublisherFlush::PORT_OK,
244  publisher.setConsumer(consumer1));
245 
246  delete consumer0;
247  delete consumer1;
248 
249  }
255  {
256  RTC::InPortCorbaCdrConsumer *consumer
258  RTC::PublisherFlush publisher;
259  publisher.setConsumer(consumer);
260 
261  CPPUNIT_ASSERT_EQUAL(false,
262  publisher.isActive());
263 
264  CPPUNIT_ASSERT_EQUAL(RTC::PublisherFlush::PORT_OK,
265  publisher.activate());
266 
267  CPPUNIT_ASSERT_EQUAL(true,
268  publisher.isActive());
269 
270  //既に activate されている場合は
271  //activateすると //PORT_OK を返すことを確認する。 CPPUNIT_ASSERT_EQUAL(RTC::PublisherFlush::PORT_OK, publisher.activate()); CPPUNIT_ASSERT_EQUAL(true, publisher.isActive()); CPPUNIT_ASSERT_EQUAL(RTC::PublisherFlush::PORT_OK, publisher.deactivate()); CPPUNIT_ASSERT_EQUAL(false, publisher.isActive()); //activate されていない状態で、 //deactivateすると //PORT_OK を返すことを確認する。 CPPUNIT_ASSERT_EQUAL(RTC::PublisherFlush::PORT_OK, publisher.deactivate()); CPPUNIT_ASSERT_EQUAL(false, publisher.isActive()); delete consumer; } /*! * @brief write()メソッドのテスト * */ void test_write(void) { InPortCorbaCdrConsumerMock *consumer = new InPortCorbaCdrConsumerMock(); RTC::PublisherFlush publisher; //ConnectorInfo coil::Properties prop; coil::vstring ports; RTC::ConnectorInfo info("name", "id", ports, prop); //ConnectorListeners m_listeners.connectorData_[RTC::ON_BUFFER_WRITE].addListener( new DataListener("ON_BUFFER_WRITE"), true); m_listeners.connectorData_[RTC::ON_BUFFER_FULL].addListener( new DataListener("ON_BUFFER_FULL"), true); m_listeners.connectorData_[RTC::ON_BUFFER_WRITE_TIMEOUT].addListener( new DataListener("ON_BUFFER_WRITE_TIMEOUT"), true); m_listeners.connectorData_[RTC::ON_BUFFER_OVERWRITE].addListener( new DataListener("ON_BUFFER_OVERWRITE"), true); m_listeners.connectorData_[RTC::ON_BUFFER_READ].addListener( new DataListener("ON_BUFFER_READ"), true); m_listeners.connectorData_[RTC::ON_SEND].addListener( new DataListener("ON_SEND"), true); m_listeners.connectorData_[RTC::ON_RECEIVED].addListener( new DataListener("ON_RECEIVED"), true); m_listeners.connectorData_[RTC::ON_RECEIVER_FULL].addListener( new DataListener("ON_RECEIVER_FULL"), true); m_listeners.connectorData_[RTC::ON_RECEIVER_TIMEOUT].addListener( new DataListener("ON_RECEIVER_TIMEOUT"), true); m_listeners.connectorData_[RTC::ON_RECEIVER_ERROR].addListener( new DataListener("ON_RECEIVER_ERROR"), true); // setListener CPPUNIT_ASSERT_EQUAL(RTC::DataPortStatus::INVALID_ARGS, publisher.setListener(info, 0)); CPPUNIT_ASSERT_EQUAL(RTC::DataPortStatus::PORT_OK, publisher.setListener(info, &m_listeners)); //Consumerを設定しない状態でwriteをコール { cdrMemoryStream cdr; RTC::TimedLong td; td.data = 12345; td >>= cdr; CPPUNIT_ASSERT_EQUAL(RTC::PublisherFlush::PRECONDITION_NOT_MET, publisher.write(cdr,0,0)); } publisher.setConsumer(consumer); //activateする前にwriteをコール { cdrMemoryStream cdr; RTC::TimedLong td; td.data = 123; td >>= cdr; CPPUNIT_ASSERT_EQUAL(RTC::PublisherFlush::PORT_OK, publisher.write(cdr,0,0)); } publisher.activate(); CORBA::Long testdata[8] = { 123,279,3106,31611,125563, 125563,846459,2071690107 }; for(int icc(0);icc<7;++icc) { cdrMemoryStream cdr; RTC::TimedLong td; td.data = testdata[icc+1]; td >>= cdr; CPPUNIT_ASSERT_EQUAL(RTC::PublisherFlush::PORT_OK, publisher.write(cdr,0,0)); } //full の状態でコール(full) { cdrMemoryStream cdr; RTC::TimedLong td; td.data = 12345; td >>= cdr; CPPUNIT_ASSERT_EQUAL(RTC::PublisherFlush::SEND_FULL, publisher.write(cdr,0,0)); } for(int icc(0);icc<8;++icc) { cdrMemoryStream data; data = consumer->get_m_put_data(); CORBA::ULong inlen = data.bufSize(); CPPUNIT_ASSERT_EQUAL(12,(int)inlen); RTC::TimedLong rtd; rtd <<= data; CPPUNIT_ASSERT_EQUAL((long)testdata[icc], (long)rtd.data); } //deactivateしてからwriteをコール publisher.deactivate(); { cdrMemoryStream cdr; RTC::TimedLong td; td.data = 12345; td >>= cdr; CPPUNIT_ASSERT_EQUAL(RTC::PublisherFlush::PORT_OK, publisher.write(cdr,0,0)); } //Listener callback check cdrMemoryStream cdr; RTC::TimedLong td; td.data = 777; td >>= cdr; m_OnCheck = 1; // PORT_OK:onReceived() publisher.write(cdr,0,0); m_OnCheck = 2; // PORT_ERROR:onReceiverError() publisher.write(cdr,0,0); m_OnCheck = 3; // SEND_FULL:onReceiverFull() publisher.write(cdr,0,0); m_OnCheck = 4; // SEND_TIMEOUT:onReceiverTimeout() publisher.write(cdr,0,0); m_OnCheck = 5; // UNKNOWN_ERROR:onReceiverError() publisher.write(cdr,0,0); delete consumer; } /*! * @brief update()メソッド呼出周辺の即時性のテスト * * - Publisherのupdate()メソッド呼出後、所定時間内にConsumerのpush()メソッドが呼び出されるか? * - Consumerのpush()メソッド終了後、所定時間内にPublihserのupdate()メソッド呼出から復帰するか? * * @attention リアルタイム性が保証されているわけでもなく、仕様上も呼出までの時間を明記しているわけではないので、ここでの所定時間はテスト作成者の主観によるものに過ぎない。 */ /* void test_update_immediacy() { long sleepTick = 100000; // 0.1 [sec] MockConsumer* consumer = new MockConsumer(sleepTick); coil::Properties prop; RTC::PublisherFlush publisher(consumer, prop); for (int i = 0; i < 10; i++) { consumer->setDelayStartTime(); publisher.update(); consumer->recordReturnTick(); } long permissibleDelayTick = 100000; // 0.1 [sec] const std::vector<long>& delayTicks = consumer->getDelayTicks(); for (std::vector<long>::size_type i = 0; i < delayTicks.size(); i++) { CPPUNIT_ASSERT(delayTicks[i] < permissibleDelayTick); } long permissibleReturnTick = 100000; // 0.1 [sec] const std::vector<long>& returnTicks = consumer->getReturnTicks(); for (std::vector<long>::size_type i = 0; i < returnTicks.size(); i++) { CPPUNIT_ASSERT(returnTicks[i] < permissibleReturnTick); } } */ }; }; // namespace PublisherFlush /* * Register test suite */ CPPUNIT_TEST_SUITE_REGISTRATION(PublisherFlush::PublisherFlushTests); #ifdef LOCAL_MAIN int main(int argc, char* argv[]) { FORMAT format = TEXT_OUT; int target = 0; std::string xsl; std::string ns; std::string fname; std::ofstream ofs; int i(1); while (i < argc) { std::string arg(argv[i]); std::string next_arg; if (i + 1 < argc) next_arg = argv[i + 1]; else next_arg = ""; if (arg == "--text") { format = TEXT_OUT; break; } if (arg == "--xml") { if (next_arg == "") { fname = argv[0]; fname += ".xml"; } else { fname = next_arg; } format = XML_OUT; ofs.open(fname.c_str()); } if ( arg == "--compiler" ) { format = COMPILER_OUT; break; } if ( arg == "--cerr" ) { target = 1; break; } if ( arg == "--xsl" ) { if (next_arg == "") xsl = "default.xsl"; else xsl = next_arg; } if ( arg == "--namespace" ) { if (next_arg == "") { std::cerr << "no namespace specified" << std::endl; exit(1); } else { xsl = next_arg; } } ++i; } CppUnit::TextUi::TestRunner runner; if ( ns.empty() ) runner.addTest(CppUnit::TestFactoryRegistry::getRegistry().makeTest()); else runner.addTest(CppUnit::TestFactoryRegistry::getRegistry(ns).makeTest()); CppUnit::Outputter* outputter = 0; std::ostream* stream = target ? &std::cerr : &std::cout; switch ( format ) { case TEXT_OUT : outputter = new CppUnit::TextOutputter(&runner.result(),*stream); break; case XML_OUT : std::cout << "XML_OUT" << std::endl; outputter = new CppUnit::XmlOutputter(&runner.result(), ofs, "shift_jis"); static_cast<CppUnit::XmlOutputter*>(outputter)->setStyleSheet(xsl); break; case COMPILER_OUT : outputter = new CppUnit::CompilerOutputter(&runner.result(),*stream); break; } runner.setOutputter(outputter); runner.run(); return 0; // runner.run() ? 0 : 1; } #endif // MAIN #endif // PublisherFlush_cpp
272  //PORT_OK を返すことを確認する。
273  CPPUNIT_ASSERT_EQUAL(RTC::PublisherFlush::PORT_OK,
274  publisher.activate());
275 
276  CPPUNIT_ASSERT_EQUAL(true,
277  publisher.isActive());
278 
279  CPPUNIT_ASSERT_EQUAL(RTC::PublisherFlush::PORT_OK,
280  publisher.deactivate());
281 
282  CPPUNIT_ASSERT_EQUAL(false,
283  publisher.isActive());
284 
285  //activate されていない状態で、
286  //deactivateすると //PORT_OK を返すことを確認する。 CPPUNIT_ASSERT_EQUAL(RTC::PublisherFlush::PORT_OK, publisher.deactivate()); CPPUNIT_ASSERT_EQUAL(false, publisher.isActive()); delete consumer; } /*! * @brief write()メソッドのテスト * */ void test_write(void) { InPortCorbaCdrConsumerMock *consumer = new InPortCorbaCdrConsumerMock(); RTC::PublisherFlush publisher; //ConnectorInfo coil::Properties prop; coil::vstring ports; RTC::ConnectorInfo info("name", "id", ports, prop); //ConnectorListeners m_listeners.connectorData_[RTC::ON_BUFFER_WRITE].addListener( new DataListener("ON_BUFFER_WRITE"), true); m_listeners.connectorData_[RTC::ON_BUFFER_FULL].addListener( new DataListener("ON_BUFFER_FULL"), true); m_listeners.connectorData_[RTC::ON_BUFFER_WRITE_TIMEOUT].addListener( new DataListener("ON_BUFFER_WRITE_TIMEOUT"), true); m_listeners.connectorData_[RTC::ON_BUFFER_OVERWRITE].addListener( new DataListener("ON_BUFFER_OVERWRITE"), true); m_listeners.connectorData_[RTC::ON_BUFFER_READ].addListener( new DataListener("ON_BUFFER_READ"), true); m_listeners.connectorData_[RTC::ON_SEND].addListener( new DataListener("ON_SEND"), true); m_listeners.connectorData_[RTC::ON_RECEIVED].addListener( new DataListener("ON_RECEIVED"), true); m_listeners.connectorData_[RTC::ON_RECEIVER_FULL].addListener( new DataListener("ON_RECEIVER_FULL"), true); m_listeners.connectorData_[RTC::ON_RECEIVER_TIMEOUT].addListener( new DataListener("ON_RECEIVER_TIMEOUT"), true); m_listeners.connectorData_[RTC::ON_RECEIVER_ERROR].addListener( new DataListener("ON_RECEIVER_ERROR"), true); // setListener CPPUNIT_ASSERT_EQUAL(RTC::DataPortStatus::INVALID_ARGS, publisher.setListener(info, 0)); CPPUNIT_ASSERT_EQUAL(RTC::DataPortStatus::PORT_OK, publisher.setListener(info, &m_listeners)); //Consumerを設定しない状態でwriteをコール { cdrMemoryStream cdr; RTC::TimedLong td; td.data = 12345; td >>= cdr; CPPUNIT_ASSERT_EQUAL(RTC::PublisherFlush::PRECONDITION_NOT_MET, publisher.write(cdr,0,0)); } publisher.setConsumer(consumer); //activateする前にwriteをコール { cdrMemoryStream cdr; RTC::TimedLong td; td.data = 123; td >>= cdr; CPPUNIT_ASSERT_EQUAL(RTC::PublisherFlush::PORT_OK, publisher.write(cdr,0,0)); } publisher.activate(); CORBA::Long testdata[8] = { 123,279,3106,31611,125563, 125563,846459,2071690107 }; for(int icc(0);icc<7;++icc) { cdrMemoryStream cdr; RTC::TimedLong td; td.data = testdata[icc+1]; td >>= cdr; CPPUNIT_ASSERT_EQUAL(RTC::PublisherFlush::PORT_OK, publisher.write(cdr,0,0)); } //full の状態でコール(full) { cdrMemoryStream cdr; RTC::TimedLong td; td.data = 12345; td >>= cdr; CPPUNIT_ASSERT_EQUAL(RTC::PublisherFlush::SEND_FULL, publisher.write(cdr,0,0)); } for(int icc(0);icc<8;++icc) { cdrMemoryStream data; data = consumer->get_m_put_data(); CORBA::ULong inlen = data.bufSize(); CPPUNIT_ASSERT_EQUAL(12,(int)inlen); RTC::TimedLong rtd; rtd <<= data; CPPUNIT_ASSERT_EQUAL((long)testdata[icc], (long)rtd.data); } //deactivateしてからwriteをコール publisher.deactivate(); { cdrMemoryStream cdr; RTC::TimedLong td; td.data = 12345; td >>= cdr; CPPUNIT_ASSERT_EQUAL(RTC::PublisherFlush::PORT_OK, publisher.write(cdr,0,0)); } //Listener callback check cdrMemoryStream cdr; RTC::TimedLong td; td.data = 777; td >>= cdr; m_OnCheck = 1; // PORT_OK:onReceived() publisher.write(cdr,0,0); m_OnCheck = 2; // PORT_ERROR:onReceiverError() publisher.write(cdr,0,0); m_OnCheck = 3; // SEND_FULL:onReceiverFull() publisher.write(cdr,0,0); m_OnCheck = 4; // SEND_TIMEOUT:onReceiverTimeout() publisher.write(cdr,0,0); m_OnCheck = 5; // UNKNOWN_ERROR:onReceiverError() publisher.write(cdr,0,0); delete consumer; } /*! * @brief update()メソッド呼出周辺の即時性のテスト * * - Publisherのupdate()メソッド呼出後、所定時間内にConsumerのpush()メソッドが呼び出されるか? * - Consumerのpush()メソッド終了後、所定時間内にPublihserのupdate()メソッド呼出から復帰するか? * * @attention リアルタイム性が保証されているわけでもなく、仕様上も呼出までの時間を明記しているわけではないので、ここでの所定時間はテスト作成者の主観によるものに過ぎない。 */ /* void test_update_immediacy() { long sleepTick = 100000; // 0.1 [sec] MockConsumer* consumer = new MockConsumer(sleepTick); coil::Properties prop; RTC::PublisherFlush publisher(consumer, prop); for (int i = 0; i < 10; i++) { consumer->setDelayStartTime(); publisher.update(); consumer->recordReturnTick(); } long permissibleDelayTick = 100000; // 0.1 [sec] const std::vector<long>& delayTicks = consumer->getDelayTicks(); for (std::vector<long>::size_type i = 0; i < delayTicks.size(); i++) { CPPUNIT_ASSERT(delayTicks[i] < permissibleDelayTick); } long permissibleReturnTick = 100000; // 0.1 [sec] const std::vector<long>& returnTicks = consumer->getReturnTicks(); for (std::vector<long>::size_type i = 0; i < returnTicks.size(); i++) { CPPUNIT_ASSERT(returnTicks[i] < permissibleReturnTick); } } */ }; }; // namespace PublisherFlush /* * Register test suite */ CPPUNIT_TEST_SUITE_REGISTRATION(PublisherFlush::PublisherFlushTests); #ifdef LOCAL_MAIN int main(int argc, char* argv[]) { FORMAT format = TEXT_OUT; int target = 0; std::string xsl; std::string ns; std::string fname; std::ofstream ofs; int i(1); while (i < argc) { std::string arg(argv[i]); std::string next_arg; if (i + 1 < argc) next_arg = argv[i + 1]; else next_arg = ""; if (arg == "--text") { format = TEXT_OUT; break; } if (arg == "--xml") { if (next_arg == "") { fname = argv[0]; fname += ".xml"; } else { fname = next_arg; } format = XML_OUT; ofs.open(fname.c_str()); } if ( arg == "--compiler" ) { format = COMPILER_OUT; break; } if ( arg == "--cerr" ) { target = 1; break; } if ( arg == "--xsl" ) { if (next_arg == "") xsl = "default.xsl"; else xsl = next_arg; } if ( arg == "--namespace" ) { if (next_arg == "") { std::cerr << "no namespace specified" << std::endl; exit(1); } else { xsl = next_arg; } } ++i; } CppUnit::TextUi::TestRunner runner; if ( ns.empty() ) runner.addTest(CppUnit::TestFactoryRegistry::getRegistry().makeTest()); else runner.addTest(CppUnit::TestFactoryRegistry::getRegistry(ns).makeTest()); CppUnit::Outputter* outputter = 0; std::ostream* stream = target ? &std::cerr : &std::cout; switch ( format ) { case TEXT_OUT : outputter = new CppUnit::TextOutputter(&runner.result(),*stream); break; case XML_OUT : std::cout << "XML_OUT" << std::endl; outputter = new CppUnit::XmlOutputter(&runner.result(), ofs, "shift_jis"); static_cast<CppUnit::XmlOutputter*>(outputter)->setStyleSheet(xsl); break; case COMPILER_OUT : outputter = new CppUnit::CompilerOutputter(&runner.result(),*stream); break; } runner.setOutputter(outputter); runner.run(); return 0; // runner.run() ? 0 : 1; } #endif // MAIN #endif // PublisherFlush_cpp
287  //PORT_OK を返すことを確認する。
288  CPPUNIT_ASSERT_EQUAL(RTC::PublisherFlush::PORT_OK,
289  publisher.deactivate());
290 
291  CPPUNIT_ASSERT_EQUAL(false,
292  publisher.isActive());
293 
294  delete consumer;
295  }
300  void test_write(void)
301  {
302  InPortCorbaCdrConsumerMock *consumer
304 
305  RTC::PublisherFlush publisher;
306 
307  //ConnectorInfo
309  coil::vstring ports;
310  RTC::ConnectorInfo info("name", "id", ports, prop);
311 
312  //ConnectorListeners
314  new DataListener("ON_BUFFER_WRITE"), true);
316  new DataListener("ON_BUFFER_FULL"), true);
318  new DataListener("ON_BUFFER_WRITE_TIMEOUT"), true);
320  new DataListener("ON_BUFFER_OVERWRITE"), true);
322  new DataListener("ON_BUFFER_READ"), true);
324  new DataListener("ON_SEND"), true);
326  new DataListener("ON_RECEIVED"), true);
328  new DataListener("ON_RECEIVER_FULL"), true);
330  new DataListener("ON_RECEIVER_TIMEOUT"), true);
332  new DataListener("ON_RECEIVER_ERROR"), true);
333 
334  // setListener
335  CPPUNIT_ASSERT_EQUAL(RTC::DataPortStatus::INVALID_ARGS,
336  publisher.setListener(info, 0));
337  CPPUNIT_ASSERT_EQUAL(RTC::DataPortStatus::PORT_OK,
338  publisher.setListener(info, &m_listeners));
339 
340  //Consumerを設定しない状態でwriteをコール { cdrMemoryStream cdr; RTC::TimedLong td; td.data = 12345; td >>= cdr; CPPUNIT_ASSERT_EQUAL(RTC::PublisherFlush::PRECONDITION_NOT_MET, publisher.write(cdr,0,0)); } publisher.setConsumer(consumer); //activateする前にwriteをコール { cdrMemoryStream cdr; RTC::TimedLong td; td.data = 123; td >>= cdr; CPPUNIT_ASSERT_EQUAL(RTC::PublisherFlush::PORT_OK, publisher.write(cdr,0,0)); } publisher.activate(); CORBA::Long testdata[8] = { 123,279,3106,31611,125563, 125563,846459,2071690107 }; for(int icc(0);icc<7;++icc) { cdrMemoryStream cdr; RTC::TimedLong td; td.data = testdata[icc+1]; td >>= cdr; CPPUNIT_ASSERT_EQUAL(RTC::PublisherFlush::PORT_OK, publisher.write(cdr,0,0)); } //full の状態でコール(full) { cdrMemoryStream cdr; RTC::TimedLong td; td.data = 12345; td >>= cdr; CPPUNIT_ASSERT_EQUAL(RTC::PublisherFlush::SEND_FULL, publisher.write(cdr,0,0)); } for(int icc(0);icc<8;++icc) { cdrMemoryStream data; data = consumer->get_m_put_data(); CORBA::ULong inlen = data.bufSize(); CPPUNIT_ASSERT_EQUAL(12,(int)inlen); RTC::TimedLong rtd; rtd <<= data; CPPUNIT_ASSERT_EQUAL((long)testdata[icc], (long)rtd.data); } //deactivateしてからwriteをコール publisher.deactivate(); { cdrMemoryStream cdr; RTC::TimedLong td; td.data = 12345; td >>= cdr; CPPUNIT_ASSERT_EQUAL(RTC::PublisherFlush::PORT_OK, publisher.write(cdr,0,0)); } //Listener callback check cdrMemoryStream cdr; RTC::TimedLong td; td.data = 777; td >>= cdr; m_OnCheck = 1; // PORT_OK:onReceived() publisher.write(cdr,0,0); m_OnCheck = 2; // PORT_ERROR:onReceiverError() publisher.write(cdr,0,0); m_OnCheck = 3; // SEND_FULL:onReceiverFull() publisher.write(cdr,0,0); m_OnCheck = 4; // SEND_TIMEOUT:onReceiverTimeout() publisher.write(cdr,0,0); m_OnCheck = 5; // UNKNOWN_ERROR:onReceiverError() publisher.write(cdr,0,0); delete consumer; } /*! * @brief update()メソッド呼出周辺の即時性のテスト * * - Publisherのupdate()メソッド呼出後、所定時間内にConsumerのpush()メソッドが呼び出されるか? * - Consumerのpush()メソッド終了後、所定時間内にPublihserのupdate()メソッド呼出から復帰するか? * * @attention リアルタイム性が保証されているわけでもなく、仕様上も呼出までの時間を明記しているわけではないので、ここでの所定時間はテスト作成者の主観によるものに過ぎない。 */ /* void test_update_immediacy() { long sleepTick = 100000; // 0.1 [sec] MockConsumer* consumer = new MockConsumer(sleepTick); coil::Properties prop; RTC::PublisherFlush publisher(consumer, prop); for (int i = 0; i < 10; i++) { consumer->setDelayStartTime(); publisher.update(); consumer->recordReturnTick(); } long permissibleDelayTick = 100000; // 0.1 [sec] const std::vector<long>& delayTicks = consumer->getDelayTicks(); for (std::vector<long>::size_type i = 0; i < delayTicks.size(); i++) { CPPUNIT_ASSERT(delayTicks[i] < permissibleDelayTick); } long permissibleReturnTick = 100000; // 0.1 [sec] const std::vector<long>& returnTicks = consumer->getReturnTicks(); for (std::vector<long>::size_type i = 0; i < returnTicks.size(); i++) { CPPUNIT_ASSERT(returnTicks[i] < permissibleReturnTick); } } */ }; }; // namespace PublisherFlush /* * Register test suite */ CPPUNIT_TEST_SUITE_REGISTRATION(PublisherFlush::PublisherFlushTests); #ifdef LOCAL_MAIN int main(int argc, char* argv[]) { FORMAT format = TEXT_OUT; int target = 0; std::string xsl; std::string ns; std::string fname; std::ofstream ofs; int i(1); while (i < argc) { std::string arg(argv[i]); std::string next_arg; if (i + 1 < argc) next_arg = argv[i + 1]; else next_arg = ""; if (arg == "--text") { format = TEXT_OUT; break; } if (arg == "--xml") { if (next_arg == "") { fname = argv[0]; fname += ".xml"; } else { fname = next_arg; } format = XML_OUT; ofs.open(fname.c_str()); } if ( arg == "--compiler" ) { format = COMPILER_OUT; break; } if ( arg == "--cerr" ) { target = 1; break; } if ( arg == "--xsl" ) { if (next_arg == "") xsl = "default.xsl"; else xsl = next_arg; } if ( arg == "--namespace" ) { if (next_arg == "") { std::cerr << "no namespace specified" << std::endl; exit(1); } else { xsl = next_arg; } } ++i; } CppUnit::TextUi::TestRunner runner; if ( ns.empty() ) runner.addTest(CppUnit::TestFactoryRegistry::getRegistry().makeTest()); else runner.addTest(CppUnit::TestFactoryRegistry::getRegistry(ns).makeTest()); CppUnit::Outputter* outputter = 0; std::ostream* stream = target ? &std::cerr : &std::cout; switch ( format ) { case TEXT_OUT : outputter = new CppUnit::TextOutputter(&runner.result(),*stream); break; case XML_OUT : std::cout << "XML_OUT" << std::endl; outputter = new CppUnit::XmlOutputter(&runner.result(), ofs, "shift_jis"); static_cast<CppUnit::XmlOutputter*>(outputter)->setStyleSheet(xsl); break; case COMPILER_OUT : outputter = new CppUnit::CompilerOutputter(&runner.result(),*stream); break; } runner.setOutputter(outputter); runner.run(); return 0; // runner.run() ? 0 : 1; } #endif // MAIN #endif // PublisherFlush_cpp
341  {
342  cdrMemoryStream cdr;
343  RTC::TimedLong td;
344  td.data = 12345;
345  td >>= cdr;
346  CPPUNIT_ASSERT_EQUAL(RTC::PublisherFlush::PRECONDITION_NOT_MET,
347  publisher.write(cdr,0,0));
348  }
349 
350  publisher.setConsumer(consumer);
351 
352  //activateする前にwriteをコール { cdrMemoryStream cdr; RTC::TimedLong td; td.data = 123; td >>= cdr; CPPUNIT_ASSERT_EQUAL(RTC::PublisherFlush::PORT_OK, publisher.write(cdr,0,0)); } publisher.activate(); CORBA::Long testdata[8] = { 123,279,3106,31611,125563, 125563,846459,2071690107 }; for(int icc(0);icc<7;++icc) { cdrMemoryStream cdr; RTC::TimedLong td; td.data = testdata[icc+1]; td >>= cdr; CPPUNIT_ASSERT_EQUAL(RTC::PublisherFlush::PORT_OK, publisher.write(cdr,0,0)); } //full の状態でコール(full) { cdrMemoryStream cdr; RTC::TimedLong td; td.data = 12345; td >>= cdr; CPPUNIT_ASSERT_EQUAL(RTC::PublisherFlush::SEND_FULL, publisher.write(cdr,0,0)); } for(int icc(0);icc<8;++icc) { cdrMemoryStream data; data = consumer->get_m_put_data(); CORBA::ULong inlen = data.bufSize(); CPPUNIT_ASSERT_EQUAL(12,(int)inlen); RTC::TimedLong rtd; rtd <<= data; CPPUNIT_ASSERT_EQUAL((long)testdata[icc], (long)rtd.data); } //deactivateしてからwriteをコール publisher.deactivate(); { cdrMemoryStream cdr; RTC::TimedLong td; td.data = 12345; td >>= cdr; CPPUNIT_ASSERT_EQUAL(RTC::PublisherFlush::PORT_OK, publisher.write(cdr,0,0)); } //Listener callback check cdrMemoryStream cdr; RTC::TimedLong td; td.data = 777; td >>= cdr; m_OnCheck = 1; // PORT_OK:onReceived() publisher.write(cdr,0,0); m_OnCheck = 2; // PORT_ERROR:onReceiverError() publisher.write(cdr,0,0); m_OnCheck = 3; // SEND_FULL:onReceiverFull() publisher.write(cdr,0,0); m_OnCheck = 4; // SEND_TIMEOUT:onReceiverTimeout() publisher.write(cdr,0,0); m_OnCheck = 5; // UNKNOWN_ERROR:onReceiverError() publisher.write(cdr,0,0); delete consumer; } /*! * @brief update()メソッド呼出周辺の即時性のテスト * * - Publisherのupdate()メソッド呼出後、所定時間内にConsumerのpush()メソッドが呼び出されるか? * - Consumerのpush()メソッド終了後、所定時間内にPublihserのupdate()メソッド呼出から復帰するか? * * @attention リアルタイム性が保証されているわけでもなく、仕様上も呼出までの時間を明記しているわけではないので、ここでの所定時間はテスト作成者の主観によるものに過ぎない。 */ /* void test_update_immediacy() { long sleepTick = 100000; // 0.1 [sec] MockConsumer* consumer = new MockConsumer(sleepTick); coil::Properties prop; RTC::PublisherFlush publisher(consumer, prop); for (int i = 0; i < 10; i++) { consumer->setDelayStartTime(); publisher.update(); consumer->recordReturnTick(); } long permissibleDelayTick = 100000; // 0.1 [sec] const std::vector<long>& delayTicks = consumer->getDelayTicks(); for (std::vector<long>::size_type i = 0; i < delayTicks.size(); i++) { CPPUNIT_ASSERT(delayTicks[i] < permissibleDelayTick); } long permissibleReturnTick = 100000; // 0.1 [sec] const std::vector<long>& returnTicks = consumer->getReturnTicks(); for (std::vector<long>::size_type i = 0; i < returnTicks.size(); i++) { CPPUNIT_ASSERT(returnTicks[i] < permissibleReturnTick); } } */ }; }; // namespace PublisherFlush /* * Register test suite */ CPPUNIT_TEST_SUITE_REGISTRATION(PublisherFlush::PublisherFlushTests); #ifdef LOCAL_MAIN int main(int argc, char* argv[]) { FORMAT format = TEXT_OUT; int target = 0; std::string xsl; std::string ns; std::string fname; std::ofstream ofs; int i(1); while (i < argc) { std::string arg(argv[i]); std::string next_arg; if (i + 1 < argc) next_arg = argv[i + 1]; else next_arg = ""; if (arg == "--text") { format = TEXT_OUT; break; } if (arg == "--xml") { if (next_arg == "") { fname = argv[0]; fname += ".xml"; } else { fname = next_arg; } format = XML_OUT; ofs.open(fname.c_str()); } if ( arg == "--compiler" ) { format = COMPILER_OUT; break; } if ( arg == "--cerr" ) { target = 1; break; } if ( arg == "--xsl" ) { if (next_arg == "") xsl = "default.xsl"; else xsl = next_arg; } if ( arg == "--namespace" ) { if (next_arg == "") { std::cerr << "no namespace specified" << std::endl; exit(1); } else { xsl = next_arg; } } ++i; } CppUnit::TextUi::TestRunner runner; if ( ns.empty() ) runner.addTest(CppUnit::TestFactoryRegistry::getRegistry().makeTest()); else runner.addTest(CppUnit::TestFactoryRegistry::getRegistry(ns).makeTest()); CppUnit::Outputter* outputter = 0; std::ostream* stream = target ? &std::cerr : &std::cout; switch ( format ) { case TEXT_OUT : outputter = new CppUnit::TextOutputter(&runner.result(),*stream); break; case XML_OUT : std::cout << "XML_OUT" << std::endl; outputter = new CppUnit::XmlOutputter(&runner.result(), ofs, "shift_jis"); static_cast<CppUnit::XmlOutputter*>(outputter)->setStyleSheet(xsl); break; case COMPILER_OUT : outputter = new CppUnit::CompilerOutputter(&runner.result(),*stream); break; } runner.setOutputter(outputter); runner.run(); return 0; // runner.run() ? 0 : 1; } #endif // MAIN #endif // PublisherFlush_cpp
353  {
354  cdrMemoryStream cdr;
355  RTC::TimedLong td;
356  td.data = 123;
357  td >>= cdr;
358 
359  CPPUNIT_ASSERT_EQUAL(RTC::PublisherFlush::PORT_OK,
360  publisher.write(cdr,0,0));
361  }
362  publisher.activate();
363 
364  CORBA::Long testdata[8] = { 123,279,3106,31611,125563,
365  125563,846459,2071690107 };
366 
367  for(int icc(0);icc<7;++icc)
368  {
369  cdrMemoryStream cdr;
370  RTC::TimedLong td;
371  td.data = testdata[icc+1];
372  td >>= cdr;
373 
374  CPPUNIT_ASSERT_EQUAL(RTC::PublisherFlush::PORT_OK,
375  publisher.write(cdr,0,0));
376 
377  }
378 
379  //full の状態でコール(full)
380  {
381  cdrMemoryStream cdr;
382  RTC::TimedLong td;
383  td.data = 12345;
384  td >>= cdr;
385  CPPUNIT_ASSERT_EQUAL(RTC::PublisherFlush::SEND_FULL,
386  publisher.write(cdr,0,0));
387  }
388 
389  for(int icc(0);icc<8;++icc)
390  {
391  cdrMemoryStream data;
392  data = consumer->get_m_put_data();
393  CORBA::ULong inlen = data.bufSize();
394  CPPUNIT_ASSERT_EQUAL(12,(int)inlen);
395 
396  RTC::TimedLong rtd;
397  rtd <<= data;
398 
399  CPPUNIT_ASSERT_EQUAL((long)testdata[icc], (long)rtd.data);
400  }
401 
402  //deactivateしてからwriteをコール publisher.deactivate(); { cdrMemoryStream cdr; RTC::TimedLong td; td.data = 12345; td >>= cdr; CPPUNIT_ASSERT_EQUAL(RTC::PublisherFlush::PORT_OK, publisher.write(cdr,0,0)); } //Listener callback check cdrMemoryStream cdr; RTC::TimedLong td; td.data = 777; td >>= cdr; m_OnCheck = 1; // PORT_OK:onReceived() publisher.write(cdr,0,0); m_OnCheck = 2; // PORT_ERROR:onReceiverError() publisher.write(cdr,0,0); m_OnCheck = 3; // SEND_FULL:onReceiverFull() publisher.write(cdr,0,0); m_OnCheck = 4; // SEND_TIMEOUT:onReceiverTimeout() publisher.write(cdr,0,0); m_OnCheck = 5; // UNKNOWN_ERROR:onReceiverError() publisher.write(cdr,0,0); delete consumer; } /*! * @brief update()メソッド呼出周辺の即時性のテスト * * - Publisherのupdate()メソッド呼出後、所定時間内にConsumerのpush()メソッドが呼び出されるか? * - Consumerのpush()メソッド終了後、所定時間内にPublihserのupdate()メソッド呼出から復帰するか? * * @attention リアルタイム性が保証されているわけでもなく、仕様上も呼出までの時間を明記しているわけではないので、ここでの所定時間はテスト作成者の主観によるものに過ぎない。 */ /* void test_update_immediacy() { long sleepTick = 100000; // 0.1 [sec] MockConsumer* consumer = new MockConsumer(sleepTick); coil::Properties prop; RTC::PublisherFlush publisher(consumer, prop); for (int i = 0; i < 10; i++) { consumer->setDelayStartTime(); publisher.update(); consumer->recordReturnTick(); } long permissibleDelayTick = 100000; // 0.1 [sec] const std::vector<long>& delayTicks = consumer->getDelayTicks(); for (std::vector<long>::size_type i = 0; i < delayTicks.size(); i++) { CPPUNIT_ASSERT(delayTicks[i] < permissibleDelayTick); } long permissibleReturnTick = 100000; // 0.1 [sec] const std::vector<long>& returnTicks = consumer->getReturnTicks(); for (std::vector<long>::size_type i = 0; i < returnTicks.size(); i++) { CPPUNIT_ASSERT(returnTicks[i] < permissibleReturnTick); } } */ }; }; // namespace PublisherFlush /* * Register test suite */ CPPUNIT_TEST_SUITE_REGISTRATION(PublisherFlush::PublisherFlushTests); #ifdef LOCAL_MAIN int main(int argc, char* argv[]) { FORMAT format = TEXT_OUT; int target = 0; std::string xsl; std::string ns; std::string fname; std::ofstream ofs; int i(1); while (i < argc) { std::string arg(argv[i]); std::string next_arg; if (i + 1 < argc) next_arg = argv[i + 1]; else next_arg = ""; if (arg == "--text") { format = TEXT_OUT; break; } if (arg == "--xml") { if (next_arg == "") { fname = argv[0]; fname += ".xml"; } else { fname = next_arg; } format = XML_OUT; ofs.open(fname.c_str()); } if ( arg == "--compiler" ) { format = COMPILER_OUT; break; } if ( arg == "--cerr" ) { target = 1; break; } if ( arg == "--xsl" ) { if (next_arg == "") xsl = "default.xsl"; else xsl = next_arg; } if ( arg == "--namespace" ) { if (next_arg == "") { std::cerr << "no namespace specified" << std::endl; exit(1); } else { xsl = next_arg; } } ++i; } CppUnit::TextUi::TestRunner runner; if ( ns.empty() ) runner.addTest(CppUnit::TestFactoryRegistry::getRegistry().makeTest()); else runner.addTest(CppUnit::TestFactoryRegistry::getRegistry(ns).makeTest()); CppUnit::Outputter* outputter = 0; std::ostream* stream = target ? &std::cerr : &std::cout; switch ( format ) { case TEXT_OUT : outputter = new CppUnit::TextOutputter(&runner.result(),*stream); break; case XML_OUT : std::cout << "XML_OUT" << std::endl; outputter = new CppUnit::XmlOutputter(&runner.result(), ofs, "shift_jis"); static_cast<CppUnit::XmlOutputter*>(outputter)->setStyleSheet(xsl); break; case COMPILER_OUT : outputter = new CppUnit::CompilerOutputter(&runner.result(),*stream); break; } runner.setOutputter(outputter); runner.run(); return 0; // runner.run() ? 0 : 1; } #endif // MAIN #endif // PublisherFlush_cpp
403  publisher.deactivate();
404  {
405  cdrMemoryStream cdr;
406  RTC::TimedLong td;
407  td.data = 12345;
408  td >>= cdr;
409  CPPUNIT_ASSERT_EQUAL(RTC::PublisherFlush::PORT_OK,
410  publisher.write(cdr,0,0));
411  }
412 
413  //Listener callback check
414  cdrMemoryStream cdr;
415  RTC::TimedLong td;
416  td.data = 777;
417  td >>= cdr;
418  m_OnCheck = 1; // PORT_OK:onReceived()
419  publisher.write(cdr,0,0);
420  m_OnCheck = 2; // PORT_ERROR:onReceiverError()
421  publisher.write(cdr,0,0);
422  m_OnCheck = 3; // SEND_FULL:onReceiverFull()
423  publisher.write(cdr,0,0);
424  m_OnCheck = 4; // SEND_TIMEOUT:onReceiverTimeout()
425  publisher.write(cdr,0,0);
426  m_OnCheck = 5; // UNKNOWN_ERROR:onReceiverError()
427  publisher.write(cdr,0,0);
428 
429  delete consumer;
430  }
431 
440 /*
441  void test_update_immediacy()
442  {
443  long sleepTick = 100000; // 0.1 [sec]
444 
445  MockConsumer* consumer = new MockConsumer(sleepTick);
446  coil::Properties prop;
447  RTC::PublisherFlush publisher(consumer, prop);
448 
449  for (int i = 0; i < 10; i++)
450  {
451  consumer->setDelayStartTime();
452  publisher.update();
453  consumer->recordReturnTick();
454  }
455 
456  long permissibleDelayTick = 100000; // 0.1 [sec]
457  const std::vector<long>& delayTicks = consumer->getDelayTicks();
458  for (std::vector<long>::size_type i = 0; i < delayTicks.size(); i++)
459  {
460  CPPUNIT_ASSERT(delayTicks[i] < permissibleDelayTick);
461  }
462 
463  long permissibleReturnTick = 100000; // 0.1 [sec]
464  const std::vector<long>& returnTicks = consumer->getReturnTicks();
465  for (std::vector<long>::size_type i = 0; i < returnTicks.size(); i++)
466  {
467  CPPUNIT_ASSERT(returnTicks[i] < permissibleReturnTick);
468  }
469  }
470 */
471 
472  };
473 }; // namespace PublisherFlush
474 
475 /*
476  * Register test suite
477  */
479 
480 #ifdef LOCAL_MAIN
481 int main(int argc, char* argv[])
482 {
483 
484  FORMAT format = TEXT_OUT;
485  int target = 0;
486  std::string xsl;
487  std::string ns;
488  std::string fname;
489  std::ofstream ofs;
490 
491  int i(1);
492  while (i < argc)
493  {
494  std::string arg(argv[i]);
495  std::string next_arg;
496  if (i + 1 < argc) next_arg = argv[i + 1];
497  else next_arg = "";
498 
499  if (arg == "--text") { format = TEXT_OUT; break; }
500  if (arg == "--xml")
501  {
502  if (next_arg == "")
503  {
504  fname = argv[0];
505  fname += ".xml";
506  }
507  else
508  {
509  fname = next_arg;
510  }
511  format = XML_OUT;
512  ofs.open(fname.c_str());
513  }
514  if ( arg == "--compiler" ) { format = COMPILER_OUT; break; }
515  if ( arg == "--cerr" ) { target = 1; break; }
516  if ( arg == "--xsl" )
517  {
518  if (next_arg == "") xsl = "default.xsl";
519  else xsl = next_arg;
520  }
521  if ( arg == "--namespace" )
522  {
523  if (next_arg == "")
524  {
525  std::cerr << "no namespace specified" << std::endl;
526  exit(1);
527  }
528  else
529  {
530  xsl = next_arg;
531  }
532  }
533  ++i;
534  }
535  CppUnit::TextUi::TestRunner runner;
536  if ( ns.empty() )
537  runner.addTest(CppUnit::TestFactoryRegistry::getRegistry().makeTest());
538  else
539  runner.addTest(CppUnit::TestFactoryRegistry::getRegistry(ns).makeTest());
540  CppUnit::Outputter* outputter = 0;
541  std::ostream* stream = target ? &std::cerr : &std::cout;
542  switch ( format )
543  {
544  case TEXT_OUT :
545  outputter = new CppUnit::TextOutputter(&runner.result(),*stream);
546  break;
547  case XML_OUT :
548  std::cout << "XML_OUT" << std::endl;
549  outputter = new CppUnit::XmlOutputter(&runner.result(),
550  ofs, "shift_jis");
551  static_cast<CppUnit::XmlOutputter*>(outputter)->setStyleSheet(xsl);
552  break;
553  case COMPILER_OUT :
554  outputter = new CppUnit::CompilerOutputter(&runner.result(),*stream);
555  break;
556  }
557  runner.setOutputter(outputter);
558  runner.run();
559  return 0; // runner.run() ? 0 : 1;
560 }
561 #endif // MAIN
562 #endif // PublisherFlush_cpp
void test_write(void)
write()メソッドのテスト
ConnectorListeners class.
int main(int argc, char **argv)
virtual ReturnCode write(const cdrMemoryStream &data, unsigned long sec, unsigned long usec)
Write data.
virtual ReturnCode deactivate()
deactivation
InPortCorbaCdrConsumer class.
virtual ::RTC::DataPortStatus::Enum setListener(ConnectorInfo &profile, RTC::ConnectorListeners *listeners)
Set the listener.
virtual ReturnCode setConsumer(InPortConsumer *consumer)
Store InPort consumer.
void addListener(ConnectorDataListener *listener, bool autoclean)
Add the listener.
RTC::ReturnCode_t ret(RTC::Local::ReturnCode_t r)
void test_activate_deactivate_isActive(void)
activate(),deactivate(),isActiveメソッドのテスト
void test_setConsumer(void)
setConsumer()メソッドのテスト
RingBuffer< cdrMemoryStream > CdrRingBuffer
Definition: CdrRingBuffer.h:28
Enum
DataPortStatus return codes.
Definition: BufferStatus.h:84
virtual void operator()(const RTC::ConnectorInfo &info, const RTC::TimedLong &data)
Virtual Callback method.
std::vector< std::string > vstring
Definition: stringutil.h:37
PublisherFlush class.
ConnectorDataListenerHolder connectorData_[CONNECTOR_DATA_LISTENER_NUM]
ConnectorDataListenerType listener array The ConnectorDataListenerType listener is stored...
ConnectorDataListenerT class.
virtual void tearDown()
Test finalization.
CPPUNIT_TEST_SUITE_REGISTRATION(PublisherFlush::PublisherFlushTests)
virtual bool isActive()
If publisher is active state.
PublisherFlush class.
prop
Organization::get_organization_property ();.
RingBuffer for CDR.
Class represents a set of properties.
Definition: Properties.h:101
InPortCorbaCdrConsumer class.
virtual void setUp()
Test initialization.
virtual ReturnCode activate()
activation
BufferBase abstract class.
Definition: BufferBase.h:104
connector listener class
virtual ReturnCode put(const cdrMemoryStream &data)
Send data to the destination port.


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