diff options
author | Johnny Willemsen <jwillemsen@remedy.nl> | 2009-06-08 15:10:45 +0000 |
---|---|---|
committer | Johnny Willemsen <jwillemsen@remedy.nl> | 2009-06-08 15:10:45 +0000 |
commit | e7fdd7b934477a653865552f8ca4f83b284f4b05 (patch) | |
tree | 7bf17a6268ba25385b39a13f7dcafd50f8f9d857 /modules/CIAO/connectors/dds4ccm/examples | |
parent | 3154ac6d68dc60479d04d3c8b1737f913cc71d3f (diff) | |
download | ATCD-e7fdd7b934477a653865552f8ca4f83b284f4b05.tar.gz |
Diffstat (limited to 'modules/CIAO/connectors/dds4ccm/examples')
-rw-r--r-- | modules/CIAO/connectors/dds4ccm/examples/Hello/Sender/Hello_Sender_Connector.mpc | 2 | ||||
-rw-r--r-- | modules/CIAO/connectors/dds4ccm/examples/Hello/Sender/Hello_Sender_Connector_exec.cpp | 41 |
2 files changed, 42 insertions, 1 deletions
diff --git a/modules/CIAO/connectors/dds4ccm/examples/Hello/Sender/Hello_Sender_Connector.mpc b/modules/CIAO/connectors/dds4ccm/examples/Hello/Sender/Hello_Sender_Connector.mpc index ed8a298ad8d..2f3230b9e84 100644 --- a/modules/CIAO/connectors/dds4ccm/examples/Hello/Sender/Hello_Sender_Connector.mpc +++ b/modules/CIAO/connectors/dds4ccm/examples/Hello/Sender/Hello_Sender_Connector.mpc @@ -62,7 +62,7 @@ project(Hello_Base_Sender_Connector_stub) : ccm_stub, avoids_ace_for_tao { } } -project(Hello_Base_Sender_Connector_exec) : ciao_executor, avoids_ace_for_tao { +project(Hello_Base_Sender_Connector_exec) : ciao_executor, avoids_ace_for_tao, nddslib { after += Hello_Base_Sender_Connector_idle_gen Hello_Base_Sender_Connector_stub sharedname = Sender_Connector_exec libs += Sender_Connector_stub Hello_Base_stub diff --git a/modules/CIAO/connectors/dds4ccm/examples/Hello/Sender/Hello_Sender_Connector_exec.cpp b/modules/CIAO/connectors/dds4ccm/examples/Hello/Sender/Hello_Sender_Connector_exec.cpp index 846e45add01..07d6e0c1353 100644 --- a/modules/CIAO/connectors/dds4ccm/examples/Hello/Sender/Hello_Sender_Connector_exec.cpp +++ b/modules/CIAO/connectors/dds4ccm/examples/Hello/Sender/Hello_Sender_Connector_exec.cpp @@ -50,6 +50,47 @@ namespace CIDL_Sender_Connector_Impl DataWriter_exec_i::DataWriter_exec_i (void) { + +/* 8 int domainId = 0; + 9 int sample_count = 100; + 10 DomainParticipant *participant = NULL; + 11 Publisher *publisher = NULL; + 12 Topic *topic = NULL; + 13 DataWriter *writer = NULL; + 14 HelloWorldDataWriter *helloWriter = NULL; + 15 HelloWorld instance; + 16 InstanceHandle_t instance_handle = HANDLE_NIL; + 17 const char *type_name = NULL; + 18 int count = 0; + 19 participant = TheParticipantFactory->create_participant( + 20 domainId, PARTICIPANT_QOS_DEFAULT, NULL /* listener */, + 21 STATUS_MASK_NONE); + 22 publisher = participant->create_publisher( + 23 PUBLISHER_QOS_DEFAULT, NULL /* listener */, + 24 STATUS_MASK_NONE); + 25 type_name = HelloWorldTypeSupport::get_type_name(); + 26 HelloWorldTypeSupport::register_type( + 27 participant, type_name); + 28 topic = participant->create_topic( + 29 "Example HelloWorld", + 30 type_name, TOPIC_QOS_DEFAULT, NULL /* listener */, + 31 STATUS_MASK_NONE); + 32 writer = publisher->create_datawriter( + 33 topic, DATAWRITER_QOS_DEFAULT, NULL /* listener */, + 34 STATUS_MASK_NONE); + 35 helloWriter = HelloWorldDataWriter::narrow(writer); + 36 strcpy(instance.name, "MyName"); + 37 instance_handle = HelloWorld_writer->register_instance(instance); + 38 /* Main loop */ + 39 for (count=0; (sample_count == 0) || (count < sample_count); ++count) { + 40 sprintf(instance.msg, "Hello World! (count %d)", count); + 41 printf("Writing: %s", instance.msg); + 42 helloWriter->write(*instance, instance_handle); + 43 sleep(1); + 44 } + 45 participant->delete_contained_entities(); + 46 TheParticipantFactory->delete_participant(participant); +*/ } DataWriter_exec_i::~DataWriter_exec_i (void) |