Go to the documentation of this file. 1 #ifndef __INTERLOCMESSAGEHANDLER_H__
2 #define __INTERLOCMESSAGEHANDLER_H__
5 #include <INotificationQueue.h>
8 #include <cpp-common/ICircularQueue.h>
10 #include <pheromones/MessageDTO.h>
11 #include <pheromones/interloc/InterlocAPIDTO.h>
18 ICircularQueue<MessageDTO>& inputQueue,
19 ICircularQueue<MessageDTO>& hostQueue,
20 ICircularQueue<MessageDTO>& remoteQueue,
21 INotificationQueue<InterlocUpdate>& interlocPositionUpdateQueue);
40 std::array<GetNeighborResponseDTO, InterlocDumpDTO::MAX_UPDATES_SIZE>
m_updateDtoArray;
54 InterlocStateDTO previousState,
55 InterlocStateDTO newState);
66 #endif //__INTERLOCMESSAGEHANDLER_H__
Definition: IInterlocManager.h:16
virtual ~InterlocMessageHandler()=default
Definition: IInterlocMessageHandler.h:6
bool handleMessage(const MessageDTO &dto)
Definition: InterlocMessageHandler.cpp:47
static InterlocRawAngleDataDTO constructRawDataMessage(BspInterlocRawAngleData &data, uint32_t fromId, uint8_t numFrames)
Definition: InterlocMessageHandler.cpp:164
bool getDumpEnabled() const override
Retrieves a flag to know if data dumps to the host should be done or not.
Definition: InterlocMessageHandler.cpp:202
Definition: BspInterlocAngleRawData.h:24
std::array< GetNeighborResponseDTO, InterlocDumpDTO::MAX_UPDATES_SIZE > m_updateDtoArray
Definition: InterlocMessageHandler.h:40
ILogger & m_logger
Definition: InterlocMessageHandler.h:32
bool sendInterlocDump(InterlocUpdate *updatesHistory, uint8_t updatesLength) override
Sends a history of interloc updates back to the host.
Definition: InterlocMessageHandler.cpp:204
ICircularQueue< MessageDTO > & m_inputQueue
Definition: InterlocMessageHandler.h:35
Definition: InterlocMessageHandler.h:13
static void rawAngleDataCallbackStatic(void *context, BspInterlocRawAngleData &data)
Definition: InterlocMessageHandler.cpp:192
void stateChangeCallback(InterlocStateDTO previousState, InterlocStateDTO newState)
Definition: InterlocMessageHandler.cpp:111
bool m_dumpsEnabled
Definition: InterlocMessageHandler.h:43
ICircularQueue< MessageDTO > & m_remoteQueue
Definition: InterlocMessageHandler.h:37
void ensureSendMessage(MessageDTO &msg)
Definition: InterlocMessageHandler.cpp:156
Definition: InterlocUpdate.h:7
static void stateChangeCallbackStatic(void *context, InterlocStateDTO previousState, InterlocStateDTO newState)
Definition: InterlocMessageHandler.cpp:197
bool handleStateChangeMessage(const SetInterlocStateDTO dto) const
Definition: InterlocMessageHandler.cpp:75
A logger class with basic logging capabilities.
Definition: ILogger.h:35
ICircularQueue< MessageDTO > & getQueueForDestination(uint16_t destinationId) const
Definition: InterlocMessageHandler.cpp:67
bool processMessage() override
Processes the next message in the queue.
Definition: InterlocMessageHandler.cpp:29
ICircularQueue< MessageDTO > & m_hostQueue
Definition: InterlocMessageHandler.h:36
void rawAngleDataCallback(BspInterlocRawAngleData &data)
Definition: InterlocMessageHandler.cpp:127
uint16_t m_messageSourceId
Definition: InterlocMessageHandler.h:42
INotificationQueue< InterlocUpdate > & m_interlocPositionUpdateQueue
Definition: InterlocMessageHandler.h:38
IBSP & m_bsp
Definition: InterlocMessageHandler.h:34
bool handleConfigurationMessage(const InterlocConfigurationDTO &dto)
Definition: InterlocMessageHandler.cpp:85
InterlocMessageHandler(ILogger &logger, IInterlocManager &interlocManager, IBSP &bsp, ICircularQueue< MessageDTO > &inputQueue, ICircularQueue< MessageDTO > &hostQueue, ICircularQueue< MessageDTO > &remoteQueue, INotificationQueue< InterlocUpdate > &interlocPositionUpdateQueue)
Definition: InterlocMessageHandler.cpp:8
IInterlocManager & m_interlocManager
Definition: InterlocMessageHandler.h:33