13 #ifndef __BAOSLIB_EVENT_H__
14 #define __BAOSLIB_EVENT_H__
16 #include "baos/BaosLib_export.h"
20 #include "wzcpp/features/concurrent/concurrent_queue.h"
46 using TimerIdList = std::vector<std::uint64_t>;
47 using UPtr = std::unique_ptr<IOEvent>;
49 std::unique_ptr<Buffer>, TimerIdList>;
64 STACK_DISCONNECT_RESULT,
81 Type eventType{Type::UNKNOWN};
82 std::uint64_t msgID{0};
84 bool promiseMoved{
false};
Provides the structures for devices with IP capabilities.
Classes regarding response telegrams.
Represents an IOEvent.
Definition: IOEvent.h:44
std::unique_ptr< IOEvent > UPtr
An alias for an unique pointer to an IOEvent.
Definition: IOEvent.h:47
Type
The different possible event types.
Definition: IOEvent.h:54
EventDataType data_
The payload/data for this event.
Definition: IOEvent.h:85
IOEvent(Type eventT, EventDataType &&pkt, protocol::ResponsePromise &&prom, std::uint64_t mID=0)
Construct a new IOEvent object.
IOEvent()=default
Default constructor, generating an empty IOEvent.
std::variant< std::monostate, ip::Ip4SocketAddress, std::unique_ptr< Buffer >, TimerIdList > EventDataType
datatypes inside an IOEvent
Definition: IOEvent.h:50
protocol::ResponsePromise responsePromise
Stores the response promise to resolve later.
Definition: IOEvent.h:83
Global types and configuration for the whole SDK.
std::promise< BaseResponse::SPtr > ResponsePromise
Definition: Response.h:95
Global BAOS sdk namespace.
Definition: config.h:69
wzcpp::ConcurrentDeque< IOEvent > BaosMsgQueue
Alias for a concurrent queue with IOEvents.
Definition: IOEvent.h:96
wzcpp::ConcurrentDeque< IOEvent > TransportMsgQueue
Alias for a concurrent queue with IOEvents used by the transport layer.
Definition: IOEvent.h:97
Represent the pair of IP address as string in the form "10.0.0.1020" and a port.
Definition: IpGeneral.h:34