File distro.hpp

File List > astutedds > rmw > distro.hpp

Go to the documentation of this file

//
// Copyright (c) 2026, Astute Systems PTY LTD
//
// This file is part of the AstuteDDS RMW implementation.
//
// See the commercial LICENSE file in the project root for full license details.
//

#pragma once

// ---------------------------------------------------------------------------
// rmw major version (CMake-injected; Jazzy fallback)
// ---------------------------------------------------------------------------

#ifndef RMW_ASTUTEDDS_RMW_VERSION_MAJOR
#  define RMW_ASTUTEDDS_RMW_VERSION_MAJOR 7
#endif

#define RMW_ASTUTEDDS_DISTRO_JAZZY   (RMW_ASTUTEDDS_RMW_VERSION_MAJOR < 13)
#define RMW_ASTUTEDDS_DISTRO_LYRICAL (RMW_ASTUTEDDS_RMW_VERSION_MAJOR >= 13)

// ---------------------------------------------------------------------------
// Feature flags (header-presence based)
//
// Each flag expands to 1 or 0 so call sites can write a plain
// `#if RMW_ASTUTEDDS_HAS_<FEATURE>` guard. Add new features here as the
// supported distro set grows; never test header presence directly elsewhere.
// ---------------------------------------------------------------------------

#if defined(__has_include)
#  if __has_include(<rmw/get_service_endpoint_info.h>) && \
      __has_include(<rmw/service_endpoint_info_array.h>)
#    define RMW_ASTUTEDDS_HAS_SERVICE_ENDPOINT_INFO 1
#  else
#    define RMW_ASTUTEDDS_HAS_SERVICE_ENDPOINT_INFO 0
#  endif
#else
#  define RMW_ASTUTEDDS_HAS_SERVICE_ENDPOINT_INFO 0
#endif