DUNE-DAQ
DUNE Trigger and Data Acquisition software
|
#include "ers/Issue.hpp"
#include "logging/Logging.hpp"
#include "boost/preprocessor.hpp"
#include "msgpack.hpp"
#include <algorithm>
#include <string>
#include <vector>
Go to the source code of this file.
Classes | |
struct | dunedaq::serialization::is_serializable< T > |
Namespaces | |
namespace | dunedaq |
Including Qt Headers. | |
namespace | dunedaq::serialization |
Macros | |
#define | DUNE_DAQ_TYPESTRING(Type, typestring) |
#define | DUNE_DAQ_SERIALIZABLE(Type, typestring) |
#define | DUNE_DAQ_SERIALIZE(Type, ...) |
Macro to make a class/struct serializable intrusively. | |
#define | OPACK(r, data, elem) |
#define | OUNPACK(r, data, elem) |
#define | DUNE_DAQ_SERIALIZE_NON_INTRUSIVE(NS, Type, ...) |
Macro to make a class/struct serializable non-intrusively. | |
Enumerations | |
enum | dunedaq::serialization::SerializationType { dunedaq::serialization::kMsgPack } |
Serialization methods that are available. More... | |
Functions | |
dunedaq::ERS_DECLARE_ISSUE (serialization, UnknownSerializationTypeString, "Unknown serialization type "<< t,((std::string) t)) ERS_DECLARE_ISSUE(serialization | |
Unknown serialization | dunedaq::ERS_DECLARE_ISSUE (serialization, UnknownSerializationTypeByte, "Unknown serialization type "<< t,((char) t)) ERS_DECLARE_ISSUE(serialization |
template<typename T > | |
Unknown serialization Cannot deserialize std::string | dunedaq::datatype_to_string () |
SerializationType | dunedaq::serialization::from_string (const std::string s) |
Convert string to SerializationType. | |
constexpr uint8_t | dunedaq::serialization::serialization_type_byte (SerializationType stype) |
template<class T > | |
std::vector< uint8_t > | dunedaq::serialization::serialize (const T &obj, SerializationType stype) |
Serialize object obj using serialization method stype . | |
template<class T , typename CharType = unsigned char> | |
T | dunedaq::serialization::deserialize (const std::vector< CharType > &v) |
Deserialize vector of bytes v into an instance of class T . | |
Variables | |
dunedaq::UnknownSerializationTypeEnum | |
Unknown serialization | dunedaq::type |
Unknown serialization | dunedaq::CannotDeserializeMessage |
Unknown serialization Cannot deserialize | dunedaq::message |
This is part of the DUNE DAQ Application Framework, copyright 2020. Licensing/copyright details are in the COPYING file that you should have received with this code.
Definition in file Serialization.hpp.
#define DUNE_DAQ_SERIALIZABLE | ( | Type, | |
typestring ) |
Definition at line 30 of file Serialization.hpp.
#define DUNE_DAQ_SERIALIZE | ( | Type, | |
... ) |
Macro to make a class/struct serializable intrusively.
Call the macro inside your class declaration, with the first argument being the class name, followed by each of the member variables. Example:
struct MyType { int i; std::string s; std::vector<double> v; DUNE_DAQ_SERIALIZE(MyType, i, s, v); };
Definition at line 56 of file Serialization.hpp.
#define DUNE_DAQ_SERIALIZE_NON_INTRUSIVE | ( | NS, | |
Type, | |||
... ) |
Macro to make a class/struct serializable non-intrusively.
Call the macro outside your class declaration, from the global namespace. The first argument is the namespace of your class, the second is the class name, and the rest of the arguments list the member variables. Example:
namespace ns { struct MyType { int i; std::string s; std::vector<double> v; } } DUNE_DAQ_SERIALIZE_NON_INTRUSIVE(ns, MyType, i, s, v);
Definition at line 87 of file Serialization.hpp.
#define DUNE_DAQ_TYPESTRING | ( | Type, | |
typestring ) |
Definition at line 23 of file Serialization.hpp.
#define OPACK | ( | r, | |
data, | |||
elem ) |
Definition at line 62 of file Serialization.hpp.
#define OUNPACK | ( | r, | |
data, | |||
elem ) |
Definition at line 64 of file Serialization.hpp.