Singleton that translates network destination IDs (NetworkCfg.h) into internal queue IDs (QueueCfg.h) and forwards messages to the QueueManager.
More...
#include <NetworkQueueManagerProxy.h>
Singleton that translates network destination IDs (NetworkCfg.h) into internal queue IDs (QueueCfg.h) and forwards messages to the QueueManager.
◆ 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.
◆ ~NetworkQueueManagerProxy()
| SWE4211RPi::NetworkQueueManagerProxy::~NetworkQueueManagerProxy |
( |
| ) |
|
|
privatevirtual |
This is the destructor. It does nothing.
Nothing to do.
◆ getSingleton()
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.
◆ 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
-
| value | This is the value to be enqueued as a broadcast message to all queues. |
◆ sendMessage()
| bool SWE4211RPi::NetworkQueueManagerProxy::sendMessage |
( |
int |
networkDefinedDestination, |
|
|
CommandQueueEntry |
value |
|
) |
| |
This method will send a message to the given destination.
- Parameters
-
| destination | This is the destination queue. This is the value that is transmitted over the TCP-IP network, not the internal queue id. |
| value | This 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
-
| networkDefinedDestination | This is the destination queue. This is the value that is transmitted over the TCP-IP network, not the internal queue id. |
| value | This is the message to be enqueued. |
- Returns
- The return will be true if the network ID is known, or false otherwise.
◆ 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
This is the singleton instance for the device.
The documentation for this class was generated from the following files:
- /media/sf_lwshare/20262027SWE4211AllLabSolutions/Lab11/solution/pi/src/queuing/NetworkQueueManagerProxy.h
- /media/sf_lwshare/20262027SWE4211AllLabSolutions/Lab11/solution/pi/src/queuing/NetworkQueueManagerProxy.cpp