 |
Belle II Software
release-05-01-25
|
12 #include <framework/pcore/zmq/messages/ZMQModuleMessage.h>
13 #include <framework/pcore/zmq/messages/ZMQDefinitions.h>
22 class ZMQIdMessage :
public ZMQModuleMessage<4> {
24 friend class ZMQMessageFactory;
28 static constexpr
const unsigned int c_identity = 0;
30 static constexpr
const unsigned int c_type = 1;
32 static constexpr
const unsigned int c_data = 2;
39 const auto& type = getMessagePartAsString<c_type>();
40 return type.size() == 1 and type[0] ==
static_cast<char>(isType);
46 return getMessagePartAsString<c_identity>();
52 return getMessagePart<c_data>();
58 return getMessagePart<c_additionalData>();
std::string getIdentity() const
Get the identity part.
static constexpr const unsigned int c_data
Where the data is stored.
EMessageTypes
Type the messages can have.
zmq::message_t & getDataMessage()
Get the data part.
ZMQModuleMessage()=default
Do not allow to create a new message from scratch publicly.
static constexpr const unsigned int c_type
Where the type of the message is stored.
static constexpr const unsigned int c_identity
Where the identity is stored.
zmq::message_t & getAdditionalDataMessage()
Get the additional data part.
Abstract base class for different kinds of events.
static constexpr const unsigned int c_additionalData
Where the additional data is stored.
bool isMessage(const EMessageTypes isType) const
The if the message is of a given type.