Created
June 10, 2016 22:41
-
-
Save gerkey/ee5fb75c2d7819da2b126fa5d438d0a5 to your computer and use it in GitHub Desktop.
OpenSplice example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cmake_minimum_required(VERSION 2.8.3) | |
set(CMAKE_BUILD_TYPE Debug) | |
#set(CMAKE_CXX_COMPILER clang-3.8) | |
find_package(OpenSplice REQUIRED) | |
#add_definitions(-fsanitize=memory -fno-omit-frame-pointer -stdlib=libc++) | |
include_directories(${OPENSPLICE_INCLUDE_DIRS}) | |
add_executable(foo foo.cpp) | |
target_link_libraries(foo ${OPENSPLICE_LIBRARIES}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "ccpp_dds_dcps.h" | |
using namespace DDS; | |
int | |
main(void) | |
{ | |
DomainId_t domain = DOMAIN_ID_DEFAULT; | |
DomainParticipantFactory_var dpf = DomainParticipantFactory::get_instance(); | |
while (true) | |
{ | |
DomainParticipant_var participant = dpf->create_participant(domain, PARTICIPANT_QOS_DEFAULT, NULL, | |
STATUS_MASK_NONE); | |
dpf->delete_participant(participant); | |
} | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment