|
PiImageStreamer
|
Prints connection and direction status reports from its queue to the console. More...
#include <StatusDisplay.h>


Public Member Functions | |
| StatusDisplay (std::string threadName) | |
| virtual void | run () |
Public Member Functions inherited from SWE4211RPi::RunnableClass | |
| RunnableClass (std::string threadName, int priority=0) | |
| virtual | ~RunnableClass () |
| virtual void | resetThreadDiagnostics () |
| virtual void | printInformation () |
| virtual double | getCPUUsageInfo () |
| virtual pid_t | getThreadID () |
| virtual void | start () final |
| virtual void | setPriority (int priority) final |
| virtual int | getPriority () final |
| virtual bool | isShutdown () final |
| virtual bool | isStarted () final |
| virtual void | stopThreadExecution () |
| virtual void | waitForShutdown () |
Private Member Functions | |
| void | processBroadcastMessage (SWE4211RPi::CommandQueueEntry commandToProcess) |
| void | processStatusMessage (const SWE4211RPi::CommandQueueEntry &commandToProcess) |
| void | handleHeartbeatMessage (const SWE4211RPi::CommandQueueEntry &commandToProcess) |
Additional Inherited Members | |
Static Public Member Functions inherited from SWE4211RPi::RunnableClass | |
| static void | printThreads () |
| static void | resetAllThreadInformation () |
Protected Member Functions inherited from SWE4211RPi::RunnableClass | |
| virtual void | startChildRunnables () |
| virtual void | stopChildRunnables () |
Protected Attributes inherited from SWE4211RPi::RunnableClass | |
| std::thread * | myThread = NULL |
| pthread_t | executingThread = 0 |
| pid_t | myOSThreadID = 0 |
| std::string | myName |
| std::atomic< bool > | keepGoing {true} |
| std::atomic< bool > | runCompleted {false} |
| std::atomic< bool > | runStarted {false} |
| int | priority = -1 |
Static Protected Attributes inherited from SWE4211RPi::RunnableClass | |
| static std::list< RunnableClass * > | runningThreads |
Prints connection and direction status reports from its queue to the console.
| StatusDisplay::StatusDisplay | ( | std::string | threadName | ) |
This is the default constructor. The status display reads from the ONBOARD_STATUS_DISPLAY_INTERNAL_QUEUE_ID queue.
| threadName | This is the name of the thread that is running. |
This is the default constructor.
| threadName | This is the name of the thread that is running. |
|
private |
This private method will process and handle all heartbeat messages sent to this component.
| commandToProcess | This is the command that was received and is to be processed. |
This private method will process and handle all heartbeat messages sent to this component. A ping request is answered by enqueuing a response on the heartbeat queue.
| commandToProcess | This is the command that was received and is to be processed. |


|
private |
This private method will process and handle all broadcast messages sent to this component.
| commandToProcess | This is the command that was received and is to be processed. |
This private method will process and handle all broadcast messages sent to this component. A shutdown command stops the thread.
| commandToProcess | This is the command that was received and is to be processed. |


|
private |
This private method will process and handle all status messages sent to this component.
| commandToProcess | This is the command that was received and is to be processed. |
This private method will process and handle all status messages sent to this component. Connection reports are printed as an IP address (or a disconnection notice), and direction reports are printed as the names of the direction bits that are set.
| commandToProcess | This is the command that was received and is to be processed. |
If the parameter is not zero.
Separate out the ip address into its 4-tuple representation, each of which is an 8 bit unsigned value.
Print out that a connection has been obtained from the given IP address, showing each of the 4-tuples in an a.b.c.d format.
Otherwise, if the parameter is zero, indicate the network has been disconnected from.

|
virtual |
This is the run method. It blocks on the status display queue and processes each message until a shutdown broadcast is received.
1.0 Loop so long as the thread is to continue running (i.e. a call to stop on this class has not occurred.)
1.1.0 Dequeue the next command from the queue.
1.2.0 If the command is a broadcast message, process it. A shutdown command will shut down the thread.
1.3.0 Otherwise, if the command is a status report, process it. 1.4.0 Otherwise, if the command is a heartbeat message, process it.
Implements SWE4211RPi::RunnableClass.
