Skip to content

Instantly share code, notes, and snippets.

@gerkey
Created June 10, 2016 22:41
Show Gist options
  • Save gerkey/ee5fb75c2d7819da2b126fa5d438d0a5 to your computer and use it in GitHub Desktop.
Save gerkey/ee5fb75c2d7819da2b126fa5d438d0a5 to your computer and use it in GitHub Desktop.
OpenSplice example
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})
#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