File identifier.hpp

File List > astutedds > rmw > identifier.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

#include <cstdint>

#include <rmw/check_type_identifiers_match.h>
#include <rmw/error_handling.h>

// ---------------------------------------------------------------------------
// Constants
// ---------------------------------------------------------------------------

inline constexpr char kIdentifier[] = "rmw_astutedds_cpp";

inline constexpr char kSerializationFmt[] = "cdr";

inline constexpr uint32_t kDomainId = 0;

inline constexpr uint8_t kCdrEncapHeader[4] = { 0x00, 0x01, 0x00, 0x00 };

// ---------------------------------------------------------------------------
// Argument-validation macro
// ---------------------------------------------------------------------------

#define ASTUTEDDS_CHECK_IDENTIFIER(handle, on_mismatch)                  \
  RMW_CHECK_TYPE_IDENTIFIERS_MATCH(                                      \
    rmw_astutedds,                                                       \
    (handle)->implementation_identifier,                                 \
    kIdentifier,                                                         \
    on_mismatch)