HiveMind
Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes | List of all members
BittyBuzzMessageHandler Class Reference

#include <BittyBuzzMessageHandler.h>

Inheritance diagram for BittyBuzzMessageHandler:
Inheritance graph
Collaboration diagram for BittyBuzzMessageHandler:
Collaboration graph

Public Member Functions

 BittyBuzzMessageHandler (const IBittyBuzzClosureRegister &closureRegister, ICircularQueue< MessageDTO > &inputQueue, ICircularQueue< MessageDTO > &hostQueue, ICircularQueue< MessageDTO > &remoteQueue, const IBSP &bsp, ILogger &logger)
 
 ~BittyBuzzMessageHandler () override=default
 
bool processMessage () override
 process a message and sends a response if needed. A response is sent to the appropriate queue on a request More...
 
void clearMessages () override
 clears all the pending messages in the input queue without processing them More...
 
uint16_t messageQueueLength () const override
 gets the number of message to be processed in the queue More...
 
- Public Member Functions inherited from IBittyBuzzMessageHandler
virtual ~IBittyBuzzMessageHandler ()=default
 

Private Member Functions

FunctionListLengthResponseDTO handleFunctionListLengthRequest (const FunctionListLengthRequestDTO &functionLengthRequest)
 
FunctionDescriptionResponseDTO handleFunctionDescriptionRequest (const FunctionDescriptionRequestDTO &functionDescRequest)
 
FunctionCallResponseDTO handleFunctionCallRequest (const FunctionCallRequestDTO &functionRequest)
 
UserCallResponseDTO handleUserCallRequest (const UserCallRequestDTO &userRequest)
 
ResponseDTO handleRequest (const RequestDTO &request)
 
bool handleVmMessage (const VmMessageDTO &vmMsg)
 
bool handleBuzzMessages (const BuzzMessagesDTO &msg)
 
bool handleResponse (const ResponseDTO &response)
 
bool handleMessage (const MessageDTO &message)
 

Static Private Member Functions

static bool handleUserCallResponse (const UserCallResponseDTO &response)
 
static bool handleGenericResponse (const GenericResponseDTO &response)
 

Private Attributes

const IBittyBuzzClosureRegisterm_closureRegister
 
ICircularQueue< MessageDTO > & m_inputQueue
 
ICircularQueue< MessageDTO > & m_hostQueue
 
ICircularQueue< MessageDTO > & m_remoteQueue
 
const IBSPm_bsp
 
ILoggerm_logger
 

Constructor & Destructor Documentation

◆ BittyBuzzMessageHandler()

BittyBuzzMessageHandler::BittyBuzzMessageHandler ( const IBittyBuzzClosureRegister closureRegister,
ICircularQueue< MessageDTO > &  inputQueue,
ICircularQueue< MessageDTO > &  hostQueue,
ICircularQueue< MessageDTO > &  remoteQueue,
const IBSP bsp,
ILogger logger 
)

◆ ~BittyBuzzMessageHandler()

BittyBuzzMessageHandler::~BittyBuzzMessageHandler ( )
overridedefault

Member Function Documentation

◆ clearMessages()

void BittyBuzzMessageHandler::clearMessages ( )
overridevirtual

clears all the pending messages in the input queue without processing them

Implements IBittyBuzzMessageHandler.

◆ handleBuzzMessages()

bool BittyBuzzMessageHandler::handleBuzzMessages ( const BuzzMessagesDTO &  msg)
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ handleFunctionCallRequest()

FunctionCallResponseDTO BittyBuzzMessageHandler::handleFunctionCallRequest ( const FunctionCallRequestDTO &  functionRequest)
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ handleFunctionDescriptionRequest()

FunctionDescriptionResponseDTO BittyBuzzMessageHandler::handleFunctionDescriptionRequest ( const FunctionDescriptionRequestDTO &  functionDescRequest)
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ handleFunctionListLengthRequest()

FunctionListLengthResponseDTO BittyBuzzMessageHandler::handleFunctionListLengthRequest ( const FunctionListLengthRequestDTO &  functionLengthRequest)
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ handleGenericResponse()

bool BittyBuzzMessageHandler::handleGenericResponse ( const GenericResponseDTO &  response)
staticprivate
Here is the caller graph for this function:

◆ handleMessage()

bool BittyBuzzMessageHandler::handleMessage ( const MessageDTO &  message)
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ handleRequest()

ResponseDTO BittyBuzzMessageHandler::handleRequest ( const RequestDTO &  request)
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ handleResponse()

bool BittyBuzzMessageHandler::handleResponse ( const ResponseDTO &  response)
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ handleUserCallRequest()

UserCallResponseDTO BittyBuzzMessageHandler::handleUserCallRequest ( const UserCallRequestDTO &  userRequest)
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ handleUserCallResponse()

bool BittyBuzzMessageHandler::handleUserCallResponse ( const UserCallResponseDTO &  response)
staticprivate
Here is the caller graph for this function:

◆ handleVmMessage()

bool BittyBuzzMessageHandler::handleVmMessage ( const VmMessageDTO &  vmMsg)
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ messageQueueLength()

uint16_t BittyBuzzMessageHandler::messageQueueLength ( ) const
overridevirtual

gets the number of message to be processed in the queue

Returns
The number of message in the queue

Implements IBittyBuzzMessageHandler.

◆ processMessage()

bool BittyBuzzMessageHandler::processMessage ( )
overridevirtual

process a message and sends a response if needed. A response is sent to the appropriate queue on a request

Returns
true if the operation was successfull or there was no message to process, false if an reply could not be send (i.e. the queue was full or the message was could not be understood)

Implements IBittyBuzzMessageHandler.

Here is the call graph for this function:

Member Data Documentation

◆ m_bsp

const IBSP& BittyBuzzMessageHandler::m_bsp
private

◆ m_closureRegister

const IBittyBuzzClosureRegister& BittyBuzzMessageHandler::m_closureRegister
private

◆ m_hostQueue

ICircularQueue<MessageDTO>& BittyBuzzMessageHandler::m_hostQueue
private

◆ m_inputQueue

ICircularQueue<MessageDTO>& BittyBuzzMessageHandler::m_inputQueue
private

◆ m_logger

ILogger& BittyBuzzMessageHandler::m_logger
private

◆ m_remoteQueue

ICircularQueue<MessageDTO>& BittyBuzzMessageHandler::m_remoteQueue
private

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