203 [[maybe_unused]]
static constexpr std::chrono::milliseconds
kInfinite{-1};
318 std::string_view encoding = {})
noexcept;
401 constexpr auto kHasPrefixFunction = [](std::string_view value, std::string_view prefix)
noexcept {
402 if (prefix.size() > value.size()) {
406 for (
size_t i = 0; i < prefix.size(); ++i) {
407 if (value[i] != prefix[i]) {
415 if (kHasPrefixFunction(ser_type,
"vlink::zerocopy::")) {
419 if (ser_type ==
"raw" || ser_type ==
"string" || ser_type ==
"std::string" || ser_type ==
"text" ||
420 ser_type ==
"json" || ser_type ==
"application/json" || ser_type ==
"text/json") {
Versatile byte buffer with small-buffer optimisation, ownership semantics and compression.
Versatile 128-byte byte buffer with SBO, five ownership modes and compression helpers.
Definition bytes.h:113
Platform-independent macro definitions for the VLink library.
#define VLINK_EXPORT
Definition macros.h:85
InitType
Controls whether a node is initialised immediately at construction.
Definition types.h:132
@ kWithoutInit
Defer initialisation; call init() manually.
Definition types.h:133
@ kWithInit
Initialise immediately in the constructor.
Definition types.h:134
SchemaType
Coarse runtime schema family used by discovery, bag metadata, and proxy routing.
Definition types.h:184
@ kUnknown
Decode category is not known.
Definition types.h:185
@ kZeroCopy
Decode using VLink zero-copy message structs.
Definition types.h:187
@ kProtobuf
Decode using the Protocol Buffers stack.
Definition types.h:188
@ kFlatbuffers
Decode using the FlatBuffers stack.
Definition types.h:189
@ kRaw
Treat the payload as opaque/raw bytes.
Definition types.h:186
ActionType
Identifies the type of message action for recording purposes.
Definition types.h:162
@ kSet
Field value written by a Setter node.
Definition types.h:170
@ kServerRequest
RPC request received by a Server node.
Definition types.h:166
@ kPublish
Message published by a Publisher node.
Definition types.h:168
@ kUnknownAction
Action type not classified.
Definition types.h:163
@ kGet
Field value read by a Getter node.
Definition types.h:171
@ kClientResponse
RPC response received by a Client node.
Definition types.h:165
@ kSubscribe
Message received by a Subscriber node.
Definition types.h:169
@ kServerResponse
RPC response sent by a Server node.
Definition types.h:167
@ kClientRequest
RPC request sent by a Client node.
Definition types.h:164
TransportType
Enumeration of all supported transport backends.
Definition types.h:107
@ kShm2
Iceoryx2 shared memory (shm2://).
Definition types.h:111
@ kSomeip
SOME/IP via vsomeip (someip://).
Definition types.h:117
@ kUnknown
Unknown or unsupported transport.
Definition types.h:108
@ kMqtt
MQTT (mqtt://).
Definition types.h:118
@ kZenoh
Zenoh publish/subscribe (zenoh://).
Definition types.h:112
@ kDds
Fast-DDS RTPS (dds://).
Definition types.h:113
@ kDdsc
CycloneDDS (ddsc://).
Definition types.h:114
@ kQnx
QNX IPC (qnx://; QNX only).
Definition types.h:120
@ kIntra
In-process queue (intra://).
Definition types.h:109
@ kDdsr
RTI DDS (ddsr://).
Definition types.h:115
@ kDdst
TravoDDS (ddst://).
Definition types.h:116
@ kShm
Iceoryx shared memory (shm://).
Definition types.h:110
@ kFdbus
FDBus IPC (fdbus://).
Definition types.h:119
ImplType
Bitmask identifying the role of a VLink node implementation.
Definition types.h:89
@ kGetter
Field getter (retrieve latest value).
Definition types.h:96
@ kSubscriber
Event subscriber (receive broadcast).
Definition types.h:94
@ kClient
Method client (RPC caller).
Definition types.h:92
@ kSetter
Field setter (update latest value).
Definition types.h:95
@ kPublisher
Event publisher (N-to-N broadcast).
Definition types.h:93
@ kUnknownImplType
Type not yet determined.
Definition types.h:90
@ kServer
Method server (RPC responder).
Definition types.h:91
SecurityType
Controls whether a node uses encrypted/authenticated transport.
Definition types.h:148
@ kWithSecurity
Encrypted and authenticated transport.
Definition types.h:150
@ kWithoutSecurity
Plain (unauthenticated) transport.
Definition types.h:149
Cumulative sample delivery statistics for a subscriber or getter.
Definition types.h:217
VLINK_EXPORT friend std::ostream & operator<<(std::ostream &ostream, const SampleLostInfo &info) noexcept
Streams a human-readable summary to ostream.
uint64_t total
Total number of samples expected (delivered + lost).
Definition types.h:218
uint64_t lost
Number of samples that were dropped or missed.
Definition types.h:219
Carries one serialized schema blob for runtime registration or embedding.
Definition types.h:246
SchemaType schema_type
Coarse runtime schema family derived from encoding.
Definition types.h:249
Bytes data
Raw serialized schema bytes (e.g. FileDescriptorSet or BFBS).
Definition types.h:250
static constexpr SchemaType infer_ser_type(std::string_view ser_type) noexcept
Infers a coarse schema family directly from a concrete ser_type string.
Definition types.h:400
static std::string_view convert_type(SchemaType schema_type) noexcept
Converts a schema type to its canonical persisted encoding label.
static SchemaType resolve_type(SchemaType schema_type, std::string_view ser_type={}, std::string_view encoding={}) noexcept
Resolves the best available schema family from explicit, encoding and ser hints.
static bool is_real_type(SchemaType schema_type) noexcept
Returns whether a schema type carries concrete runtime schema metadata.
static bool is_valid_type(SchemaType schema_type) noexcept
Returns whether a schema type enum value is within the supported range.
std::string encoding
Schema encoding identifier (e.g. "protobuf" or "flatbuffers").
Definition types.h:248
std::string name
Schema subject name, typically a fully-qualified message or table type.
Definition types.h:247
static SchemaType convert_encoding(std::string_view encoding) noexcept
Parses a schema type from an encoding label.
Compile-time timeout constants used by blocking wait methods.
Definition types.h:200
static constexpr std::chrono::milliseconds kInfinite
Wait indefinitely (negative timeout).
Definition types.h:203
static constexpr std::chrono::milliseconds kDefaultInterval
Default wait timeout: 5 seconds.
Definition types.h:201
Semantic version number with comparison and string conversion utilities.
Definition types.h:329
int patch
Patch version number; -1 if not set.
Definition types.h:332
bool operator==(const Version &target) const noexcept
Returns true when both versions are identical.
bool operator!=(const Version &target) const noexcept
Returns true when versions differ.
bool is_valid() const noexcept
Returns true when all three components are non-negative.
std::string to_string() const noexcept
Converts this version to a "major.minor.patch" string.
static Version from_string(const std::string &version_str) noexcept
Parses a version string in "major.minor.patch" format.
bool operator>(const Version &target) const noexcept
Returns true when this version is newer than target.
int minor
Minor version number; -1 if not set.
Definition types.h:331
bool operator<(const Version &target) const noexcept
Returns true when this version is older than target.
int major
Major version number; -1 if not set.
Definition types.h:330