diff options
Diffstat (limited to 'modules/CIAO/connectors/dds4ccm/tests/VariousTopicsState')
24 files changed, 3047 insertions, 0 deletions
diff --git a/modules/CIAO/connectors/dds4ccm/tests/VariousTopicsState/Base/VTopics_Base.idl b/modules/CIAO/connectors/dds4ccm/tests/VariousTopicsState/Base/VTopics_Base.idl new file mode 100644 index 00000000000..4f852e618e3 --- /dev/null +++ b/modules/CIAO/connectors/dds4ccm/tests/VariousTopicsState/Base/VTopics_Base.idl @@ -0,0 +1,75 @@ +// $Id$ + +/** + * @file VTopics_Base.idl + * @author Marijke Hengstmengel <mhengstmengel@remedy.nl> + */ + +#ifndef VTOPICS_BASE_IDL +#define VTOPICS_BASE_IDL + +#pragma ndds typesupport "Base/VTopics_BaseSupport.h" + +// Plain Topic +struct TestTopic { + string key; //@key + long x; +}; + +// String +struct TopicString { + string key; //@key + string x_str; +}; + +// Arrays +struct TopicArray { + string key; //@key + octet x_array[5]; +}; + +// Unions +union X_Union switch (short) { + case 0: + string x_test; + case 1: + long x_long; +}; + +struct TopicUnion { + string key; //@key + X_Union x_uni; +}; + +// Sequence +struct test { + short x_test; + string x_teststr; +}; +typedef sequence<test> test_seq; + +struct TopicSeq { + string key; //@key + test_seq x_seq; + }; + + // ValueType +valuetype X_Valuetype { + public string type; + public long x_long; +}; + +struct TopicValuetype { + string key; //@key + X_Valuetype x_vt; +}; + +// Sequences +typedef sequence<TestTopic> TestTopicSeq; +typedef sequence<TopicString> TopicStringSeq; +typedef sequence<TopicArray> TopicArraySeq; +typedef sequence<TopicUnion> TopicUnionSeq; +typedef sequence<TopicSeq> TopicSeqSeq; +typedef sequence<TopicValuetype> TopicValuetypeSeq; + +#endif diff --git a/modules/CIAO/connectors/dds4ccm/tests/VariousTopicsState/Base/VTopics_Base.mpc b/modules/CIAO/connectors/dds4ccm/tests/VariousTopicsState/Base/VTopics_Base.mpc new file mode 100644 index 00000000000..1ce360b9201 --- /dev/null +++ b/modules/CIAO/connectors/dds4ccm/tests/VariousTopicsState/Base/VTopics_Base.mpc @@ -0,0 +1,27 @@ +// $Id$ + +project (DDS_VTopics_Base_stub) : taoidldefaults, anytypecode, \ + dds4ccm_ts_default,valuetype { + sharedname = DDS_VTopics_Base_stub + dynamicflags += VTOPICS_BASE_STUB_BUILD_DLL + libout = ../lib + + idlflags += -SS \ + -Wb,stub_export_macro=VTOPICS_BASE_STUB_Export \ + -Wb,stub_export_include=VTopics_Base_stub_export.h + + IDL_Files { + idlflags += -Gxhst + VTopics_Base.idl + } + + opendds_ts_flags += --export=VTOPICS_BASE_STUB_Export + + DDSGenerator_Files { + VTopics_Base.idl + } + + Source_Files { + } +} + diff --git a/modules/CIAO/connectors/dds4ccm/tests/VariousTopicsState/Conn_Array/VTS_Array_Connector.idl b/modules/CIAO/connectors/dds4ccm/tests/VariousTopicsState/Conn_Array/VTS_Array_Connector.idl new file mode 100644 index 00000000000..47160c4f29d --- /dev/null +++ b/modules/CIAO/connectors/dds4ccm/tests/VariousTopicsState/Conn_Array/VTS_Array_Connector.idl @@ -0,0 +1,25 @@ +// $Id$ + +/** + * @file VTS_Array_Connector.idl + * @author Marijke Hengstmengel <mhengstmengel@remedy.nl> + */ + +#ifndef VTS_ARRAY_CONNECTOR_IDL_ +#define VTS_ARRAY_CONNECTOR_IDL_ + +#include <Components.idl> +#include "Base/VTopics_Base.idl" +#include "connectors/dds4ccm/idl/ccm_dds.idl" + +#pragma ciao lem "Conn_Array/VTS_Array_ConnectorE.idl" + +module VTopics +{ + module ::CCM_DDS::Typed < ::TopicArray, ::TopicArraySeq> TopicArrayConn; + connector VTS_Array_Connector : TopicArrayConn::DDS_State + { + }; +}; + +#endif /* VTS_Array_CONNECTOR_IDL_ */ diff --git a/modules/CIAO/connectors/dds4ccm/tests/VariousTopicsState/Conn_Array/VTS_Array_Connector.mpc b/modules/CIAO/connectors/dds4ccm/tests/VariousTopicsState/Conn_Array/VTS_Array_Connector.mpc new file mode 100644 index 00000000000..839a9e5ef50 --- /dev/null +++ b/modules/CIAO/connectors/dds4ccm/tests/VariousTopicsState/Conn_Array/VTS_Array_Connector.mpc @@ -0,0 +1,144 @@ +// $Id$ +// This file is generated with "generate_component_mpc.pl -p DDS_VTopics_Base -l .. -o ../lib -u DDS VTS_Array_Connector" + +project(DDS_VTS_ARRAY_Connector_idl_gen) : connectoridldefaults, dds4ccm { + after += DDS4CCM_idl_gen + custom_only = 1 + idlflags += -Wb,stub_export_macro=VTS_ARRAY_CONNECTOR_STUB_Export \ + -Wb,stub_export_include=VTS_Array_Connector_stub_export.h \ + -Wb,skel_export_macro=VTS_ARRAY_CONNECTOR_SVNT_Export \ + -Wb,skel_export_include=VTS_Array_Connector_svnt_export.h \ + -Wb,svnt_export_macro=VTS_ARRAY_CONNECTOR_SVNT_Export \ + -Wb,svnt_export_include=VTS_Array_Connector_svnt_export.h \ + -Wb,conn_export_macro=VTS_ARRAY_CONNECTOR_CONN_Export \ + -Wb,conn_export_include=VTS_Array_Connector_conn_export.h \ + -I .. + + IDL_Files { + VTS_Array_Connector.idl + } +} + +project(DDS_VTS_ARRAY_Connector_lem_gen) : ciaoidldefaults, dds4ccm { + custom_only = 1 + after += DDS_VTS_ARRAY_Connector_idl_gen + idlflags += -Wb,stub_export_macro=VTS_ARRAY_CONNECTOR_LEM_STUB_Export \ + -Wb,stub_export_include=VTS_Array_Connector_lem_stub_export.h \ + -SS -Gxhst \ + -I .. + + IDL_Files { + VTS_Array_ConnectorE.idl + } +} + +project(DDS_VTS_ARRAY_Connector_lem_stub) : ccm_svnt, dds4ccm_base { + after += DDS_VTS_ARRAY_Connector_lem_gen DDS_VTS_Array_Connector_stub DDS_VTopics_Base_stub DDS4CCM_lem_stub + libs += DDS_VTopics_Base_stub DDS_VTS_Array_Connector_stub DDS4CCM_lem_stub + libpaths += ../lib + libout = ../lib + includes += .. + sharedname = DDS_VTS_ARRAY_Connector_lem_stub + dynamicflags = VTS_ARRAY_CONNECTOR_LEM_STUB_BUILD_DLL + + IDL_Files { + } + + Source_Files { + VTS_Array_ConnectorEC.cpp + } + + Header_Files { + VTS_Array_ConnectorEC.h + VTS_Array_Connector_lem_stub_export.h + } + + Inline_Files { + VTS_Array_ConnectorEC.inl + } +} + +project(DDS_VTS_Array_Connector_stub) : ccm_stub, dds4ccm_base { + after += DDS_VTS_ARRAY_Connector_idl_gen DDS_VTopics_Base_stub + libs += DDS_VTopics_Base_stub + libpaths += ../lib + libout = ../lib + includes += .. + sharedname = DDS_VTS_Array_Connector_stub + dynamicflags = VTS_ARRAY_CONNECTOR_STUB_BUILD_DLL + + IDL_Files { + } + + Source_Files { + VTS_Array_ConnectorC.cpp + } + + Header_Files { + VTS_Array_ConnectorC.h + VTS_Array_Connector_stub_export.h + } + + Inline_Files { + VTS_Array_ConnectorC.inl + } +} + +project(DDS_VTS_Array_Connector_exec) : ciao_executor, dds4ccm_impl { + after += DDS_VTS_ARRAY_Connector_lem_stub DDS_VTS_Array_Connector_stub DDS4CCM_lem_stub DDS_VTopics_Base_stub + sharedname = DDS_VTS_Array_Connector_exec + libs += DDS_VTS_Array_Connector_stub DDS_VTS_ARRAY_Connector_lem_stub DDS_VTopics_Base_stub DDS4CCM_lem_stub DDS_VTopics_Base_stub + libpaths += ../lib + libout = ../lib + includes += .. + dynamicflags = VTS_ARRAY_CONNECTOR_CONN_BUILD_DLL + + IDL_Files { + } + + Source_Files { + VTS_Array_Connector_conn.cpp + } + + Header_Files { + VTS_Array_Connector_conn.h + VTS_Array_Connector_conn_export.h + } + + Inline_Files { + } +} + + +project(DDS_VTS_Array_Connector_svnt) : ciao_servant, dds4ccm_impl { + after += DDS_VTS_ARRAY_Connector_lem_stub DDS_VTS_Array_Connector_exec DDS_VTS_Array_Connector_stub DDS4CCM_lem_stub + sharedname = DDS_VTS_Array_Connector_svnt + libs += DDS_VTS_Array_Connector_stub \ + DDS_VTS_ARRAY_Connector_lem_stub \ + DDS_VTopics_Base_stub \ + DDS_VTS_Array_Connector_exec \ + DDS4CCM_lem_stub + libpaths += ../lib + libout = ../lib + includes += .. + dynamicflags = VTS_ARRAY_CONNECTOR_SVNT_BUILD_DLL + + IDL_Files { + } + + Source_Files { + VTS_Array_ConnectorS.cpp + VTS_Array_Connector_svnt.cpp + } + + Header_Files { + VTS_Array_ConnectorS.h + VTS_Array_Connector_svnt.h + VTS_Array_Connector_svnt_export.h + } + + Inline_Files { + VTS_Array_ConnectorS.inl + } +} + diff --git a/modules/CIAO/connectors/dds4ccm/tests/VariousTopicsState/Conn_Seq/VTS_Seq_Connector.idl b/modules/CIAO/connectors/dds4ccm/tests/VariousTopicsState/Conn_Seq/VTS_Seq_Connector.idl new file mode 100644 index 00000000000..4d2ef4d08cb --- /dev/null +++ b/modules/CIAO/connectors/dds4ccm/tests/VariousTopicsState/Conn_Seq/VTS_Seq_Connector.idl @@ -0,0 +1,25 @@ +// $Id$ + +/** + * @file VTS_Seq_Connector.idl + * @author Marijke Hengstmengel <mhengstmengel@remedy.nl> + */ + +#ifndef VTS_SEQ_CONNECTOR_IDL_ +#define VTS_SEQ_CONNECTOR_IDL_ + +#include <Components.idl> +#include "Base/VTopics_Base.idl" +#include "connectors/dds4ccm/idl/ccm_dds.idl" + +#pragma ciao lem "Conn_Seq/VTS_Seq_ConnectorE.idl" + +module VTopics +{ + module ::CCM_DDS::Typed < ::TopicSeq, ::TopicSeqSeq> TopicSeqConn; + connector VTS_Seq_Connector : TopicSeqConn::DDS_State + { + }; +}; + +#endif /* VTS_SEQ_CONNECTOR_IDL_ */ diff --git a/modules/CIAO/connectors/dds4ccm/tests/VariousTopicsState/Conn_Seq/VTS_Seq_Connector.mpc b/modules/CIAO/connectors/dds4ccm/tests/VariousTopicsState/Conn_Seq/VTS_Seq_Connector.mpc new file mode 100644 index 00000000000..d11a8536328 --- /dev/null +++ b/modules/CIAO/connectors/dds4ccm/tests/VariousTopicsState/Conn_Seq/VTS_Seq_Connector.mpc @@ -0,0 +1,144 @@ +// $Id$ +// This file is generated with "generate_component_mpc.pl -p DDS_VTopics_Base -l .. -o ../lib -u DDS VTS_Seq_Connector" + +project(DDS_VTS_SEQ_Connector_idl_gen) : connectoridldefaults, dds4ccm { + after += DDS4CCM_idl_gen + custom_only = 1 + idlflags += -Wb,stub_export_macro=VTS_SEQ_CONNECTOR_STUB_Export \ + -Wb,stub_export_include=VTS_Seq_Connector_stub_export.h \ + -Wb,skel_export_macro=VTS_SEQ_CONNECTOR_SVNT_Export \ + -Wb,skel_export_include=VTS_Seq_Connector_svnt_export.h \ + -Wb,svnt_export_macro=VTS_SEQ_CONNECTOR_SVNT_Export \ + -Wb,svnt_export_include=VTS_Seq_Connector_svnt_export.h \ + -Wb,conn_export_macro=VTS_SEQ_CONNECTOR_CONN_Export \ + -Wb,conn_export_include=VTS_Seq_Connector_conn_export.h \ + -I .. + + IDL_Files { + VTS_Seq_Connector.idl + } +} + +project(DDS_VTS_SEQ_Connector_lem_gen) : ciaoidldefaults, dds4ccm { + custom_only = 1 + after += DDS_VTS_SEQ_Connector_idl_gen + idlflags += -Wb,stub_export_macro=VTS_SEQ_CONNECTOR_LEM_STUB_Export \ + -Wb,stub_export_include=VTS_Seq_Connector_lem_stub_export.h \ + -SS -Gxhst \ + -I .. + + IDL_Files { + VTS_Seq_ConnectorE.idl + } +} + +project(DDS_VTS_SEQ_Connector_lem_stub) : ccm_svnt, dds4ccm_base { + after += DDS_VTS_SEQ_Connector_lem_gen DDS_VTS_Seq_Connector_stub DDS_VTopics_Base_stub DDS4CCM_lem_stub + libs += DDS_VTopics_Base_stub DDS_VTS_Seq_Connector_stub DDS4CCM_lem_stub + libpaths += ../lib + libout = ../lib + includes += .. + sharedname = DDS_VTS_SEQ_Connector_lem_stub + dynamicflags = VTS_SEQ_CONNECTOR_LEM_STUB_BUILD_DLL + + IDL_Files { + } + + Source_Files { + VTS_Seq_ConnectorEC.cpp + } + + Header_Files { + VTS_Seq_ConnectorEC.h + VTS_Seq_Connector_lem_stub_export.h + } + + Inline_Files { + VTS_Seq_ConnectorEC.inl + } +} + +project(DDS_VTS_Seq_Connector_stub) : ccm_stub, dds4ccm_base { + after += DDS_VTS_SEQ_Connector_idl_gen DDS_VTopics_Base_stub + libs += DDS_VTopics_Base_stub + libpaths += ../lib + libout = ../lib + includes += .. + sharedname = DDS_VTS_Seq_Connector_stub + dynamicflags = VTS_SEQ_CONNECTOR_STUB_BUILD_DLL + + IDL_Files { + } + + Source_Files { + VTS_Seq_ConnectorC.cpp + } + + Header_Files { + VTS_Seq_ConnectorC.h + VTS_Seq_Connector_stub_export.h + } + + Inline_Files { + VTS_Seq_ConnectorC.inl + } +} + +project(DDS_VTS_Seq_Connector_exec) : ciao_executor, dds4ccm_impl { + after += DDS_VTS_SEQ_Connector_lem_stub DDS_VTS_Seq_Connector_stub DDS4CCM_lem_stub DDS_VTopics_Base_stub + sharedname = DDS_VTS_Seq_Connector_exec + libs += DDS_VTS_Seq_Connector_stub DDS_VTS_SEQ_Connector_lem_stub DDS_VTopics_Base_stub DDS4CCM_lem_stub DDS_VTopics_Base_stub + libpaths += ../lib + libout = ../lib + includes += .. + dynamicflags = VTS_SEQ_CONNECTOR_CONN_BUILD_DLL + + IDL_Files { + } + + Source_Files { + VTS_Seq_Connector_conn.cpp + } + + Header_Files { + VTS_Seq_Connector_conn.h + VTS_Seq_Connector_conn_export.h + } + + Inline_Files { + } +} + + +project(DDS_VTS_Seq_Connector_svnt) : ciao_servant, dds4ccm_impl { + after += DDS_VTS_SEQ_Connector_lem_stub DDS_VTS_Seq_Connector_exec DDS_VTS_Seq_Connector_stub DDS4CCM_lem_stub + sharedname = DDS_VTS_Seq_Connector_svnt + libs += DDS_VTS_Seq_Connector_stub \ + DDS_VTS_SEQ_Connector_lem_stub \ + DDS_VTopics_Base_stub \ + DDS_VTS_Seq_Connector_exec \ + DDS4CCM_lem_stub + libpaths += ../lib + libout = ../lib + includes += .. + dynamicflags = VTS_SEQ_CONNECTOR_SVNT_BUILD_DLL + + IDL_Files { + } + + Source_Files { + VTS_Seq_ConnectorS.cpp + VTS_Seq_Connector_svnt.cpp + } + + Header_Files { + VTS_Seq_ConnectorS.h + VTS_Seq_Connector_svnt.h + VTS_Seq_Connector_svnt_export.h + } + + Inline_Files { + VTS_Seq_ConnectorS.inl + } +} + diff --git a/modules/CIAO/connectors/dds4ccm/tests/VariousTopicsState/Conn_String/VTS_String_Connector.idl b/modules/CIAO/connectors/dds4ccm/tests/VariousTopicsState/Conn_String/VTS_String_Connector.idl new file mode 100644 index 00000000000..c3c0736f42d --- /dev/null +++ b/modules/CIAO/connectors/dds4ccm/tests/VariousTopicsState/Conn_String/VTS_String_Connector.idl @@ -0,0 +1,25 @@ +// $Id$ + +/** + * @file VTS_String_Connector.idl + * @author Marijke Hengstmengel <mhengstmengel@remedy.nl> + */ + +#ifndef VTS_STRING_CONNECTOR_IDL_ +#define VTS_STRING_CONNECTOR_IDL_ + +#include <Components.idl> +#include "Base/VTopics_Base.idl" +#include "connectors/dds4ccm/idl/ccm_dds.idl" + +#pragma ciao lem "Conn_String/VTS_String_ConnectorE.idl" + +module VTopics +{ + module ::CCM_DDS::Typed < ::TopicString, ::TopicStringSeq> TopicStringConn; + connector VTS_String_Connector : TopicStringConn::DDS_Event + { + }; +}; + +#endif /* VTS_STRING_CONNECTOR_IDL_ */ diff --git a/modules/CIAO/connectors/dds4ccm/tests/VariousTopicsState/Conn_String/VTS_String_Connector.mpc b/modules/CIAO/connectors/dds4ccm/tests/VariousTopicsState/Conn_String/VTS_String_Connector.mpc new file mode 100644 index 00000000000..35548bf3c23 --- /dev/null +++ b/modules/CIAO/connectors/dds4ccm/tests/VariousTopicsState/Conn_String/VTS_String_Connector.mpc @@ -0,0 +1,145 @@ +// $Id$ +// This file is generated with "generate_component_mpc.pl -p DDS_VTopics_Base -l .. -o ../lib -u DDS VTS_String_Connector" + +project(DDS_VTS_STRING_Connector_idl_gen) : connectoridldefaults, dds4ccm { + after += DDS4CCM_idl_gen + custom_only = 1 + idlflags += -Wb,stub_export_macro=VTS_STRING_CONNECTOR_STUB_Export \ + -Wb,stub_export_include=VTS_String_Connector_stub_export.h \ + -Wb,skel_export_macro=VTS_STRING_CONNECTOR_SVNT_Export \ + -Wb,skel_export_include=VTS_String_Connector_svnt_export.h \ + -Wb,svnt_export_macro=VTS_STRING_CONNECTOR_SVNT_Export \ + -Wb,svnt_export_include=VTS_String_Connector_svnt_export.h \ + -Wb,conn_export_macro=VTS_STRING_CONNECTOR_CONN_Export \ + -Wb,conn_export_include=VTS_String_Connector_conn_export.h \ + -I .. + + IDL_Files { + VTS_String_Connector.idl + } +} + +project(DDS_VTS_STRING_Connector_lem_gen) : ciaoidldefaults, dds4ccm { + custom_only = 1 + after += DDS_VTS_STRING_Connector_idl_gen + idlflags += -Wb,stub_export_macro=VTS_STRING_CONNECTOR_LEM_STUB_Export \ + -Wb,stub_export_include=VTS_String_Connector_lem_stub_export.h \ + -SS -Gxhst \ + -I .. + + IDL_Files { + VTS_String_ConnectorE.idl + } +} + +project(DDS_VTS_STRING_Connector_lem_stub) : ccm_svnt, dds4ccm_base { + after += DDS_VTS_STRING_Connector_lem_gen DDS_VTS_String_Connector_stub DDS_VTopics_Base_stub DDS4CCM_lem_stub + libs += DDS_VTopics_Base_stub DDS_VTS_String_Connector_stub DDS4CCM_lem_stub + libpaths += ../lib + libout = ../lib + includes += .. + sharedname = DDS_VTS_STRING_Connector_lem_stub + dynamicflags = VTS_STRING_CONNECTOR_LEM_STUB_BUILD_DLL + + IDL_Files { + } + + Source_Files { + VTS_String_ConnectorEC.cpp + } + + Header_Files { + VTS_String_ConnectorEC.h + VTS_String_Connector_lem_stub_export.h + } + + Inline_Files { + VTS_String_ConnectorEC.inl + } +} + +project(DDS_VTS_String_Connector_stub) : ccm_stub, dds4ccm_base { + after += DDS_VTS_STRING_Connector_idl_gen DDS_VTopics_Base_stub + libs += DDS_VTopics_Base_stub + libpaths += ../lib + libout = ../lib + includes += .. + sharedname = DDS_VTS_String_Connector_stub + dynamicflags = VTS_STRING_CONNECTOR_STUB_BUILD_DLL + + IDL_Files { + } + + Source_Files { + VTS_String_ConnectorC.cpp + } + + Header_Files { + VTS_String_ConnectorC.h + VTS_String_Connector_stub_export.h + } + + Inline_Files { + VTS_String_ConnectorC.inl + } +} + +project(DDS_VTS_String_Connector_exec) : ciao_executor, dds4ccm_impl { + after += DDS_VTS_STRING_Connector_lem_stub DDS_VTS_String_Connector_stub DDS4CCM_lem_stub DDS_VTopics_Base_stub + sharedname = DDS_VTS_String_Connector_exec + libs += DDS_VTS_String_Connector_stub DDS_VTS_STRING_Connector_lem_stub DDS_VTopics_Base_stub DDS4CCM_lem_stub DDS_VTopics_Base_stub + libpaths += ../lib + libout = ../lib + includes += .. + dynamicflags = VTS_STRING_CONNECTOR_CONN_BUILD_DLL + + IDL_Files { + } + + Source_Files { + VTS_String_Connector_conn.cpp + } + + Header_Files { + VTS_String_Connector_conn.h + VTS_String_Connector_conn_export.h + } + + Inline_Files { + } +} + + +project(DDS_VTS_String_Connector_svnt) : ciao_servant, dds4ccm_impl { + after += DDS_VTS_STRING_Connector_lem_stub DDS_VTS_String_Connector_exec DDS_VTS_String_Connector_stub DDS4CCM_lem_stub + sharedname = DDS_VTS_String_Connector_svnt + libs += DDS_VTS_String_Connector_stub \ + DDS_VTS_STRING_Connector_lem_stub \ + DDS_VTopics_Base_stub \ + DDS_VTS_String_Connector_exec \ + DDS4CCM_lem_stub + libpaths += ../lib + libout = ../lib + includes += .. + dynamicflags = VTS_STRING_CONNECTOR_SVNT_BUILD_DLL + + IDL_Files { + } + + Source_Files { + VTS_String_ConnectorS.cpp + VTS_String_Connector_svnt.cpp + } + + Header_Files { + VTS_String_ConnectorS.h + VTS_String_Connector_svnt.h + VTS_String_Connector_svnt_export.h + } + + Inline_Files { + VTS_String_ConnectorS.inl + } +} + + diff --git a/modules/CIAO/connectors/dds4ccm/tests/VariousTopicsState/Conn_Union/VTS_Union_Connector.idl b/modules/CIAO/connectors/dds4ccm/tests/VariousTopicsState/Conn_Union/VTS_Union_Connector.idl new file mode 100644 index 00000000000..435b3b84eb9 --- /dev/null +++ b/modules/CIAO/connectors/dds4ccm/tests/VariousTopicsState/Conn_Union/VTS_Union_Connector.idl @@ -0,0 +1,25 @@ +// $Id$ + +/** + * @file VTS_Union_Connector.idl + * @author Marcel Smit <msmit@remedy.nl> + */ + +#ifndef VT_UNION_CONNECTOR_IDL_ +#define VT_UNION_CONNECTOR_IDL_ + +#include <Components.idl> +#include "Base/VTopics_Base.idl" +#include "connectors/dds4ccm/idl/ccm_dds.idl" + +#pragma ciao lem "Conn_Union/VTS_Union_ConnectorE.idl" + +module VTopic +{ + module ::CCM_DDS::Typed < ::TopicUnion, ::TopicUnionSeq> TopicUnionConn; + connector VT_Union_Connector : TopicUnionConn::DDS_State + { + }; +}; + +#endif /* VT_UNION_CONNECTOR_IDL_ */ diff --git a/modules/CIAO/connectors/dds4ccm/tests/VariousTopicsState/Conn_Union/VTS_Union_Connector.mpc b/modules/CIAO/connectors/dds4ccm/tests/VariousTopicsState/Conn_Union/VTS_Union_Connector.mpc new file mode 100644 index 00000000000..90919833140 --- /dev/null +++ b/modules/CIAO/connectors/dds4ccm/tests/VariousTopicsState/Conn_Union/VTS_Union_Connector.mpc @@ -0,0 +1,144 @@ +// $Id$ + +project(DDS_VTS_Union_Connector_idl_gen) : connectoridldefaults, dds4ccm { + after += DDS4CCM_idl_gen + custom_only = 1 + idlflags += -Wb,stub_export_macro=VT_UNION_CONNECTOR_STUB_Export \ + -Wb,stub_export_include=VTS_Union_Connector_stub_export.h \ + -Wb,skel_export_macro=VT_UNION_CONNECTOR_SVNT_Export \ + -Wb,skel_export_include=VTS_Union_Connector_svnt_export.h \ + -Wb,svnt_export_macro=VT_UNION_CONNECTOR_SVNT_Export \ + -Wb,svnt_export_include=VTS_Union_Connector_svnt_export.h \ + -Wb,conn_export_macro=VT_UNION_CONNECTOR_CONN_Export \ + -Wb,conn_export_include=VTS_Union_Connector_conn_export.h \ + -I .. + + IDL_Files { + VTS_Union_Connector.idl + } +} + +project(DDS_VTS_Union_Connector_lem_gen) : ciaoidldefaults, dds4ccm { + custom_only = 1 + after += DDS_VTS_Union_Connector_idl_gen + idlflags += -Wb,stub_export_macro=VT_UNION_CONNECTOR_LEM_STUB_Export \ + -Wb,stub_export_include=VTS_Union_Connector_lem_stub_export.h \ + -SS -Gxhst \ + -I .. + + IDL_Files { + VTS_Union_ConnectorE.idl + } +} + +project(DDS_VTS_Union_Connector_lem_stub) : ccm_svnt, dds4ccm_base { + after += DDS_VTS_Union_Connector_lem_gen DDS_VTS_Union_Connector_stub DDS_VTopics_Base_stub DDS4CCM_lem_stub + libs += DDS_VTopics_Base_stub DDS_VTS_Union_Connector_stub DDS4CCM_lem_stub + libpaths += ../lib + libout = ../lib + includes += .. + sharedname = DDS_VTS_Union_Connector_lem_stub + dynamicflags = VT_UNION_CONNECTOR_LEM_STUB_BUILD_DLL + + IDL_Files { + } + + Source_Files { + VTS_Union_ConnectorEC.cpp + } + + Header_Files { + VTS_Union_ConnectorEC.h + VTS_Union_Connector_lem_stub_export.h + } + + Inline_Files { + VTS_Union_ConnectorEC.inl + } +} + +project(DDS_VTS_Union_Connector_stub) : ccm_stub, dds4ccm_base { + after += DDS_VTS_Union_Connector_idl_gen DDS_VTopics_Base_stub + libs += DDS_VTopics_Base_stub + libpaths += ../lib + libout = ../lib + includes += .. + sharedname = DDS_VTS_Union_Connector_stub + dynamicflags = VT_UNION_CONNECTOR_STUB_BUILD_DLL + + IDL_Files { + } + + Source_Files { + VTS_Union_ConnectorC.cpp + } + + Header_Files { + VTS_Union_ConnectorC.h + VTS_Union_Connector_stub_export.h + } + + Inline_Files { + VTS_Union_ConnectorC.inl + } +} + +project(DDS_VTS_Union_Connector_exec) : ciao_executor, dds4ccm_impl { + after += DDS_VTS_Union_Connector_lem_stub DDS_VTS_Union_Connector_stub DDS4CCM_lem_stub DDS_VTopics_Base_stub + sharedname = DDS_VTS_Union_Connector_exec + libs += DDS_VTS_Union_Connector_stub DDS_VTS_Union_Connector_lem_stub DDS_VTopics_Base_stub DDS4CCM_lem_stub DDS_VTopics_Base_stub + libpaths += ../lib + libout = ../lib + includes += .. + dynamicflags = VT_UNION_CONNECTOR_CONN_BUILD_DLL + + IDL_Files { + } + + Source_Files { + VTS_Union_Connector_conn.cpp + } + + Header_Files { + VTS_Union_Connector_conn.h + VTS_Union_Connector_conn_export.h + } + + Inline_Files { + } +} + + +project(DDS_VTS_Union_Connector_svnt) : ciao_servant, dds4ccm_impl { + after += DDS_VTS_Union_Connector_lem_stub DDS_VTS_Union_Connector_exec \ + DDS_VTS_Union_Connector_stub DDS4CCM_lem_stub + sharedname = DDS_VTS_Union_Connector_svnt + libs += DDS_VTS_Union_Connector_stub \ + DDS_VTS_Union_Connector_lem_stub \ + DDS_VTopics_Base_stub \ + DDS_VTS_Union_Connector_exec \ + DDS4CCM_lem_stub + libpaths += ../lib + libout = ../lib + includes += .. + dynamicflags = VT_UNION_CONNECTOR_SVNT_BUILD_DLL + + IDL_Files { + } + + Source_Files { + VTS_Union_ConnectorS.cpp + VTS_Union_Connector_svnt.cpp + } + + Header_Files { + VTS_Union_ConnectorS.h + VTS_Union_Connector_svnt.h + VTS_Union_Connector_svnt_export.h + } + + Inline_Files { + VTS_Union_ConnectorS.inl + } +} + diff --git a/modules/CIAO/connectors/dds4ccm/tests/VariousTopicsState/Conn_Valuetype/VTS_Valuetype_Connector.idl b/modules/CIAO/connectors/dds4ccm/tests/VariousTopicsState/Conn_Valuetype/VTS_Valuetype_Connector.idl new file mode 100644 index 00000000000..6d61eb185d0 --- /dev/null +++ b/modules/CIAO/connectors/dds4ccm/tests/VariousTopicsState/Conn_Valuetype/VTS_Valuetype_Connector.idl @@ -0,0 +1,25 @@ +// $Id$ + +/** + * @file VTS_Valuetype_Connector.idl + * @author Marcel Smit <msmit@remedy.nl> + */ + +#ifndef VTS_VALUE_TYPE_CONNECTOR_IDL_ +#define VTS_VALUE_TYPE_CONNECTOR_IDL_ + +#include <Components.idl> +#include "Base/VTopics_Base.idl" +#include "connectors/dds4ccm/idl/ccm_dds.idl" + +#pragma ciao lem "Conn_Valuetype/VTS_Valuetype_ConnectorE.idl" + +module VTopics +{ + module ::CCM_DDS::Typed < ::TopicValuetype, ::TopicValuetypeSeq> TopicValuetypeConn; + connector VTS_Valuetype_Connector : TopicValuetypeConn::DDS_State + { + }; +}; + +#endif /* VTS_VALUE_TYPE_CONNECTOR_IDL_ */ diff --git a/modules/CIAO/connectors/dds4ccm/tests/VariousTopicsState/Conn_Valuetype/VTS_Valuetype_Connector.mpc b/modules/CIAO/connectors/dds4ccm/tests/VariousTopicsState/Conn_Valuetype/VTS_Valuetype_Connector.mpc new file mode 100644 index 00000000000..63d11365dd6 --- /dev/null +++ b/modules/CIAO/connectors/dds4ccm/tests/VariousTopicsState/Conn_Valuetype/VTS_Valuetype_Connector.mpc @@ -0,0 +1,147 @@ +// $Id$ + +project(DDS_VTS_Valuetype_Connector_idl_gen) : connectoridldefaults, dds4ccm { + after += DDS4CCM_idl_gen + custom_only = 1 + idlflags += -Wb,stub_export_macro=VTS_VALUE_TYPE_CONNECTOR_STUB_Export \ + -Wb,stub_export_include=VTS_Valuetype_Connector_stub_export.h \ + -Wb,skel_export_macro=VTS_VALUE_TYPE_CONNECTOR_SVNT_Export \ + -Wb,skel_export_include=VTS_Valuetype_Connector_svnt_export.h \ + -Wb,svnt_export_macro=VTS_VALUE_TYPE_CONNECTOR_SVNT_Export \ + -Wb,svnt_export_include=VTS_Valuetype_Connector_svnt_export.h \ + -Wb,conn_export_macro=VTS_VALUE_TYPE_CONNECTOR_CONN_Export \ + -Wb,conn_export_include=VTS_Valuetype_Connector_conn_export.h \ + -I .. + + IDL_Files { + VTS_Valuetype_Connector.idl + } +} + +project(DDS_VTS_Valuetype_Connector_lem_gen) : ciaoidldefaults, dds4ccm { + custom_only = 1 + after += DDS_VTS_Valuetype_Connector_idl_gen + idlflags += -Wb,stub_export_macro=VTS_VALUE_TYPE_CONNECTOR_LEM_STUB_Export \ + -Wb,stub_export_include=VTS_Valuetype_Connector_lem_stub_export.h \ + -SS -Gxhst \ + -I .. + + IDL_Files { + VTS_Valuetype_ConnectorE.idl + } +} + +project(DDS_VTS_VALUE_TYPE_Connector_lem_stub) : ccm_svnt, dds4ccm_base { + after += DDS_VTS_Valuetype_Connector_lem_gen DDS_VTS_Valuetype_Connector_stub \ + DDS_VTopics_Base_stub DDS4CCM_lem_stub + libs += DDS_VTopics_Base_stub DDS_VTS_Valuetype_Connector_stub DDS4CCM_lem_stub + libpaths += ../lib + libout = ../lib + includes += .. + sharedname = DDS_VTS_VALUE_TYPE_Connector_lem_stub + dynamicflags = VTS_VALUE_TYPE_CONNECTOR_LEM_STUB_BUILD_DLL + + IDL_Files { + } + + Source_Files { + VTS_Valuetype_ConnectorEC.cpp + } + + Header_Files { + VTS_Valuetype_ConnectorEC.h + VTS_Valuetype_Connector_lem_stub_export.h + } + + Inline_Files { + VTS_Valuetype_ConnectorEC.inl + } +} + +project(DDS_VTS_Valuetype_Connector_stub) : ccm_stub, dds4ccm_base { + after += DDS_VTS_Valuetype_Connector_idl_gen DDS_VTopics_Base_stub + libs += DDS_VTopics_Base_stub + libpaths += ../lib + libout = ../lib + includes += .. + sharedname = DDS_VTS_Valuetype_Connector_stub + dynamicflags = VTS_VALUE_TYPE_CONNECTOR_STUB_BUILD_DLL + + IDL_Files { + } + + Source_Files { + VTS_Valuetype_ConnectorC.cpp + } + + Header_Files { + VTS_Valuetype_ConnectorC.h + VTS_Valuetype_Connector_stub_export.h + } + + Inline_Files { + VTS_Valuetype_ConnectorC.inl + } +} + +project(DDS_VTS_Valuetype_Connector_exec) : ciao_executor, dds4ccm_impl { + after += DDS_VTS_VALUE_TYPE_Connector_lem_stub DDS_VTS_Valuetype_Connector_stub \ + DDS4CCM_lem_stub DDS_VTopics_Base_stub + sharedname = DDS_VTS_Valuetype_Connector_exec + libs += DDS_VTS_Valuetype_Connector_stub DDS_VTS_VALUE_TYPE_Connector_lem_stub \ + DDS_VTopics_Base_stub DDS4CCM_lem_stub DDS_VTopics_Base_stub + libpaths += ../lib + libout = ../lib + includes += .. + dynamicflags = VTS_VALUE_TYPE_CONNECTOR_CONN_BUILD_DLL + + IDL_Files { + } + + Source_Files { + VTS_Valuetype_Connector_conn.cpp + } + + Header_Files { + VTS_Valuetype_Connector_conn.h + VTS_Valuetype_Connector_conn_export.h + } + + Inline_Files { + } +} + + +project(DDS_VTS_Valuetype_Connector_svnt) : ciao_servant, dds4ccm_impl { + after += DDS_VTS_VALUE_TYPE_Connector_lem_stub DDS_VTS_Valuetype_Connector_exec\ + DDS_VTS_Valuetype_Connector_stub DDS4CCM_lem_stub + sharedname = DDS_VTS_Valuetype_Connector_svnt + libs += DDS_VTS_Valuetype_Connector_stub \ + DDS_VTS_VALUE_TYPE_Connector_lem_stub \ + DDS_VTopics_Base_stub \ + DDS_VTS_Valuetype_Connector_exec \ + DDS4CCM_lem_stub + libpaths += ../lib + libout = ../lib + includes += .. + dynamicflags = VTS_VALUE_TYPE_CONNECTOR_SVNT_BUILD_DLL + + IDL_Files { + } + + Source_Files { + VTS_Valuetype_ConnectorS.cpp + VTS_Valuetype_Connector_svnt.cpp + } + + Header_Files { + VTS_Valuetype_ConnectorS.h + VTS_Valuetype_Connector_svnt.h + VTS_Valuetype_Connector_svnt_export.h + } + + Inline_Files { + VTS_Valuetype_ConnectorS.inl + } +} + diff --git a/modules/CIAO/connectors/dds4ccm/tests/VariousTopicsState/Connector/VTopics_Connector.idl b/modules/CIAO/connectors/dds4ccm/tests/VariousTopicsState/Connector/VTopics_Connector.idl new file mode 100644 index 00000000000..cd1748ae3b1 --- /dev/null +++ b/modules/CIAO/connectors/dds4ccm/tests/VariousTopicsState/Connector/VTopics_Connector.idl @@ -0,0 +1,25 @@ +// $Id$ + +/** + * @file VTopics_Connector.idl + * @author Marijke Hengstmengel <mhengstmengel@remedy.nl> + */ + +#ifndef VTOPICS_CONNECTOR_IDL_ +#define VTOPICS_CONNECTOR_IDL_ + +#include <Components.idl> +#include "Base/VTopics_Base.idl" +#include "connectors/dds4ccm/idl/ccm_dds.idl" + +#pragma ciao lem "Connector/VTopics_ConnectorE.idl" + +module VTopics +{ + module ::CCM_DDS::Typed < ::TestTopic, ::TestTopicSeq> TestTopicConn; + connector VTopics_Connector : TestTopicConn::DDS_State + { + }; +}; + +#endif /* VTopics_CONNECTOR_IDL_ */ diff --git a/modules/CIAO/connectors/dds4ccm/tests/VariousTopicsState/Connector/VTopics_Connector.mpc b/modules/CIAO/connectors/dds4ccm/tests/VariousTopicsState/Connector/VTopics_Connector.mpc new file mode 100644 index 00000000000..c311d36e795 --- /dev/null +++ b/modules/CIAO/connectors/dds4ccm/tests/VariousTopicsState/Connector/VTopics_Connector.mpc @@ -0,0 +1,145 @@ +// $Id$ +// This file is generated with "generate_component_mpc.pl -p DDS_VTopics_Base -l .. -o ../lib -u DDS VTopics_Connector" + +project(DDS_VTopics_Connector_idl_gen) : connectoridldefaults, dds4ccm { + after += DDS4CCM_idl_gen + custom_only = 1 + idlflags += -Wb,stub_export_macro=VTOPICS_CONNECTOR_STUB_Export \ + -Wb,stub_export_include=VTopics_Connector_stub_export.h \ + -Wb,skel_export_macro=VTOPICS_CONNECTOR_SVNT_Export \ + -Wb,skel_export_include=VTopics_Connector_svnt_export.h \ + -Wb,svnt_export_macro=VTOPICS_CONNECTOR_SVNT_Export \ + -Wb,svnt_export_include=VTopics_Connector_svnt_export.h \ + -Wb,conn_export_macro=VTOPICS_CONNECTOR_CONN_Export \ + -Wb,conn_export_include=VTopics_Connector_conn_export.h \ + -I .. + + IDL_Files { + VTopics_Connector.idl + } +} + +project(DDS_VTopics_Connector_lem_gen) : ciaoidldefaults, dds4ccm { + custom_only = 1 + after += DDS_VTopics_Connector_idl_gen + idlflags += -Wb,stub_export_macro=VTOPICS_CONNECTOR_LEM_STUB_Export \ + -Wb,stub_export_include=VTopics_Connector_lem_stub_export.h \ + -SS -Gxhst \ + -I .. + + IDL_Files { + VTopics_ConnectorE.idl + } +} + +project(DDS_VTopics_Connector_lem_stub) : ccm_svnt, dds4ccm_base { + after += DDS_VTopics_Connector_lem_gen DDS_VTopics_Connector_stub DDS_VTopics_Base_stub DDS4CCM_lem_stub + libs += DDS_VTopics_Base_stub DDS_VTopics_Connector_stub DDS4CCM_lem_stub + libpaths += ../lib + libout = ../lib + includes += .. + sharedname = DDS_VTopics_Connector_lem_stub + dynamicflags = VTOPICS_CONNECTOR_LEM_STUB_BUILD_DLL + + IDL_Files { + } + + Source_Files { + VTopics_ConnectorEC.cpp + } + + Header_Files { + VTopics_ConnectorEC.h + VTopics_Connector_lem_stub_export.h + } + + Inline_Files { + VTopics_ConnectorEC.inl + } +} + +project(DDS_VTopics_Connector_stub) : ccm_stub, dds4ccm_base { + after += DDS_VTopics_Connector_idl_gen DDS_VTopics_Base_stub + libs += DDS_VTopics_Base_stub + libpaths += ../lib + libout = ../lib + includes += .. + sharedname = DDS_VTopics_Connector_stub + dynamicflags = VTOPICS_CONNECTOR_STUB_BUILD_DLL + + IDL_Files { + } + + Source_Files { + VTopics_ConnectorC.cpp + } + + Header_Files { + VTopics_ConnectorC.h + VTopics_Connector_stub_export.h + } + + Inline_Files { + VTopics_ConnectorC.inl + } +} + +project(DDS_VTopics_Connector_exec) : ciao_executor, dds4ccm_impl { + after += DDS_VTopics_Connector_lem_stub DDS_VTopics_Connector_stub DDS4CCM_lem_stub DDS_VTopics_Base_stub + sharedname = DDS_VTopics_Connector_exec + libs += DDS_VTopics_Connector_stub DDS_VTopics_Connector_lem_stub DDS_VTopics_Base_stub DDS4CCM_lem_stub DDS_VTopics_Base_stub + libpaths += ../lib + libout = ../lib + includes += .. + dynamicflags = VTOPICS_CONNECTOR_CONN_BUILD_DLL + + IDL_Files { + } + + Source_Files { + VTopics_Connector_conn.cpp + } + + Header_Files { + VTopics_Connector_conn.h + VTopics_Connector_conn_export.h + } + + Inline_Files { + } +} + + +project(DDS_VTopics_Connector_svnt) : ciao_servant, dds4ccm_impl { + after += DDS_VTopics_Connector_lem_stub DDS_VTopics_Connector_exec DDS_VTopics_Connector_stub DDS4CCM_lem_stub + sharedname = DDS_VTopics_Connector_svnt + libs += DDS_VTopics_Connector_stub \ + DDS_VTopics_Connector_lem_stub \ + DDS_VTopics_Base_stub \ + DDS_VTopics_Connector_exec \ + DDS4CCM_lem_stub + libpaths += ../lib + libout = ../lib + includes += .. + dynamicflags = VTOPICS_CONNECTOR_SVNT_BUILD_DLL + + IDL_Files { + } + + Source_Files { + VTopics_ConnectorS.cpp + VTopics_Connector_svnt.cpp + } + + Header_Files { + VTopics_ConnectorS.h + VTopics_Connector_svnt.h + VTopics_Connector_svnt_export.h + } + + Inline_Files { + VTopics_ConnectorS.inl + } +} + + diff --git a/modules/CIAO/connectors/dds4ccm/tests/VariousTopicsState/Receiver/VTopics_Receiver.idl b/modules/CIAO/connectors/dds4ccm/tests/VariousTopicsState/Receiver/VTopics_Receiver.idl new file mode 100644 index 00000000000..de6eabc74dd --- /dev/null +++ b/modules/CIAO/connectors/dds4ccm/tests/VariousTopicsState/Receiver/VTopics_Receiver.idl @@ -0,0 +1,22 @@ +// $Id$ + +/** + * @file + * @author Marijke Hengstmengel <mhengstmengel@remedy.nl> + */ + +#ifndef RECEIVER_IDL +#define RECEIVER_IDL + +#include "Connector/VTopics_Connector.idl" + +module VTopics +{ + component Receiver + { + port TestTopicConn::DDS_Listen info_out; + provides CCM_DDS::ConnectorStatusListener connector_status; + }; +}; + +#endif diff --git a/modules/CIAO/connectors/dds4ccm/tests/VariousTopicsState/Receiver/VTopics_Receiver.mpc b/modules/CIAO/connectors/dds4ccm/tests/VariousTopicsState/Receiver/VTopics_Receiver.mpc new file mode 100644 index 00000000000..e4e4bdf788f --- /dev/null +++ b/modules/CIAO/connectors/dds4ccm/tests/VariousTopicsState/Receiver/VTopics_Receiver.mpc @@ -0,0 +1,176 @@ +// $Id$ + +project(DDS_VTopics_Receiver_idl_gen) : componentidldefaults, dds4ccm { + custom_only = 1 + after += DDS_VTopics_Connector_idl_gen + idlflags += -Wb,stub_export_macro=RECEIVER_STUB_Export \ + -Wb,stub_export_include=Receiver_stub_export.h \ + -Wb,skel_export_macro=RECEIVER_SVNT_Export \ + -Wb,skel_export_include=Receiver_svnt_export.h \ + -Wb,svnt_export_macro=RECEIVER_SVNT_Export \ + -Wb,svnt_export_include=Receiver_svnt_export.h \ + -Wb,exec_export_macro=RECEIVER_EXEC_Export \ + -Wb,exec_export_include=Receiver_exec_export.h -I.. + + IDL_Files { + VTopics_Receiver.idl + } +} + +project(DDS_VTopics_Receiver_lem_gen) : ciaoidldefaults, dds4ccm { + after += DDS_VTopics_Receiver_idl_gen + custom_only = 1 + idlflags += -Wb,stub_export_macro=RECEIVER_LEM_STUB_Export \ + -Wb,stub_export_include=Receiver_lem_stub_export.h \ + -SS -Gxhst -I.. + + IDL_Files { + VTopics_ReceiverE.idl + } +} + +project(DDS_VTopics_Receiver_lem_stub) : ccm_svnt, dds4ccm_base { + after += DDS_VTopics_Receiver_lem_gen DDS_VTopics_Receiver_stub DDS_VTopics_Base_stub \ + DDS_VTopics_Connector_stub DDS_VTS_String_Connector_stub \ + DDS_VTS_Array_Connector_stub DDS_VTS_Seq_Connector_stub \ + DDS_VTS_Valuetype_Connector_stub DDS_VTS_Union_Connector_stub + libs += Receiver_stub DDS_VTopics_Connector_stub DDS_VTS_String_Connector_stub \ + DDS_VTS_Array_Connector_stub DDS_VTS_Seq_Connector_stub DDS_VTopics_Base_stub \ + DDS_VTS_Valuetype_Connector_stub DDS_VTS_Union_Connector_stub + libpaths += ../lib + libout = ../lib + includes += .. + sharedname = Receiver_lem_stub + dynamicflags = RECEIVER_LEM_STUB_BUILD_DLL + + IDL_Files { + } + + Source_Files { + VTopics_ReceiverEC.cpp + } + + Header_Files { + VTopics_ReceiverEC.h + Receiver_lem_stub_export.h + } + + Inline_Files { + VTopics_ReceiverEC.inl + } +} + +project(DDS_VTopics_Receiver_stub) : ccm_stub, dds4ccm_base { + after += DDS_VTopics_Receiver_idl_gen DDS_VTopics_Base_stub \ + DDS_VTopics_Connector_stub DDS_VTopics_Connector_lem_gen \ + DDS_VTS_String_Connector_stub DDS_VTS_String_Connector_lem_gen \ + DDS_VTS_Array_Connector_stub DDS_VTS_Array_Connector_lem_gen \ + DDS_VTS_Valuetype_Connector_stub DDS_VTS_Valuetype_Connector_lem_gen \ + DDS_VTS_Union_Connector_stub DDS_VTS_Union_Connector_lem_gen \ + DDS_VTS_Seq_Connector_stub DDS_VTS_Seq_Connector_lem_gen + libs += DDS_VTopics_Connector_stub DDS_VTS_Valuetype_Connector_stub \ + DDS_VTS_String_Connector_stub DDS_VTS_Array_Connector_stub \ + DDS_VTS_Union_Connector_stub DDS_VTS_Seq_Connector_stub \ + DDS_VTopics_Base_stub + libpaths += ../lib + libout = ../lib + includes += .. + sharedname = Receiver_stub + dynamicflags = RECEIVER_STUB_BUILD_DLL + + IDL_Files { + } + + Source_Files { + VTopics_ReceiverC.cpp + } + + Header_Files { + VTopics_ReceiverC.h + Receiver_stub_export.h + } + + Inline_Files { + VTopics_ReceiverC.inl + } +} + +project(DDS_VTopics_Receiver_exec) : ciao_executor, dds4ccm_base { + after += DDS_VTopics_Receiver_lem_stub DDS_VTopics_Receiver_stub DDS_VTopics_Base_stub \ + DDS_VTopics_Connector_stub DDS_VTopics_Connector_lem_stub \ + DDS_VTS_String_Connector_stub DDS_VTS_String_Connector_lem_stub \ + DDS_VTS_Array_Connector_stub DDS_VTS_Array_Connector_lem_stub \ + DDS_VTS_Valuetype_Connector_stub DDS_VTS_Valuetype_Connector_lem_stub \ + DDS_VTS_Union_Connector_stub DDS_VTS_Union_Connector_lem_stub \ + DDS_VTS_Seq_Connector_stub DDS_VTS_Seq_Connector_lem_stub \ + DDS4CCM_lem_stub + sharedname = Receiver_exec + libs += Receiver_stub Receiver_lem_stub DDS_VTopics_Base_stub \ + DDS_VTopics_Connector_stub DDS_VTS_String_Connector_stub \ + DDS_VTS_Array_Connector_stub DDS_VTS_Seq_Connector_stub \ + DDS_VTopics_Connector_lem_stub DDS4CCM_lem_stub \ + DDS_VTS_Valuetype_Connector_stub DDS_VTS_Union_Connector_stub + libpaths += ../lib + libout = ../lib + includes += .. + dynamicflags = RECEIVER_EXEC_BUILD_DLL + + IDL_Files { + } + + Source_Files { + VTopics_Receiver_exec.cpp + } + + Header_Files { + VTopics_Receiver_exec.h + Receiver_exec_export.h + } + + Inline_Files { + } +} + + +project(DDS_VTopics_Receiver_svnt) : ciao_servant, dds4ccm_base { + after += DDS_VTopics_Receiver_lem_stub DDS_VTopics_Base_stub DDS_VTopics_Receiver_exec \ + DDS_VTopics_Connector_stub DDS_VTopics_Connector_svnt DDS_VTopics_Connector_lem_stub \ + DDS_VTS_String_Connector_stub DDS_VTS_String_Connector_svnt DDS_VTS_String_Connector_lem_stub \ + DDS_VTS_Array_Connector_stub DDS_VTS_Array_Connector_svnt DDS_VTS_Array_Connector_lem_stub \ + DDS_VTS_Valuetype_Connector_stub DDS_VTS_Valuetype_Connector_svnt DDS_VTS_Valuetype_Connector_lem_stub \ + DDS_VTS_Union_Connector_stub DDS_VTS_Union_Connector_svnt DDS_VTS_Union_Connector_lem_stub \ + DDS_VTS_Seq_Connector_stub DDS_VTS_Seq_Connector_svnt DDS_VTS_Seq_Connector_lem_stub \ + DDS4CCM_lem_stub DDS4CCM_skel + sharedname = Receiver_svnt + libs += Receiver_stub Receiver_lem_stub DDS_VTopics_Base_stub \ + DDS_VTopics_Connector_stub DDS_VTS_String_Connector_stub DDS_VTS_Array_Connector_stub DDS_VTS_Seq_Connector_stub \ + DDS_VTopics_Connector_svnt DDS_VTS_String_Connector_svnt DDS_VTS_Array_Connector_svnt DDS_VTS_Seq_Connector_svnt \ + DDS_VTS_Valuetype_Connector_svnt DDS_VTS_Valuetype_Connector_stub \ + DDS_VTS_Union_Connector_svnt DDS_VTS_Union_Connector_stub \ + Receiver_exec DDS_VTopics_Connector_lem_stub \ + DDS4CCM_lem_stub DDS4CCM_skel + libpaths += ../lib + libout = ../lib + includes += .. + dynamicflags = RECEIVER_SVNT_BUILD_DLL + + IDL_Files { + } + + Source_Files { + VTopics_ReceiverS.cpp + VTopics_Receiver_svnt.cpp + } + + Header_Files { + VTopics_ReceiverS.h + VTopics_Receiver_svnt.h + Receiver_svnt_export.h + } + + Inline_Files { + VTopics_ReceiverS.inl + } +} + + diff --git a/modules/CIAO/connectors/dds4ccm/tests/VariousTopicsState/Receiver/VTopics_Receiver_exec.cpp b/modules/CIAO/connectors/dds4ccm/tests/VariousTopicsState/Receiver/VTopics_Receiver_exec.cpp new file mode 100644 index 00000000000..b822e6548ab --- /dev/null +++ b/modules/CIAO/connectors/dds4ccm/tests/VariousTopicsState/Receiver/VTopics_Receiver_exec.cpp @@ -0,0 +1,158 @@ +// -*- C++ -*- +// +// $Id$ + +//Test for different topic types , with DDS_STATE connector, look for 'SUBSCRIPTION_MATCHED_STATUS + +#include "VTopics_Receiver_exec.h" +#include "dds4ccm/impl/dds/Utils.h" + + +namespace CIAO_VTopics_Receiver_Impl +{ +//============================================================ + // Facet Executor Implementation Class: ConnectorStatusListener_exec_i + //============================================================ + ConnectorStatusListener_exec_i::ConnectorStatusListener_exec_i ( + Atomic_Boolean &subscription_matched) + : subscription_matched_ (subscription_matched) + { + } + + ConnectorStatusListener_exec_i::~ConnectorStatusListener_exec_i (void) + { + } + + // Operations from ::CCM_DDS::ConnectorStatusListener + void ConnectorStatusListener_exec_i::on_inconsistent_topic ( + ::DDS::Topic_ptr /*the_topic*/, + const DDS::InconsistentTopicStatus & /*status*/) + { + } + + void ConnectorStatusListener_exec_i::on_requested_incompatible_qos ( + ::DDS::DataReader_ptr /*the_reader*/, + const DDS::RequestedIncompatibleQosStatus & /*status*/) + { + } + + void ConnectorStatusListener_exec_i::on_sample_rejected ( + ::DDS::DataReader_ptr /*the_reader*/, + const DDS::SampleRejectedStatus & /*status*/) + { + } + + void ConnectorStatusListener_exec_i::on_offered_deadline_missed ( + ::DDS::DataWriter_ptr /*the_writer*/, + const DDS::OfferedDeadlineMissedStatus & /*status*/) + { + } + + void ConnectorStatusListener_exec_i::on_offered_incompatible_qos ( + ::DDS::DataWriter_ptr /*the_writer*/, + const DDS::OfferedIncompatibleQosStatus & /*status*/) + { + } + + void ConnectorStatusListener_exec_i::on_unexpected_status ( + ::DDS::Entity_ptr the_entity, + ::DDS::StatusKind status_kind) + { + if (! ::CORBA::is_nil(the_entity) && + status_kind == DDS::SUBSCRIPTION_MATCHED_STATUS) + { + this->subscription_matched_ = true; + } + } + + //============================================================ + // Receiver_exec_i + //============================================================ + Receiver_exec_i::Receiver_exec_i (void) + : subscription_matched_ (false) + { + } + + Receiver_exec_i::~Receiver_exec_i (void) + { + } + + // Port operations. + ::CCM_DDS::CCM_ConnectorStatusListener_ptr + Receiver_exec_i::get_connector_status (void) + { + return new ConnectorStatusListener_exec_i (this->subscription_matched_); + } + + VTopics::TestTopicConn::CCM_Listener_ptr + Receiver_exec_i::get_info_out_data_listener (void) + { + return VTopics::TestTopicConn::CCM_Listener::_nil (); + } + + CCM_DDS::CCM_PortStatusListener_ptr + Receiver_exec_i::get_info_out_status (void) + { + return CCM_DDS::CCM_PortStatusListener::_nil (); + } + + // Operations from Components::SessionComponent. + void + Receiver_exec_i::set_session_context ( + ::Components::SessionContext_ptr ctx) + { + this->context_ = + ::VTopics::CCM_Receiver_Context::_narrow (ctx); + if ( ::CORBA::is_nil (this->context_.in ())) + { + throw ::CORBA::INTERNAL (); + } + } + + void + Receiver_exec_i::configuration_complete (void) + { + } + + void + Receiver_exec_i::ccm_activate (void) + { + } + + void + Receiver_exec_i::ccm_passivate (void) + { + } + + void + Receiver_exec_i::ccm_remove (void) + { + if(!this->subscription_matched_.value ()) + { + ACE_ERROR ((LM_ERROR, ACE_TEXT ("ERROR: did not receive the expected ") + ACE_TEXT ("status 'SUBSCRIPTION_MATCHED_STATUS' ") + ACE_TEXT ("in Receiver\n") + )); + } + else + { + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("Received the expected ") + ACE_TEXT ("'SUBSCRIPTION_MATCHED_STATUS' ") + ACE_TEXT ("in Receiver\n") + )); + } + } + + extern "C" RECEIVER_EXEC_Export ::Components::EnterpriseComponent_ptr + create_VTopics_Receiver_Impl (void) + { + ::Components::EnterpriseComponent_ptr retval = + ::Components::EnterpriseComponent::_nil (); + + ACE_NEW_NORETURN ( + retval, + Receiver_exec_i); + + return retval; + } +} diff --git a/modules/CIAO/connectors/dds4ccm/tests/VariousTopicsState/Receiver/VTopics_Receiver_exec.h b/modules/CIAO/connectors/dds4ccm/tests/VariousTopicsState/Receiver/VTopics_Receiver_exec.h new file mode 100644 index 00000000000..5a611357d68 --- /dev/null +++ b/modules/CIAO/connectors/dds4ccm/tests/VariousTopicsState/Receiver/VTopics_Receiver_exec.h @@ -0,0 +1,92 @@ +// -*- C++ -*- +// $Id$ + +#ifndef CIAO_RECEIVER_EXEC_H_ +#define CIAO_RECEIVER_EXEC_H_ + +#include "VTopics_ReceiverEC.h" + +#include /**/ "Receiver_exec_export.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + +#include "tao/LocalObject.h" + +namespace CIAO_VTopics_Receiver_Impl +{ + typedef ACE_Atomic_Op <TAO_SYNCH_MUTEX, CORBA::Boolean > Atomic_Boolean; + + class Receiver_exec_i; + + class RECEIVER_EXEC_Export ConnectorStatusListener_exec_i + : public virtual ::CCM_DDS::CCM_ConnectorStatusListener, + public virtual ::CORBA::LocalObject + { + public: + ConnectorStatusListener_exec_i (Atomic_Boolean &); + virtual ~ConnectorStatusListener_exec_i (void); + + virtual + void on_inconsistent_topic (::DDS::Topic_ptr the_topic, + const DDS::InconsistentTopicStatus & status); + virtual + void on_requested_incompatible_qos (::DDS::DataReader_ptr the_reader, + const DDS::RequestedIncompatibleQosStatus & status); + virtual + void on_sample_rejected (::DDS::DataReader_ptr the_reader, + const DDS::SampleRejectedStatus & status); + virtual + void on_offered_deadline_missed (::DDS::DataWriter_ptr the_writer, + const DDS::OfferedDeadlineMissedStatus & status); + virtual + void on_offered_incompatible_qos (::DDS::DataWriter_ptr the_writer, + const DDS::OfferedIncompatibleQosStatus & status); + virtual + void on_unexpected_status (::DDS::Entity_ptr the_entity, + ::DDS::StatusKind status_kind); + + private: + Atomic_Boolean &subscription_matched_; + }; + + class RECEIVER_EXEC_Export Receiver_exec_i + : public virtual Receiver_Exec, + public virtual ::CORBA::LocalObject + { + public: + Receiver_exec_i (void); + virtual ~Receiver_exec_i (void); + + // Supported operations and attributes. + // Port operations. + virtual ::CCM_DDS::CCM_ConnectorStatusListener_ptr + get_connector_status (void); + + virtual VTopics::TestTopicConn::CCM_Listener_ptr + get_info_out_data_listener (void); + + virtual CCM_DDS::CCM_PortStatusListener_ptr + get_info_out_status (void); + + // Operations from Components::SessionComponent. + virtual void + set_session_context ( + ::Components::SessionContext_ptr ctx); + + virtual void configuration_complete (void); + virtual void ccm_activate (void); + virtual void ccm_passivate (void); + virtual void ccm_remove (void); + + private: + ::VTopics::CCM_Receiver_Context_var context_; + Atomic_Boolean subscription_matched_; +}; + + extern "C" RECEIVER_EXEC_Export ::Components::EnterpriseComponent_ptr + create_VTopics_Receiver_Impl (void); +} + +#endif /* ifndef */ diff --git a/modules/CIAO/connectors/dds4ccm/tests/VariousTopicsState/Sender/VTopics_Sender.idl b/modules/CIAO/connectors/dds4ccm/tests/VariousTopicsState/Sender/VTopics_Sender.idl new file mode 100644 index 00000000000..aa69235d695 --- /dev/null +++ b/modules/CIAO/connectors/dds4ccm/tests/VariousTopicsState/Sender/VTopics_Sender.idl @@ -0,0 +1,24 @@ +// $Id$ + +/** + * @file + * @author Marijke Hengstmengel <mhengstmengel@remedy.nl> + * + * by-hand idl3 translation of sender components. + */ + +#ifndef DDS_VTOPICS_SENDER_IDL +#define DDS_VTOPICS_SENDER_IDL + +#include "Connector/VTopics_Connector.idl" + +module VTopics +{ + component Sender + { + port TestTopicConn::DDS_Update info_write; + provides CCM_DDS::ConnectorStatusListener connector_status; + }; +}; + +#endif diff --git a/modules/CIAO/connectors/dds4ccm/tests/VariousTopicsState/Sender/VTopics_Sender.mpc b/modules/CIAO/connectors/dds4ccm/tests/VariousTopicsState/Sender/VTopics_Sender.mpc new file mode 100644 index 00000000000..b4011de4d40 --- /dev/null +++ b/modules/CIAO/connectors/dds4ccm/tests/VariousTopicsState/Sender/VTopics_Sender.mpc @@ -0,0 +1,171 @@ +// $Id$ +// This file is generated with "generate_component_mpc.pl -p DDS_VTopics_Base -l ../lib -o ../lib -c controller -u DDS Sender" + +project(DDS_VTopics_Sender_idl_gen) : componentidldefaults, dds4ccm { + after += DDS_VTopics_Connector_idl_gen + custom_only = 1 + idlflags += -Wb,stub_export_macro=SENDER_STUB_Export \ + -Wb,stub_export_include=Sender_stub_export.h \ + -Wb,skel_export_macro=SENDER_SVNT_Export \ + -Wb,skel_export_include=Sender_svnt_export.h \ + -Wb,svnt_export_macro=SENDER_SVNT_Export \ + -Wb,svnt_export_include=Sender_svnt_export.h \ + -Wb,exec_export_macro=SENDER_EXEC_Export \ + -Wb,exec_export_include=Sender_exec_export.h \ + -I .. + + IDL_Files { + VTopics_Sender.idl + } +} + +project(DDS_VTopics_Sender_lem_gen) : ciaoidldefaults, dds4ccm { + after += DDS_VTopics_Sender_idl_gen + custom_only = 1 + idlflags += -Wb,stub_export_macro=SENDER_LEM_STUB_Export \ + -Wb,stub_export_include=Sender_lem_stub_export.h \ + -SS -Gxhst -I $CIAO_ROOT/connectors -I .. + + IDL_Files { + VTopics_SenderE.idl + } +} + +project(DDS_VTopics_Sender_lem_stub) : ccm_svnt, dds4ccm_base { + after += DDS_VTopics_Sender_lem_gen DDS_VTopics_Sender_stub DDS_VTopics_Base_stub + libs += DDS_VTopics_Base_stub Sender_stub + libpaths += ../lib + libout = ../lib + includes += .. + sharedname = Sender_lem_stub + dynamicflags = SENDER_LEM_STUB_BUILD_DLL + + IDL_Files { + } + + Source_Files { + VTopics_SenderEC.cpp + } + + Header_Files { + VTopics_SenderEC.h + Sender_lem_stub_export.h + } + + Inline_Files { + VTopics_SenderEC.inl + } +} + +project(DDS_VTopics_Sender_stub) : ccm_stub, dds4ccm_base { + after += DDS_VTopics_Sender_idl_gen DDS_VTopics_Base_stub \ + DDS_VTopics_Connector_stub DDS_VTS_String_Connector_stub \ + DDS_VTS_Array_Connector_stub DDS_VTS_Valuetype_Connector_stub \ + DDS_VTS_Union_Connector_stub DDS_VTS_Seq_Connector_stub + libs += DDS_VTopics_Base_stub DDS_VTopics_Connector_stub \ + DDS_VTS_String_Connector_stub DDS_VTS_Array_Connector_stub \ + DDS_VTS_Seq_Connector_stub DDS_VTS_Valuetype_Connector_stub \ + DDS_VTS_Union_Connector_stub + includes += .. + libpaths += ../lib + libout = ../lib + sharedname = Sender_stub + dynamicflags = SENDER_STUB_BUILD_DLL + + IDL_Files { + } + + Source_Files { + VTopics_SenderC.cpp + } + + Header_Files { + VTopics_SenderC.h + Sender_stub_export.h + } + + Inline_Files { + VTopics_SenderC.inl + } +} + +project(DDS_VTopics_Sender_exec) : ciao_executor, dds4ccm_base { + after += DDS_VTopics_Sender_lem_stub DDS_VTopics_Sender_stub \ + DDS_VTopics_Connector_lem_stub DDS_VTopics_Connector_stub \ + DDS_VTS_String_Connector_lem_stub DDS_VTS_String_Connector_stub \ + DDS_VTS_Array_Connector_lem_stub DDS_VTS_Array_Connector_stub \ + DDS_VTS_Valuetype_Connector_lem_stub DDS_VTS_Valuetype_Connector_stub \ + DDS_VTS_Union_Connector_lem_stub DDS_VTS_Union_Connector_stub \ + DDS_VTS_Seq_Connector_lem_stub DDS_VTS_Seq_Connector_stub \ + DDS4CCM_lem_stub + sharedname = Sender_exec + libs += Sender_stub Sender_lem_stub DDS_VTopics_Base_stub \ + DDS_VTopics_Connector_lem_stub DDS_VTopics_Connector_stub \ + DDS_VTS_String_Connector_stub DDS_VTS_Array_Connector_stub \ + DDS_VTS_Valuetype_Connector_stub DDS_VTS_Seq_Connector_stub \ + DDS_VTS_Union_Connector_stub DDS4CCM_lem_stub + libpaths += ../lib + includes += .. + libout = ../lib + dynamicflags = SENDER_EXEC_BUILD_DLL + + IDL_Files { + } + + Source_Files { + VTopics_Sender_exec.cpp + } + + Header_Files { + VTopics_Sender_exec.h + Sender_exec_export.h + } + + Inline_Files { + } +} + + +project(DDS_VTopics_Sender_svnt) : ciao_servant, dds4ccm_base { + after += DDS_VTopics_Base_stub DDS_VTopics_Sender_lem_stub DDS4CCM_lem_stub \ + DDS4CCM_skel \ + DDS_VTopics_Connector_stub DDS_VTopics_Connector_svnt DDS_VTopics_Connector_lem_stub \ + DDS_VTS_String_Connector_stub DDS_VTS_String_Connector_svnt DDS_VTS_String_Connector_lem_stub \ + DDS_VTS_Array_Connector_stub DDS_VTS_Array_Connector_svnt DDS_VTS_Array_Connector_lem_stub \ + DDS_VTS_Valuetype_Connector_stub DDS_VTS_Valuetype_Connector_svnt DDS_VTS_Valuetype_Connector_lem_stub \ + DDS_VTS_Union_Connector_stub DDS_VTS_Union_Connector_svnt DDS_VTS_Union_Connector_lem_stub \ + DDS_VTS_Seq_Connector_stub DDS_VTS_Seq_Connector_svnt DDS_VTS_Seq_Connector_lem_stub + sharedname = Sender_svnt + libs += Sender_stub Sender_lem_stub \ + DDS_VTopics_Base_stub \ + DDS4CCM_lem_stub DDS4CCM_skel \ + DDS_VTopics_Connector_stub DDS_VTopics_Connector_svnt \ + DDS_VTS_String_Connector_stub DDS_VTS_String_Connector_svnt \ + DDS_VTS_Array_Connector_stub DDS_VTS_Array_Connector_svnt \ + DDS_VTS_Valuetype_Connector_stub DDS_VTS_Valuetype_Connector_svnt \ + DDS_VTS_Union_Connector_stub DDS_VTS_Union_Connector_svnt \ + DDS_VTS_Seq_Connector_stub DDS_VTS_Seq_Connector_svnt + libpaths += ../lib + libout = ../lib + includes += .. + dynamicflags = SENDER_SVNT_BUILD_DLL + + IDL_Files { + } + + Source_Files { + VTopics_SenderS.cpp + VTopics_Sender_svnt.cpp + } + + Header_Files { + VTopics_SenderS.h + VTopics_Sender_svnt.h + Sender_svnt_export.h + } + + Inline_Files { + VTopics_SenderS.inl + } +} + diff --git a/modules/CIAO/connectors/dds4ccm/tests/VariousTopicsState/Sender/VTopics_Sender_exec.cpp b/modules/CIAO/connectors/dds4ccm/tests/VariousTopicsState/Sender/VTopics_Sender_exec.cpp new file mode 100644 index 00000000000..059372ba636 --- /dev/null +++ b/modules/CIAO/connectors/dds4ccm/tests/VariousTopicsState/Sender/VTopics_Sender_exec.cpp @@ -0,0 +1,140 @@ +// -*- C++ -*- +// $Id$ + + +//Test different topic types, with DDS_STATE connector, look for 'PUBLICATION_MATCHED_STATUS +#include "VTopics_Sender_exec.h" +#include "dds4ccm/impl/dds/Utils.h" + +namespace CIAO_VTopics_Sender_Impl +{ + //============================================================ + // ConnectorStatusListener_exec_i + //============================================================ + ConnectorStatusListener_exec_i::ConnectorStatusListener_exec_i ( + Atomic_Boolean &publication_matched) + : publication_matched_ (publication_matched) + { + } + + ConnectorStatusListener_exec_i::~ConnectorStatusListener_exec_i (void) + { + } + + void ConnectorStatusListener_exec_i::on_inconsistent_topic( + ::DDS::Topic_ptr /*the_topic*/, + const DDS::InconsistentTopicStatus & /*status*/) + { + } + + void ConnectorStatusListener_exec_i::on_requested_incompatible_qos ( + ::DDS::DataReader_ptr /*the_reader*/, + const DDS::RequestedIncompatibleQosStatus & /*status*/) + { + } + + void ConnectorStatusListener_exec_i::on_sample_rejected ( + ::DDS::DataReader_ptr /*the_reader*/, + const DDS::SampleRejectedStatus & /*status*/) + { + } + + void ConnectorStatusListener_exec_i::on_offered_deadline_missed ( + ::DDS::DataWriter_ptr /*the_writer*/, + const DDS::OfferedDeadlineMissedStatus & /*status*/) + { + } + + void ConnectorStatusListener_exec_i::on_offered_incompatible_qos ( + ::DDS::DataWriter_ptr /*the_writer*/, + const DDS::OfferedIncompatibleQosStatus & /*status*/) + { + } + + void ConnectorStatusListener_exec_i::on_unexpected_status ( + ::DDS::Entity_ptr the_entity, + ::DDS::StatusKind status_kind) + { + if (! ::CORBA::is_nil (the_entity) && + status_kind == DDS::PUBLICATION_MATCHED_STATUS) + { + this->publication_matched_ = true; + } + } + //============================================================ + // Component Executor Implementation Class: Sender_exec_i + //============================================================ + + Sender_exec_i::Sender_exec_i (void) + : publication_matched_ (false) + { + } + + Sender_exec_i::~Sender_exec_i (void) + { + } + + ::CCM_DDS::CCM_ConnectorStatusListener_ptr + Sender_exec_i::get_connector_status (void) + { + return new ConnectorStatusListener_exec_i (this->publication_matched_); + } + + // Supported operations and attributes. + void + Sender_exec_i::set_session_context (::Components::SessionContext_ptr ctx) + { + this->context_ = ::VTopics::CCM_Sender_Context::_narrow (ctx); + + if ( ::CORBA::is_nil (this->context_.in ())) + { + throw ::CORBA::INTERNAL (); + } + } + + void + Sender_exec_i::configuration_complete (void) + { + } + + void + Sender_exec_i::ccm_activate (void) + { + } + + void + Sender_exec_i::ccm_passivate (void) + { + } + + void + Sender_exec_i::ccm_remove (void) + { + if(!this->publication_matched_.value ()) + { + ACE_ERROR ((LM_ERROR, ACE_TEXT ("ERROR: did not receive the expected ") + ACE_TEXT ("states 'PUBLICATION_MATCHED_STATUS' ") + ACE_TEXT ("in Sender\n") + )); + } + else + { + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("Received the expected ") + ACE_TEXT ("'PUBLICATION_MATCHED_STATUS' ") + ACE_TEXT ("in Sender\n") + )); + } + } + + extern "C" SENDER_EXEC_Export ::Components::EnterpriseComponent_ptr + create_VTopics_Sender_Impl (void) + { + ::Components::EnterpriseComponent_ptr retval = + ::Components::EnterpriseComponent::_nil (); + ACE_NEW_NORETURN ( + retval, + Sender_exec_i); + + return retval; + } +} diff --git a/modules/CIAO/connectors/dds4ccm/tests/VariousTopicsState/Sender/VTopics_Sender_exec.h b/modules/CIAO/connectors/dds4ccm/tests/VariousTopicsState/Sender/VTopics_Sender_exec.h new file mode 100644 index 00000000000..f2086ba3883 --- /dev/null +++ b/modules/CIAO/connectors/dds4ccm/tests/VariousTopicsState/Sender/VTopics_Sender_exec.h @@ -0,0 +1,84 @@ +// -*- C++ -*- +// $Id$ + +#ifndef CIAO_SENDER_EXEC_H_ +#define CIAO_SENDER_EXEC_H_ + + +#include "VTopics_SenderEC.h" + +#include /**/ "Sender_exec_export.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + +#include "tao/LocalObject.h" + +namespace CIAO_VTopics_Sender_Impl +{ + typedef ACE_Atomic_Op <TAO_SYNCH_MUTEX, CORBA::Boolean > Atomic_Boolean; + + class Sender_exec_i; + + class SENDER_EXEC_Export ConnectorStatusListener_exec_i + : public virtual ::CCM_DDS::CCM_ConnectorStatusListener, + public virtual ::CORBA::LocalObject + { + public: + ConnectorStatusListener_exec_i (Atomic_Boolean &); + virtual ~ConnectorStatusListener_exec_i (void); + + virtual + void on_inconsistent_topic (::DDS::Topic_ptr the_topic, + const DDS::InconsistentTopicStatus & status); + virtual + void on_requested_incompatible_qos (::DDS::DataReader_ptr the_reader, + const DDS::RequestedIncompatibleQosStatus & status); + virtual + void on_sample_rejected (::DDS::DataReader_ptr the_reader, + const DDS::SampleRejectedStatus & status); + virtual + void on_offered_deadline_missed (::DDS::DataWriter_ptr the_writer, + const DDS::OfferedDeadlineMissedStatus & status); + virtual + void on_offered_incompatible_qos (::DDS::DataWriter_ptr the_writer, + const DDS::OfferedIncompatibleQosStatus & status); + virtual + void on_unexpected_status (::DDS::Entity_ptr the_entity, + ::DDS::StatusKind status_kind); + private: + Atomic_Boolean &publication_matched_; + }; + + class Sender_exec_i + : public virtual Sender_Exec, + public virtual ::CORBA::LocalObject + { + public: + Sender_exec_i (void); + virtual ~Sender_exec_i (void); + + virtual void set_session_context (::Components::SessionContext_ptr ctx); + + virtual void configuration_complete (void); + virtual void ccm_activate (void); + virtual void ccm_passivate (void); + virtual void ccm_remove (void); + + // Port operations. + virtual ::CCM_DDS::CCM_ConnectorStatusListener_ptr + get_connector_status (void); + + private: + ::VTopics::CCM_Sender_Context_var context_; + + Atomic_Boolean publication_matched_; +}; + + extern "C" SENDER_EXEC_Export ::Components::EnterpriseComponent_ptr + create_VTopics_Sender_Impl (void); + +} + +#endif /* ifndef */ diff --git a/modules/CIAO/connectors/dds4ccm/tests/VariousTopicsState/descriptors/Plan.cdp b/modules/CIAO/connectors/dds4ccm/tests/VariousTopicsState/descriptors/Plan.cdp new file mode 100644 index 00000000000..d2a09c3cb23 --- /dev/null +++ b/modules/CIAO/connectors/dds4ccm/tests/VariousTopicsState/descriptors/Plan.cdp @@ -0,0 +1,815 @@ +<Deployment:DeploymentPlan + xmlns:Deployment="http://www.omg.org/Deployment" + xmlns:xmi="http://www.omg.org/XMI" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://www.omg.org/Deployment Deployment.xsd"> + <label>VTopics_Depl_1</label> + <UUID>VTopics_Depl_1</UUID> + + <implementation xmi:id="ReceiverComponentImplementation"> + <name>ReceiverComponentImplementation</name> + <source/> + <artifact xmi:idref="Receiver_ExecArtifact" /> + <artifact xmi:idref="Receiver_SvntArtifact" /> + <execParameter> + <!-- entrypoint as exec parameter (see 10.6.1) --> + <name>component factory</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>create_VTopics_Receiver_Impl</string> + </value> + </value> + </execParameter> + <execParameter> + <name>edu.vanderbilt.dre.CIAO.ServantEntrypoint</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>create_VTopics_Receiver_Servant</string> + </value> + </value> + </execParameter> + <execParameter> + <name>edu.vanderbilt.dre.CIAO.ServantArtifact</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>Receiver_svnt</string> + </value> + </value> + </execParameter> + <execParameter> + <name>edu.vanderbilt.dre.CIAO.ExecutorArtifact</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>Receiver_exec</string> + </value> + </value> + </execParameter> + </implementation> + + <implementation xmi:id="VTopics_ConnectorComponentImplementation"> + <name>VTopics_ConnectorComponentImplementation</name> + <source/> + <artifact xmi:idref="VTopics_Connector_ExecArtifact" /> + <artifact xmi:idref="VTopics_Connector_SvntArtifact" /> + <execParameter> + <!-- entrypoint as exec parameter (see 10.6.1) --> + <name>component factory</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>create_VTopics_VTopics_Connector_Impl</string> + </value> + </value> + </execParameter> + <execParameter> + <name>edu.vanderbilt.dre.CIAO.ServantEntrypoint</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>create_VTopics_VTopics_Connector_Servant</string> + </value> + </value> + </execParameter> + <execParameter> + <name>edu.vanderbilt.dre.CIAO.ServantArtifact</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>VTopics_Connector_svnt</string> + </value> + </value> + </execParameter> + <execParameter> + <name>edu.vanderbilt.dre.CIAO.ExecutorArtifact</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>VTopics_Connector_exec</string> + </value> + </value> + </execParameter> + </implementation> + + <implementation xmi:id="VTS_String_ConnectorComponentImplementation"> + <name>VTS_String_ConnectorComponentImplementation</name> + <source/> + <artifact xmi:idref="VTS_String_Connector_ExecArtifact" /> + <artifact xmi:idref="VTS_String_Connector_SvntArtifact" /> + <execParameter> + <!-- entrypoint as exec parameter (see 10.6.1) --> + <name>component factory</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>create_VTopics_VTS_String_Connector_Impl</string> + </value> + </value> + </execParameter> + <execParameter> + <name>edu.vanderbilt.dre.CIAO.ServantEntrypoint</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>create_VTopics_VTS_String_Connector_Servant</string> + </value> + </value> + </execParameter> + <execParameter> + <name>edu.vanderbilt.dre.CIAO.ServantArtifact</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>VTS_String_Connector_svnt</string> + </value> + </value> + </execParameter> + <execParameter> + <name>edu.vanderbilt.dre.CIAO.ExecutorArtifact</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>VTS_String_Connector_exec</string> + </value> + </value> + </execParameter> + </implementation> + + <implementation xmi:id="VTS_Array_ConnectorComponentImplementation"> + <name>VTS_Array_ConnectorComponentImplementation</name> + <source/> + <artifact xmi:idref="VTS_Array_Connector_ExecArtifact" /> + <artifact xmi:idref="VTS_Array_Connector_SvntArtifact" /> + <execParameter> + <!-- entrypoint as exec parameter (see 10.6.1) --> + <name>component factory</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>create_VTopics_VTS_Array_Connector_Impl</string> + </value> + </value> + </execParameter> + <execParameter> + <name>edu.vanderbilt.dre.CIAO.ServantEntrypoint</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>create_VTopics_VTS_Array_Connector_Servant</string> + </value> + </value> + </execParameter> + <execParameter> + <name>edu.vanderbilt.dre.CIAO.ServantArtifact</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>VTS_Array_Connector_svnt</string> + </value> + </value> + </execParameter> + <execParameter> + <name>edu.vanderbilt.dre.CIAO.ExecutorArtifact</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>VTS_Array_Connector_exec</string> + </value> + </value> + </execParameter> + </implementation> + + <implementation xmi:id="VTS_Seq_ConnectorComponentImplementation"> + <name>VTS_Seq_ConnectorComponentImplementation</name> + <source/> + <artifact xmi:idref="VTS_Seq_Connector_ExecArtifact" /> + <artifact xmi:idref="VTS_Seq_Connector_SvntArtifact" /> + <execParameter> + <!-- entrypoint as exec parameter (see 10.6.1) --> + <name>component factory</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>create_VTopics_VTS_Seq_Connector_Impl</string> + </value> + </value> + </execParameter> + <execParameter> + <name>edu.vanderbilt.dre.CIAO.ServantEntrypoint</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>create_VTopics_VTS_Seq_Connector_Servant</string> + </value> + </value> + </execParameter> + <execParameter> + <name>edu.vanderbilt.dre.CIAO.ServantArtifact</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>VTS_Seq_Connector_svnt</string> + </value> + </value> + </execParameter> + <execParameter> + <name>edu.vanderbilt.dre.CIAO.ExecutorArtifact</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>VTS_Seq_Connector_exec</string> + </value> + </value> + </execParameter> + </implementation> + + <implementation xmi:id="SenderComponentImplementation"> + <name>SenderComponentImplementation</name> + <source/> + <artifact xmi:idref="Sender_ExecArtifact" /> + <artifact xmi:idref="Sender_SvntArtifact" /> + <execParameter> + <!-- entrypoint as exec parameter (see 10.6.1) --> + <name>component factory</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>create_VTopics_Sender_Impl</string> + </value> + </value> + </execParameter> + <execParameter> + <name>edu.vanderbilt.dre.CIAO.ServantEntrypoint</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>create_VTopics_Sender_Servant</string> + </value> + </value> + </execParameter> + <execParameter> + <name>edu.vanderbilt.dre.CIAO.ServantArtifact</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>Sender_svnt</string> + </value> + </value> + </execParameter> + <execParameter> + <name>edu.vanderbilt.dre.CIAO.ExecutorArtifact</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>Sender_exec</string> + </value> + </value> + </execParameter> + </implementation> + <instance xmi:id="ReceiverComponentInstance"> + <name>ReceiverComponent</name> + <node>ReceiverNode</node> + <!-- hostname --> + <source/> + <implementation xmi:idref="ReceiverComponentImplementation" /> + </instance> + + <instance xmi:id="VTopics_ConnectorComponentInstance"> + <name>VTopics_ConnectorComponent</name> + <node>SenderNode</node> + <!-- hostname --> + <source/> + <implementation xmi:idref="VTopics_ConnectorComponentImplementation" /> + <configProperty> + <name>topic_name</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>TestUS</string> + </value> + </value> + </configProperty> + </instance> + <instance xmi:id="VTopics_ConnectorComponentInstance2"> + <name>VTopics_ConnectorComponent2</name> + <node>ReceiverNode</node> + <!-- hostname --> + <source/> + <implementation xmi:idref="VTopics_ConnectorComponentImplementation" /> + <configProperty> + <name>topic_name</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>TestUS</string> + </value> + </value> + </configProperty> + </instance> + + <instance xmi:id="VTS_String_ConnectorComponentInstance"> + <name>VTS_String_ConnectorComponent</name> + <node>SenderNode</node> + <!-- hostname --> + <source/> + <implementation xmi:idref="VTS_String_ConnectorComponentImplementation" /> + <configProperty> + <name>topic_name</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>TestString</string> + </value> + </value> + </configProperty> + </instance> + <instance xmi:id="VTS_String_ConnectorComponentInstance2"> + <name>VTS_String_ConnectorComponent2</name> + <node>ReceiverNode</node> + <!-- hostname --> + <source/> + <implementation xmi:idref="VTS_String_ConnectorComponentImplementation" /> + <configProperty> + <name>topic_name</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>TestString</string> + </value> + </value> + </configProperty> + </instance> + + <instance xmi:id="VTS_Array_ConnectorComponentInstance"> + <name>VTS_Array_ConnectorComponent</name> + <node>SenderNode</node> + <!-- hostname --> + <source/> + <implementation xmi:idref="VTS_Array_ConnectorComponentImplementation" /> + <configProperty> + <name>topic_name</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>TestArray</string> + </value> + </value> + </configProperty> + </instance> + <instance xmi:id="VTS_Array_ConnectorComponentInstance2"> + <name>VTS_Array_ConnectorComponent2</name> + <node>ReceiverNode</node> + <!-- hostname --> + <source/> + <implementation xmi:idref="VTS_Array_ConnectorComponentImplementation" /> + <configProperty> + <name>topic_name</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>TestArray</string> + </value> + </value> + </configProperty> + </instance> + + <instance xmi:id="VTS_Seq_ConnectorComponentInstance"> + <name>VTS_Seq_ConnectorComponent</name> + <node>SenderNode</node> + <!-- hostname --> + <source/> + <implementation xmi:idref="VTS_Seq_ConnectorComponentImplementation" /> + <configProperty> + <name>topic_name</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>TestSeq</string> + </value> + </value> + </configProperty> + </instance> + <instance xmi:id="VTS_Seq_ConnectorComponentInstance2"> + <name>VTS_Seq_ConnectorComponent2</name> + <node>ReceiverNode</node> + <!-- hostname --> + <source/> + <implementation xmi:idref="VTS_Seq_ConnectorComponentImplementation" /> + <configProperty> + <name>topic_name</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>TestSeq</string> + </value> + </value> + </configProperty> + </instance> + + + <instance xmi:id="SenderComponentInstance"> + <name>SenderComponent</name> + <node>SenderNode</node> + <!-- hostname --> + <source/> + <implementation xmi:idref="SenderComponentImplementation" /> + </instance> + + <!-- + ***************************** + Regular connector connections + ***************************** + --> + <connection> + <name>connector_status_receiver</name> + <deployRequirement> + <name>edu.dre.vanderbilt.DAnCE.ConnectionType</name> + <resourceType>Local_Interface</resourceType> + </deployRequirement> + <internalEndpoint> + <portName>connector_status</portName> + <provider>true</provider> + <kind>Facet</kind> + <instance xmi:idref="ReceiverComponentInstance" /> + </internalEndpoint> + <internalEndpoint> + <portName>error_listener</portName> + <provider>false</provider> + <kind>SimplexReceptacle</kind> + <instance xmi:idref="VTopics_ConnectorComponentInstance2" /> + </internalEndpoint> + </connection> + <connection> + <name>connector_status_sender</name> + <deployRequirement> + <name>edu.dre.vanderbilt.DAnCE.ConnectionType</name> + <resourceType>Local_Interface</resourceType> + </deployRequirement> + <internalEndpoint> + <portName>connector_status</portName> + <provider>true</provider> + <kind>Facet</kind> + <instance xmi:idref="SenderComponentInstance" /> + </internalEndpoint> + <internalEndpoint> + <portName>error_listener</portName> + <provider>false</provider> + <kind>SimplexReceptacle</kind> + <instance xmi:idref="VTopics_ConnectorComponentInstance" /> + </internalEndpoint> + </connection> + <!-- connection in order to establish a publication_matched + --> + <connection> + <name>info_write_data</name> + <deployRequirement> + <name>edu.dre.vanderbilt.DAnCE.ConnectionType</name> + <resourceType>Local_Interface</resourceType> + </deployRequirement> + <internalEndpoint> + <portName>info_write_data</portName> + <provider>false</provider> + <kind>SimplexReceptacle</kind> + <instance xmi:idref="SenderComponentInstance" /> + </internalEndpoint> + <internalEndpoint> + <portName>observable_data</portName> + <provider>true</provider> + <kind>Facet</kind> + <instance xmi:idref="VTopics_ConnectorComponentInstance" /> + </internalEndpoint> + </connection> + <!-- connection in order to establish a subscription_matched + --> + <connection> + <name>info_out_data</name> + <deployRequirement> + <name>edu.dre.vanderbilt.DAnCE.ConnectionType</name> + <resourceType>Local_Interface</resourceType> + </deployRequirement> + <internalEndpoint> + <portName>info_out_data</portName> + <provider>false</provider> + <kind>SimplexReceptacle</kind> + <instance xmi:idref="ReceiverComponentInstance" /> + </internalEndpoint> + <internalEndpoint> + <portName>push_observer_data</portName> + <provider>true</provider> + <kind>Facet</kind> + <instance xmi:idref="VTopics_ConnectorComponentInstance2" /> + </internalEndpoint> + </connection> + + <!-- + ***************************** + String connector connections + ***************************** + --> + <connection> + <name>connector_status_receiver_string</name> + <deployRequirement> + <name>edu.dre.vanderbilt.DAnCE.ConnectionType</name> + <resourceType>Local_Interface</resourceType> + </deployRequirement> + <internalEndpoint> + <portName>connector_status</portName> + <provider>true</provider> + <kind>Facet</kind> + <instance xmi:idref="ReceiverComponentInstance" /> + </internalEndpoint> + <internalEndpoint> + <portName>error_listener</portName> + <provider>false</provider> + <kind>SimplexReceptacle</kind> + <instance xmi:idref="VTS_String_ConnectorComponentInstance2" /> + </internalEndpoint> + </connection> + <connection> + <name>connector_status_sender_string</name> + <deployRequirement> + <name>edu.dre.vanderbilt.DAnCE.ConnectionType</name> + <resourceType>Local_Interface</resourceType> + </deployRequirement> + <internalEndpoint> + <portName>connector_status</portName> + <provider>true</provider> + <kind>Facet</kind> + <instance xmi:idref="SenderComponentInstance" /> + </internalEndpoint> + <internalEndpoint> + <portName>error_listener</portName> + <provider>false</provider> + <kind>SimplexReceptacle</kind> + <instance xmi:idref="VTS_String_ConnectorComponentInstance" /> + </internalEndpoint> + </connection> + + <!-- + ***************************** + Array connector connections + ***************************** + --> + <connection> + <name>connector_status_receiver_array</name> + <deployRequirement> + <name>edu.dre.vanderbilt.DAnCE.ConnectionType</name> + <resourceType>Local_Interface</resourceType> + </deployRequirement> + <internalEndpoint> + <portName>connector_status</portName> + <provider>true</provider> + <kind>Facet</kind> + <instance xmi:idref="ReceiverComponentInstance" /> + </internalEndpoint> + <internalEndpoint> + <portName>error_listener</portName> + <provider>false</provider> + <kind>SimplexReceptacle</kind> + <instance xmi:idref="VTS_Array_ConnectorComponentInstance2" /> + </internalEndpoint> + </connection> + <connection> + <name>connector_status_sender_array</name> + <deployRequirement> + <name>edu.dre.vanderbilt.DAnCE.ConnectionType</name> + <resourceType>Local_Interface</resourceType> + </deployRequirement> + <internalEndpoint> + <portName>connector_status</portName> + <provider>true</provider> + <kind>Facet</kind> + <instance xmi:idref="SenderComponentInstance" /> + </internalEndpoint> + <internalEndpoint> + <portName>error_listener</portName> + <provider>false</provider> + <kind>SimplexReceptacle</kind> + <instance xmi:idref="VTS_Array_ConnectorComponentInstance" /> + </internalEndpoint> + </connection> + + <!-- + ***************************** + Sequence connector connections + ***************************** + --> + <connection> + <name>connector_status_receiver_seq</name> + <deployRequirement> + <name>edu.dre.vanderbilt.DAnCE.ConnectionType</name> + <resourceType>Local_Interface</resourceType> + </deployRequirement> + <internalEndpoint> + <portName>connector_status</portName> + <provider>true</provider> + <kind>Facet</kind> + <instance xmi:idref="ReceiverComponentInstance" /> + </internalEndpoint> + <internalEndpoint> + <portName>error_listener</portName> + <provider>false</provider> + <kind>SimplexReceptacle</kind> + <instance xmi:idref="VTS_Seq_ConnectorComponentInstance2" /> + </internalEndpoint> + </connection> + <connection> + <name>connector_status_sender_seq</name> + <deployRequirement> + <name>edu.dre.vanderbilt.DAnCE.ConnectionType</name> + <resourceType>Local_Interface</resourceType> + </deployRequirement> + <internalEndpoint> + <portName>connector_status</portName> + <provider>true</provider> + <kind>Facet</kind> + <instance xmi:idref="SenderComponentInstance" /> + </internalEndpoint> + <internalEndpoint> + <portName>error_listener</portName> + <provider>false</provider> + <kind>SimplexReceptacle</kind> + <instance xmi:idref="VTS_Seq_ConnectorComponentInstance" /> + </internalEndpoint> + </connection> + + <artifact xmi:id="Sender_ExecArtifact"> + <name>Sender_exec</name> + <source/> + <node/> + <location>Sender_exec</location> + </artifact> + <artifact xmi:id="Sender_SvntArtifact"> + <name>Sender_svnt</name> + <source/> + <node/> + <location>Sender_svnt</location> + </artifact> + <artifact xmi:id="Sender_StubArtifact"> + <name>Sender_stub</name> + <source/> + <node/> + <location>Sender_stub</location> + </artifact> + <artifact xmi:id="VTopics_Connector_ExecArtifact"> + <name>VTopics_Connector_exec</name> + <source/> + <node/> + <location>DDS_VTopics_Connector_exec</location> + </artifact> + <artifact xmi:id="VTopics_Connector_SvntArtifact"> + <name>VTopics_Connector_svnt</name> + <source/> + <node/> + <location>DDS_VTopics_Connector_svnt</location> + </artifact> + <artifact xmi:id="VTopics_Connector_StubArtifact"> + <name>VTopics_Connector_stub</name> + <source/> + <node/> + <location>DDS_VTopics_Connector_stub</location> + </artifact> + + <artifact xmi:id="VTS_String_Connector_ExecArtifact"> + <name>VTS_String_Connector_exec</name> + <source/> + <node/> + <location>DDS_VTS_String_Connector_exec</location> + </artifact> + <artifact xmi:id="VTS_String_Connector_SvntArtifact"> + <name>VTS_String_Connector_svnt</name> + <source/> + <node/> + <location>DDS_VTS_String_Connector_svnt</location> + </artifact> + <artifact xmi:id="VTS_String_Connector_StubArtifact"> + <name>VTS_String_Connector_stub</name> + <source/> + <node/> + <location>DDSVTS_String_Connector_stub</location> + </artifact> + + <artifact xmi:id="VTS_Array_Connector_ExecArtifact"> + <name>VTS_Array_Connector_exec</name> + <source/> + <node/> + <location>DDS_VTS_Array_Connector_exec</location> + </artifact> + <artifact xmi:id="VTS_Array_Connector_SvntArtifact"> + <name>VTS_Array_Connector_svnt</name> + <source/> + <node/> + <location>DDS_VTS_Array_Connector_svnt</location> + </artifact> + <artifact xmi:id="VTS_Array_Connector_StubArtifact"> + <name>VTS_Array_Connector_stub</name> + <source/> + <node/> + <location>DDS_VTS_Array_Connector_stub</location> + </artifact> + + <artifact xmi:id="VTS_Seq_Connector_ExecArtifact"> + <name>VTS_Seq_Connector_exec</name> + <source/> + <node/> + <location>DDS_VTS_Seq_Connector_exec</location> + </artifact> + <artifact xmi:id="VTS_Seq_Connector_SvntArtifact"> + <name>VTS_Seq_Connector_svnt</name> + <source/> + <node/> + <location>DDS_VTS_Seq_Connector_svnt</location> + </artifact> + <artifact xmi:id="VTS_Seq_Connector_StubArtifact"> + <name>VTS_Seq_Connector_stub</name> + <source/> + <node/> + <location>DDS_VTS_Seq_Connector_stub</location> + </artifact> + + <artifact xmi:id="Receiver_ExecArtifact"> + <name>Receiver_exec</name> + <source/> + <node/> + <location>Receiver_exec</location> + </artifact> + <artifact xmi:id="Receiver_SvntArtifact"> + <name>Receiver_svnt</name> + <source/> + <node/> + <location>Receiver_svnt</location> + </artifact> + <artifact xmi:id="Receiver_StubArtifact"> + <name>Receiver_stub</name> + <source/> + <node/> + <location>Receiver_stub</location> + </artifact> +</Deployment:DeploymentPlan> diff --git a/modules/CIAO/connectors/dds4ccm/tests/VariousTopicsState/descriptors/run_test.pl b/modules/CIAO/connectors/dds4ccm/tests/VariousTopicsState/descriptors/run_test.pl new file mode 100755 index 00000000000..d7266527ff7 --- /dev/null +++ b/modules/CIAO/connectors/dds4ccm/tests/VariousTopicsState/descriptors/run_test.pl @@ -0,0 +1,244 @@ +eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' + & eval 'exec perl -S $0 $argv:q' + if 0; + +# $Id$ +# -*- perl -*- + +use lib "$ENV{'ACE_ROOT'}/bin"; +use PerlACE::TestTarget; + +$CIAO_ROOT = "$ENV{'CIAO_ROOT'}"; +$TAO_ROOT = "$ENV{'TAO_ROOT'}"; +$DANCE_ROOT = "$ENV{'DANCE_ROOT'}"; + +$daemons_running = 0; +$em_running = 0; +$ns_running = 0; + +$nr_daemon = 2; +@ports = ( 60001, 60002 ); +@iorbases = ( "NodeApp1.ior", "NodeApp2.ior" ); +@iorfiles = 0; +@nodenames = ( "SenderNode", "ReceiverNode" ); + +# ior files other than daemon +# ior files other than daemon +$ior_nsbase = "ns.ior"; +$ior_nsfile = 0; +$ior_embase = "EM.ior"; +$ior_emfile = 0; + +# Processes +$E = 0; +$EM = 0; +$NS = 0; +@DEAMONS = 0; + +# targets +@tg_daemons = 0; +$tg_naming = 0; +$tg_exe_man = 0; +$tg_executor = 0; + +$status = 0; +$cdp_file = "Plan.cdp"; + +sub create_targets { + # naming service + $tg_naming = PerlACE::TestTarget::create_target (1) || die "Create target for ns failed\n"; + $tg_naming->AddLibPath ('../lib'); + # daemon + for ($i = 0; $i < $nr_daemon; ++$i) { + $tg_daemons[$i] = PerlACE::TestTarget::create_target ($i+1) || die "Create target for deamon $i failed\n"; + $tg_daemons[$i]->AddLibPath ('../lib'); + } + # execution manager + $tg_exe_man = PerlACE::TestTarget::create_target (1) || die "Create target for EM failed\n"; + $tg_exe_man->AddLibPath ('../lib'); + # executor (plan_launcher) + $tg_executor = PerlACE::TestTarget::create_target (1) || die "Create target for executor failed\n"; + $tg_executor->AddLibPath ('../lib'); +} + +sub init_ior_files { + $ior_nsfile = $tg_naming->LocalFile ($ior_nsbase); + $ior_emfile = $tg_exe_man->LocalFile ($ior_embase); + for ($i = 0; $i < $nr_daemon; ++$i) { + $iorfiles[$i] = $tg_daemons[$i]->LocalFile ($iorbases[$i]); + } + delete_ior_files (); +} + +# Delete if there are any .ior files. +sub delete_ior_files { + for ($i = 0; $i < $nr_daemon; ++$i) { + $tg_daemons[$i]->DeleteFile ($iorbases[$i]); + } + $tg_naming->DeleteFile ($ior_nsbase); + $tg_exe_man->DeleteFile ($ior_embase); + for ($i = 0; $i < $nr_daemon; ++$i) { + $iorfiles[$i] = $tg_daemons[$i]->LocalFile ($iorbases[$i]); + } +} + +sub kill_node_daemon { + for ($i = 0; $i < $nr_daemon; ++$i) { + $DEAMONS[$i]->Kill (); $DEAMONS[$i]->TimedWait (1); + } +} + +sub kill_open_processes { + if ($daemons_running == 1) { + kill_node_daemon (); + } + + if ($em_running == 1) { + $EM->Kill (); $EM->TimedWait (1); + } + + if ($ns_running == 1) { + $NS->Kill (); $NS->TimedWait (1); + } + # in case shutdown did not perform as expected + $tg_executor->KillAll ('ciao_componentserver'); +} + +sub run_node_daemons { + for ($i = 0; $i < $nr_daemon; ++$i) { + $iorbase = $iorbases[$i]; + $iorfile = $iorfiles[$i]; + $port = $ports[$i]; + $nodename = $nodenames[$i]; + $iiop = "iiop://localhost:$port"; + $node_app = "$CIAO_ROOT/bin/ciao_componentserver"; + + $d_cmd = "$DANCE_ROOT/bin/dance_node_manager"; + $d_param = "-ORBEndpoint $iiop -s $node_app -n $nodename=$iorfile -t 30 --domain-nc corbaloc:rir:/NameService"; + + print "Run dance_node_manager with $d_param\n"; + + $DEAMONS[$i] = $tg_daemons[$i]->CreateProcess ($d_cmd, $d_param); + $DEAMONS[$i]->Spawn (); + + if ($tg_daemons[$i]->WaitForFileTimed($iorbase, + $tg_daemons[$i]->ProcessStartWaitInterval ()) == -1) { + print STDERR + "ERROR: The ior $iorfile file of node daemon $i could not be found\n"; + for (; $i >= 0; --$i) { + $DEAMONS[$i]->Kill (); $DEAMONS[$i]->TimedWait (1); + } + return -1; + } + } + return 0; +} + +create_targets (); +init_ior_files (); + +# Invoke naming service + +$NS = $tg_naming->CreateProcess ("$TAO_ROOT/orbsvcs/Naming_Service/Naming_Service", "-m 1 -ORBEndpoint iiop://localhost:60003 -o $ior_nsfile"); + +$ns_status = $NS->Spawn (); + +if ($ns_status != 0) { + print STDERR "ERROR: Unable to execute the naming service\n"; + kill_open_processes (); + exit 1; +} + +print STDERR "Starting Naming Service with -m 1 -ORBEndpoint iiop://localhost:60003 -o ns.ior\n"; + +if ($tg_naming->WaitForFileTimed ($ior_nsbase, + $tg_naming->ProcessStartWaitInterval ()) == -1) { + print STDERR "ERROR: cannot find naming service IOR file\n"; + $NS->Kill (); $NS->TimedWait (1); + exit 1; +} + +$ns_running = 1; +# Set up NamingService environment +$ENV{"NameServiceIOR"} = "corbaloc:iiop:localhost:60003/NameService"; + +# Invoke node daemon. +print "Invoking node daemon\n"; +$status = run_node_daemons (); + +if ($status != 0) { + print STDERR "ERROR: Unable to execute the node daemon\n"; + kill_open_processes (); + exit 1; +} + +$daemons_running = 1; + +# Invoke execution manager. +print "Invoking execution manager (dance_execution_manager.exe) with -e$ior_emfile\n"; +$EM = $tg_exe_man->CreateProcess ("$DANCE_ROOT/bin/dance_execution_manager", + "-e$ior_emfile --domain-nc corbaloc:rir:/NameService"); +$em_status = $EM->Spawn (); + +if ($em_status != 0) { + print STDERR "ERROR: dance_execution_manager returned $em_status"; + exit 1; +} + +if ($tg_exe_man->WaitForFileTimed ($ior_embase, + $tg_exe_man->ProcessStartWaitInterval ()) == -1) { + print STDERR + "ERROR: The ior file of execution manager could not be found\n"; + kill_open_processes (); + exit 1; +} + +$em_running = 1; + +# Invoke executor - start the application -. +print "Invoking executor - launch the application -\n"; + +print "Start dance_plan_launcher.exe with -x $cdp_file -k file://$ior_emfile\n"; +$E = $tg_executor->CreateProcess ("$DANCE_ROOT/bin/dance_plan_launcher", + "-x $cdp_file -k file://$ior_emfile"); +$pl_status = $E->SpawnWaitKill (2 * $tg_executor->ProcessStartWaitInterval ()); + +if ($pl_status != 0) { + print STDERR "ERROR: dance_plan_launcher returned $pl_status\n"; + kill_open_processes (); + exit 1; +} + +for ($i = 0; $i < $nr_daemon; ++$i) { + if ($tg_daemons[$i]->WaitForFileTimed ($iorbases[$i], + $tg_daemons[$i]->ProcessStopWaitInterval ()) == -1) { + print STDERR "ERROR: The ior file of daemon $i could not be found\n"; + kill_open_processes (); + exit 1; + } +} + +print "Sleeping 10 seconds to allow task to complete\n"; +sleep (10); + +# Invoke executor - stop the application -. +print "Invoking executor - stop the application -\n"; +print "by running dance_plan_launcher.exe with -k file://$ior_emfile -x $cdp_file -q\n"; + +$E = $tg_executor->CreateProcess ("$DANCE_ROOT/bin/dance_plan_launcher", + "-k file://$ior_emfile -x $cdp_file -s"); +$pl_status = $E->SpawnWaitKill (2 * $tg_executor->ProcessStartWaitInterval ()); + +if ($pl_status != 0) { + print STDERR "ERROR: dance_plan_launcher returned $pl_status\n"; + kill_open_processes (); + exit 1; +} + +print "Executor returned.\n"; +print "Shutting down rest of the processes.\n"; + +delete_ior_files (); +kill_open_processes (); + +exit $status; |