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

Function createTopic

tests/DCPS/Reliability/Boilerplate.cpp:32–57  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

30}
31
32DDS::Topic_var
33createTopic(DDS::DomainParticipant_var participant)
34{
35 // Register TypeSupport (Messenger::Message)
36 Reliability::MessageTypeSupport_var ts =
37 new Reliability::MessageTypeSupportImpl;
38
39 if (ts->register_type(participant, "") != DDS::RETCODE_OK) {
40 throw std::string("failed to register type support");
41 }
42
43 CORBA::String_var type_name = ts->get_type_name();
44
45 DDS::Topic_var topic =
46 participant->create_topic("transaction_test",
47 type_name,
48 TOPIC_QOS_DEFAULT,
49 0,
50 OpenDDS::DCPS::DEFAULT_STATUS_MASK);
51
52 // Check for failure
53 if (!topic) {
54 throw std::string("failed to create topic");
55 }
56 return topic;
57}
58
59DDS::Publisher_var
60createPublisher(DDS::DomainParticipant_var participant)

Callers 3

ACE_TMAINFunction · 0.50
ACE_TMAINFunction · 0.50

Calls 3

register_typeMethod · 0.45
get_type_nameMethod · 0.45
create_topicMethod · 0.45

Tested by

no test coverage detected