Skip to content

Commit

Permalink
EVALG-77: Initial C++11 example
Browse files Browse the repository at this point in the history
  • Loading branch information
Alxe committed Jul 23, 2024
1 parent 7b10ae7 commit c59a09a
Show file tree
Hide file tree
Showing 5 changed files with 166 additions and 0 deletions.
83 changes: 83 additions & 0 deletions tutorials/application_design/c++11/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
#
# (c) 2024 Copyright, Real-Time Innovations, Inc. All rights reserved.
#
# RTI grants Licensee a license to use, modify, compile, and create derivative
# works of the Software. Licensee has the right to distribute object form
# only for use with RTI products. The Software is provided "as is", with no
# warranty of any type, including any warranty for fitness for any purpose.
# RTI is under no obligation to maintain or support the Software. RTI shall
# not be liable for any incidental or consequential damages arising out of the
# use or inability to use the software.
#

cmake_minimum_required(VERSION 3.11)
project(connext-tutorial-application-design)
list(APPEND CMAKE_MODULE_PATH
"${CMAKE_CURRENT_SOURCE_DIR}/../../../resources/cmake/Modules"
)
include(ConnextDdsConfigureCmakeUtils)
connextdds_configure_cmake_utils()

# Include ConnextDdsAddExample.cmake from resources/cmake
include(ConnextDdsAddExample)

connextdds_rtiddsgen_convert(
INPUT "VehicleModeling.xml"
FROM XML
TO IDL
)

connextdds_call_codegen(
IDL_FILE "VehicleModeling.xml"
LANG "C++11"
PREFIX "VehicleModeling"
)

connextdds_rtiddsgen_run(
IDL_FILE
"${CMAKE_CURRENT_SOURCE_DIR}/../VehicleModeling.xml"
OUTPUT_DIRECTORY
"${CMAKE_CURRENT_BINARY_DIR}/"
LANG C++11
)


connextdds_add_application(
TARGET "transit_publisher"
LANG "C++11"
OUTPUT_NAME "VehicleModeling_transit_publisher"
SOURCES
"${CMAKE_CURRENT_SOURCE_DIR}/VehicleModeling_transit_publisher.cxx"
DEPENDENCIES
${_CONNEXT_DEPENDENCIES}
)

connextdds_add_application(
TARGET "transit_subscriber"
LANG "C++11"
OUTPUT_NAME "VehicleModeling_transit_subscriber"
SOURCES
"${CMAKE_CURRENT_SOURCE_DIR}/VehicleModeling_transit_subscriber.cxx"
DEPENDENCIES
${_CONNEXT_DEPENDENCIES}
)

connextdds_add_application(
TARGET "metrics_subscriber"
LANG "C++11"
OUTPUT_NAME "VehicleModeling_metrics_subscriber"
SOURCES
"${CMAKE_CURRENT_SOURCE_DIR}/VehicleModeling_metrics_subscriber.cxx"
DEPENDENCIES
${_CONNEXT_DEPENDENCIES}
)

connextdds_add_application(
TARGET "metrics_publisher"
LANG "C++11"
OUTPUT_NAME "VehicleModeling_metrics_publisher"
SOURCES
"${CMAKE_CURRENT_SOURCE_DIR}/VehicleModeling_metrics_publisher.cxx"
DEPENDENCIES
${_CONNEXT_DEPENDENCIES}
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
//
// (c) 2024 Copyright, Real-Time Innovations, Inc. All rights reserved.
//
// RTI grants Licensee a license to use, modify, compile, and create derivative
// works of the Software. Licensee has the right to distribute object form
// only for use with RTI products. The Software is provided "as is", with no
// warranty of any type, including any warranty for fitness for any purpose.
// RTI is under no obligation to maintain or support the Software. RTI shall
// not be liable for any incidental or consequential damages arising out of the
// use or inability to use the software.
//

#include <iostream>
#include <thread>
#include <rti/rti.hpp>
#include "VehicleModeling.hpp"

int main(int argc, char **argv)
{
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
//
// (c) 2024 Copyright, Real-Time Innovations, Inc. All rights reserved.
//
// RTI grants Licensee a license to use, modify, compile, and create derivative
// works of the Software. Licensee has the right to distribute object form
// only for use with RTI products. The Software is provided "as is", with no
// warranty of any type, including any warranty for fitness for any purpose.
// RTI is under no obligation to maintain or support the Software. RTI shall
// not be liable for any incidental or consequential damages arising out of the
// use or inability to use the software.
//

#include <iostream>
#include <thread>

#include "rti/rti.hpp"
#include "VehicleModeling.hpp"

int main(int argc, char **argv)
{
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
//
// (c) 2024 Copyright, Real-Time Innovations, Inc. All rights reserved.
//
// RTI grants Licensee a license to use, modify, compile, and create derivative
// works of the Software. Licensee has the right to distribute object form
// only for use with RTI products. The Software is provided "as is", with no
// warranty of any type, including any warranty for fitness for any purpose.
// RTI is under no obligation to maintain or support the Software. RTI shall
// not be liable for any incidental or consequential damages arising out of the
// use or inability to use the software.
//

#include <iostream>
#include <thread>
#include <rti/rti.hpp>
#include "VehicleModeling.hpp"

int main(int argc, char **argv)
{
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
//
// (c) 2024 Copyright, Real-Time Innovations, Inc. All rights reserved.
//
// RTI grants Licensee a license to use, modify, compile, and create derivative
// works of the Software. Licensee has the right to distribute object form
// only for use with RTI products. The Software is provided "as is", with no
// warranty of any type, including any warranty for fitness for any purpose.
// RTI is under no obligation to maintain or support the Software. RTI shall
// not be liable for any incidental or consequential damages arising out of the
// use or inability to use the software.
//

#include <iostream>
#include <thread>

#include "rti/rti.hpp"
#include "VehicleModeling.hpp"

int main(int argc, char **argv)
{

}

0 comments on commit c59a09a

Please sign in to comment.