HiveMindBridge
Public Member Functions | Private Member Functions | Private Attributes | List of all members
HiveMindHostApiResponseHandler Class Reference

#include <HiveMindHostApiResponseHandler.h>

Inheritance diagram for HiveMindHostApiResponseHandler:
Inheritance graph
Collaboration diagram for HiveMindHostApiResponseHandler:
Collaboration graph

Public Member Functions

 HiveMindHostApiResponseHandler (ILogger &logger)
 
void handleMessage (const MessageDTO &message, const HiveMindHostApiResponseDTO &hmResponse) override
 
bool onNeighborListUpdated (std::function< void(std::array< uint16_t, NEIGHBORS_MAX_SIZE >, uint64_t bytesLength)> callback)
 
bool onNeighborUpdated (std::function< void(uint16_t neighborId, std::optional< Position > position)> callback)
 

Private Member Functions

void handleNeighborList (const MessageDTO &message, const GetNeighborsListResponseDTO &list)
 
void handleNeighbor (const MessageDTO &message, const GetNeighborResponseDTO &neighbor)
 

Private Attributes

ILogger & m_logger
 
std::function< void(std::array< uint16_t, NEIGHBORS_MAX_SIZE >, uint64_t bytesLength)> m_neighborListUpdateCallback
 
std::function< void(uint16_t neighborId, std::optional< Position > position)> m_neighborUpdateCallback
 

Additional Inherited Members

- Static Public Attributes inherited from IHiveMindHostApiResponseHandler
static constexpr uint16_t NEIGHBORS_MAX_SIZE = NEIGHBORS_LIST_SIZE
 

Constructor & Destructor Documentation

◆ HiveMindHostApiResponseHandler()

HiveMindHostApiResponseHandler::HiveMindHostApiResponseHandler ( ILogger &  logger)

Member Function Documentation

◆ handleMessage()

void HiveMindHostApiResponseHandler::handleMessage ( const MessageDTO &  message,
const HiveMindHostApiResponseDTO &  hmResponse 
)
overridevirtual

Implements IHiveMindHostApiResponseHandler.

Here is the call graph for this function:

◆ handleNeighbor()

void HiveMindHostApiResponseHandler::handleNeighbor ( const MessageDTO &  message,
const GetNeighborResponseDTO &  neighbor 
)
private
Here is the caller graph for this function:

◆ handleNeighborList()

void HiveMindHostApiResponseHandler::handleNeighborList ( const MessageDTO &  message,
const GetNeighborsListResponseDTO &  list 
)
private
Here is the caller graph for this function:

◆ onNeighborListUpdated()

bool HiveMindHostApiResponseHandler::onNeighborListUpdated ( std::function< void(std::array< uint16_t, NEIGHBORS_MAX_SIZE >, uint64_t bytesLength)>  callback)
virtual

Implements IHiveMindHostApiResponseHandler.

Here is the caller graph for this function:

◆ onNeighborUpdated()

bool HiveMindHostApiResponseHandler::onNeighborUpdated ( std::function< void(uint16_t neighborId, std::optional< Position > position)>  callback)
virtual

Implements IHiveMindHostApiResponseHandler.

Here is the caller graph for this function:

Member Data Documentation

◆ m_logger

ILogger& HiveMindHostApiResponseHandler::m_logger
private

◆ m_neighborListUpdateCallback

std::function<void(std::array<uint16_t, NEIGHBORS_MAX_SIZE>, uint64_t bytesLength)> HiveMindHostApiResponseHandler::m_neighborListUpdateCallback
private

◆ m_neighborUpdateCallback

std::function<void(uint16_t neighborId, std::optional<Position> position)> HiveMindHostApiResponseHandler::m_neighborUpdateCallback
private

The documentation for this class was generated from the following files: