nros C++ API
Lightweight ROS 2 client for embedded real-time systems (C++ headers)
Loading...
Searching...
No Matches
Classes | Namespaces | Macros | Enumerations | Functions
serialization_format.hpp File Reference

nros::format_of<M> — a message type's serialization format; nros::linked_format() — the linked backend's; and the static_assert that refuses to create a typed entity over a message the backend cannot encode. More...

#include <cstdint>
#include "nros_cpp_ffi.h"
Include dependency graph for serialization_format.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  nros::format_of< M >
 

Namespaces

namespace  nros
 

Macros

#define NROS_CPP_ASSERT_MESSAGE_FORMAT(M)
 

Enumerations

enum class  nros::SerializationFormat : uint8_t { nros::Cdr = 1 , nros::Uorb = 2 }
 

Functions

constexpr SerializationFormat nros::linked_format ()
 
constexpr const char * nros::linked_format_name ()
 

Detailed Description

nros::format_of<M> — a message type's serialization format; nros::linked_format() — the linked backend's; and the static_assert that refuses to create a typed entity over a message the backend cannot encode.

Macro Definition Documentation

◆ NROS_CPP_ASSERT_MESSAGE_FORMAT

#define NROS_CPP_ASSERT_MESSAGE_FORMAT (   M)
Value:
"RFC-0088: this message type is not encoded in the format the linked " \
"backend speaks: one image, one backend, one encoding. A bridge image " \
"is the only place two formats legitimately meet, and it converts " \
"explicitly.")
constexpr SerializationFormat linked_format()
Definition serialization_format.hpp:70
Definition serialization_format.hpp:60

Assert that message type M is encoded in the format the linked backend speaks. Expanded at every typed entity-creation site — the C++ sibling of nros_node::format_check::assert_message_format.

A macro, not a function, so the failing static_assert reports the file and line of the create_publisher / create_subscription call rather than a line inside this header.