diff --git a/srcCxx/ShapeType.idl b/srcCxx/ShapeType.idl index 4693028..0e0443a 100644 --- a/srcCxx/ShapeType.idl +++ b/srcCxx/ShapeType.idl @@ -1,8 +1,8 @@ -const long COLOR_MAX_LENGTH=64; - +@appendable struct ShapeType { - string color; //@key - long x; - long y; - long shapesize; + @key + string<128> color; + int32 x; + int32 y; + int32 shapesize; }; diff --git a/srcCxx/ShapeType_main.cxx b/srcCxx/ShapeType_main.cxx index e4f81a3..89f5e56 100644 --- a/srcCxx/ShapeType_main.cxx +++ b/srcCxx/ShapeType_main.cxx @@ -115,8 +115,7 @@ Topic *create_topic(DomainParticipant *participant, const char *topic_name) const char *type_name = typeSupport->get_type_name(); ReturnCode_t retcode = typeSupport->register_type(participant, type_name); #elif defined OPENDDS - org::omg::dds::demo::ShapeTypeTypeSupport_var ts = - new org::omg::dds::demo::ShapeTypeTypeSupportImpl; + ShapeTypeTypeSupport_var ts = new ShapeTypeTypeSupportImpl; const char type_name[] = "ShapeType"; const ReturnCode_t retcode = ts->register_type(participant, type_name); #else diff --git a/srcCxx/opendds/.gitignore b/srcCxx/opendds/.gitignore index 0595177..796b96d 100644 --- a/srcCxx/opendds/.gitignore +++ b/srcCxx/opendds/.gitignore @@ -1,18 +1 @@ -/.depend.dds_security -/.depend.dds_security_Idl1 -/.depend.dds_security_Idl2 -/GNUmakefile -/GNUmakefile.dds_security -/opendds_shape_main -/ShapeTypeC.cpp -/ShapeTypeC.h -/ShapeTypeC.inl -/ShapeTypeS.h -/ShapeTypeTypeSupport.idl -/ShapeTypeTypeSupportC.cpp -/ShapeTypeTypeSupportC.h -/ShapeTypeTypeSupportC.inl -/ShapeTypeTypeSupportImpl.cpp -/ShapeTypeTypeSupportImpl.h -/ShapeTypeTypeSupportS.h -/.obj +/build diff --git a/srcCxx/opendds/CMakeLists.txt b/srcCxx/opendds/CMakeLists.txt new file mode 100644 index 0000000..2072ed9 --- /dev/null +++ b/srcCxx/opendds/CMakeLists.txt @@ -0,0 +1,19 @@ +cmake_minimum_required(VERSION 3.12) +project(opendds_security_interop CXX) + +find_package(OpenDDS REQUIRED) + +add_executable(opendds_security_interop + ../ShapeType_main.cxx +) + +target_compile_definitions(opendds_security_interop + PRIVATE OPENDDS +) + +opendds_target_sources(opendds_security_interop + ../ShapeType.idl + OPENDDS_IDL_OPTIONS --no-default-nested +) + +target_link_libraries(opendds_security_interop OpenDDS::Security OpenDDS::Rtps_Udp) diff --git a/srcCxx/opendds/ShapeType_configurator_opendds.h b/srcCxx/opendds/ShapeType_configurator_opendds.h index 517c882..dc2335e 100644 --- a/srcCxx/opendds/ShapeType_configurator_opendds.h +++ b/srcCxx/opendds/ShapeType_configurator_opendds.h @@ -15,11 +15,8 @@ #define BOOLEAN_TRUE true #define STATUS_MASK_NONE OpenDDS::DCPS::NO_STATUS_MASK -using org::omg::dds::demo::ShapeType; -using org::omg::dds::demo::ShapeTypeSeq; -using org::omg::dds::demo::ShapeTypeDataReader; -using org::omg::dds::demo::ShapeTypeDataWriter; -using org::omg::dds::demo::ShapeTypeTypeSupport; +#define STRING_IN .in() +#define STRING_INOUT .inout() using OpenDDS::DCPS::operator>=; // for Time_t @@ -87,12 +84,11 @@ std::string use_env(const char* key, const char* default_val) return env ? env : default_val; } -DDS::DomainParticipant* create_participant( - int domain, bool use_security, - const char* governance, - const char* permissions, - const char *key_establishment_algorithm, - bool /*enable_logging*/) +DDS::DomainParticipant* create_participant(int domain, bool use_security, + const char* governance, + const char* permissions, + const char* /*key_establishment_algorithm*/, + bool /*enable_logging*/) { using namespace OpenDDS::DCPS; using namespace OpenDDS::RTPS; diff --git a/srcCxx/opendds/dds-security.mpc b/srcCxx/opendds/dds-security.mpc deleted file mode 100644 index acf3416..0000000 --- a/srcCxx/opendds/dds-security.mpc +++ /dev/null @@ -1,33 +0,0 @@ -project: dcps, dcps_rtps_udp, opendds_security { - exename = opendds_security_beta - exeout = .. - macros += OPENDDS - includes += .. - idlflags += -I$(DDS_ROOT)/examples/DCPS/ishapes -SS - - Modify_Custom(IDL) { - output_follows_input = 0 - } - - TypeSupport_Files { - $(DDS_ROOT)/examples/DCPS/ishapes/ShapeType.idl - } - - IDL_Files { - gendir = . - $(DDS_ROOT)/examples/DCPS/ishapes/ShapeType.idl - } - - Source_Files { - ../ShapeType_main.cxx - } - - verbatim(gnuace, extension, 1) { - ifeq ($(static_libs),1) - LDLIBS := $(filter-out -lcrypto,$(LDLIBS)) - LDLIBS += $(SSL_ROOT)/lib/libcrypto.a -ldl - else - LDFLAGS += '-Wl,-rpath,$$ORIGIN/opendds/lib' - endif - } -}