13 #ifndef __BAOSLIB_INDICATION_H__
14 #define __BAOSLIB_INDICATION_H__
16 #include "baos/BaosLib_export.h"
20 #include "wzcpp/features/concurrent/concurrent_queue.h"
38 using IndFuture = std::future<protocol::BaseResponse>;
49 using UPtr = std::unique_ptr<IndicationEvent>;
51 std::variant<protocol::ServerItems, protocol::DatapointValueStates>;
73 indPromise{std::move(prom)}
75 data_ = std::move(pkt);
79 Type eventType{Type::UNKNOWN};
80 std::uint64_t msgID{0};
98 return "Unhandled IOEvent type";
104 wzcpp::ConcurrentDeque<IndicationEvent>;
Global BAOS protocol defines and types.
Classes regarding response telegrams.
An Indication event.
Definition: Indication.h:47
std::variant< protocol::ServerItems, protocol::DatapointValueStates > EventDataType
The possible different payload types.
Definition: Indication.h:51
Type
The indication types.
Definition: Indication.h:55
@ SERVERITEM
A server item indication.
@ DP_VALUE
A datapoint value change indication.
EventDataType data_
The payload.
Definition: Indication.h:84
std::unique_ptr< IndicationEvent > UPtr
Alias for an unique pointer from this class.
Definition: Indication.h:49
IndicationEvent(Type eventT, EventDataType &&pkt, IndPromise &&prom, std::uint64_t mID=0)
Construct a new Indication Event object.
Definition: Indication.h:70
IndicationEvent()=default
The default constructor.
IndPromise indPromise
The indication promise.
Definition: Indication.h:81
Global types and configuration for the whole SDK.
Groups BAOS binary protocol specific types , defines and classes for Indications, Responses etc.
Definition: Defines.h:32
std::string toString(IndicationEvent::Type typ)
Convert IndicationEvent into human readable string.
Definition: Indication.h:89
std::future< protocol::BaseResponse > IndFuture
Strong type for a indication future.
Definition: Indication.h:38
wzcpp::ConcurrentDeque< IndicationEvent > BaosIndQueue
Alias for a wzcpp::ConcurrentDeque holding indication events.
Definition: Indication.h:104
std::promise< protocol::BaseResponse > IndPromise
Strong type for a indication promise.
Definition: Indication.h:37