MCPcopy Create free account
hub / github.com/OpenDDS/OpenDDS / write

Function write

performance-tests/DCPS/TCPProfilingTest/Writer.cpp:15–44  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

13extern ACE_Condition<ACE_Recursive_Thread_Mutex> done_condition_;
14
15void 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

Callers 1

svcMethod · 0.70

Calls 4

lengthMethod · 0.45
inMethod · 0.45
register_instanceMethod · 0.45
writeMethod · 0.45

Tested by

no test coverage detected