| 13 | extern ACE_Condition<ACE_Recursive_Thread_Mutex> done_condition_; |
| 14 | |
| 15 | void write (long id, |
| 16 | int size, |
| 17 | int num_messages, |
| 18 | ::DDS::DataWriter_ptr writer) |
| 19 | { |
| 20 | profilingTest::testMsg data; |
| 21 | data.msgID = id; |
| 22 | data.contents.length(size); |
| 23 | |
| 24 | for (int i = 0; i < size; i ++) |
| 25 | { |
| 26 | data.contents[i] = (char) i % 256; |
| 27 | } |
| 28 | |
| 29 | ::profilingTest::testMsgDataWriter_var pt_dw |
| 30 | = ::profilingTest::testMsgDataWriter::_narrow(writer); |
| 31 | ACE_ASSERT (! CORBA::is_nil (pt_dw.in ())); |
| 32 | |
| 33 | ACE_DEBUG((LM_DEBUG, |
| 34 | ACE_TEXT("(%P|%t) %T Writer::svc starting to write.\n"))); |
| 35 | |
| 36 | ::DDS::InstanceHandle_t handle |
| 37 | = pt_dw->register_instance(data); |
| 38 | |
| 39 | for (int i = 0; i < num_messages; i ++) |
| 40 | { |
| 41 | data.count = i; |
| 42 | pt_dw->write(data, handle); |
| 43 | } |
| 44 | } |
| 45 | |
| 46 | |
| 47 |
no test coverage detected