PiImageStreamer
Loading...
Searching...
No Matches
SWE4211RPi::NetworkQueueManagerProxy Class Reference

Singleton that translates network destination IDs (NetworkCfg.h) into internal queue IDs (QueueCfg.h) and forwards messages to the QueueManager. More...

#include <NetworkQueueManagerProxy.h>

Collaboration diagram for SWE4211RPi::NetworkQueueManagerProxy:

Public Member Functions

void sendBroadcastMessage (CommandQueueEntry value)
 
bool sendMessage (int destination, CommandQueueEntry value)
 

Static Public Member Functions

static NetworkQueueManagerProxy & getSingleton ()
 

Static Protected Attributes

static NetworkQueueManagerProxy * singleton = nullptr
 

Private Member Functions

 NetworkQueueManagerProxy ()
 
virtual ~NetworkQueueManagerProxy ()
 

Private Attributes

std::map< int, int > networkIDtoInternalIDMap
 

Detailed Description

Singleton that translates network destination IDs (NetworkCfg.h) into internal queue IDs (QueueCfg.h) and forwards messages to the QueueManager.

Constructor & Destructor Documentation

◆ NetworkQueueManagerProxy()

SWE4211RPi::NetworkQueueManagerProxy::NetworkQueueManagerProxy ( )
private

This is the proxy constructor.

This is the proxy constructor. It fills in the network ID to internal queue ID map and prints a warning if the map size does not match the number of network IDs or internal queues.

Initialize the map within the proxy. This map should map each network ID to an internal queue id. These ID's are defined in NetworkCfg.h and QueueCfg.h.

Here is the caller graph for this function:

◆ ~NetworkQueueManagerProxy()

SWE4211RPi::NetworkQueueManagerProxy::~NetworkQueueManagerProxy ( )
privatevirtual

This is the destructor. It does nothing.

Nothing to do.

Member Function Documentation

◆ getSingleton()

NetworkQueueManagerProxy & SWE4211RPi::NetworkQueueManagerProxy::getSingleton ( )
static

This method will obtain the singleton instance of the NetworkQueueManager Proxy.

Returns
The proxy instance will be returned.

This method will obtain the singleton instance of the NetworkQueueManager Proxy. If there is no instance already, one is created using double-checked locking.

Returns
A reference to the proxy instance will be returned.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ sendBroadcastMessage()

void SWE4211RPi::NetworkQueueManagerProxy::sendBroadcastMessage ( CommandQueueEntry  value)

This method will send a broadcast message. A broadcast message will be enqueued on all queues to be received by all components.

Parameters
valueThis is the value to be enqueued as a broadcast message to all queues.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ sendMessage()

bool SWE4211RPi::NetworkQueueManagerProxy::sendMessage ( int  networkDefinedDestination,
CommandQueueEntry  value 
)

This method will send a message to the given destination.

Parameters
destinationThis is the destination queue. This is the value that is transmitted over the TCP-IP network, not the internal queue id.
valueThis is the message to be enqueued.
Returns
The return will be true if the network ID is known, or false otherwise.

This method will send a message to the given destination.

Parameters
networkDefinedDestinationThis is the destination queue. This is the value that is transmitted over the TCP-IP network, not the internal queue id.
valueThis is the message to be enqueued.
Returns
The return will be true if the network ID is known, or false otherwise.
Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ networkIDtoInternalIDMap

std::map<int, int> SWE4211RPi::NetworkQueueManagerProxy::networkIDtoInternalIDMap
private

This map will map the instances from the network (TCP-IP ID) to the internal queue ID used to reach the internal SW components. This map will be populated in the constructor.

◆ singleton

NetworkQueueManagerProxy * SWE4211RPi::NetworkQueueManagerProxy::singleton = nullptr
staticprotected

This is the singleton instance for the device.


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