Kaspersky Neuromorphic Platform  1.0.0
API Reference
Loading...
Searching...
No Matches
message_envelope.h
Go to the documentation of this file.
1
22#pragma once
23
24#include <knp/core/uid.h>
25
26#include <iostream>
27#include <variant>
28#include <vector>
29
30#include "messaging.h"
31
32
37{
38
47using MessageVariant = boost::mp11::mp_rename<AllMessages, std::variant>;
48
49
55std::vector<uint8_t> pack_to_envelope(const MessageVariant &message);
67MessageVariant extract_from_envelope(const std::vector<uint8_t> &buffer);
68
69} // namespace knp::core::messaging
Common header for messaging.
Messaging namespace.
Definition message_bus.h:33
MessageVariant extract_from_envelope(const void *buffer)
Extract messages from envelope.
std::vector< uint8_t > pack_to_envelope(const MessageVariant &message)
Pack messages to envelope.
boost::mp11::mp_rename< AllMessages, std::variant > MessageVariant
Message variant that contains any message type specified in AllMessages.
UID class and routines.