|
PiImageStreamer
|
#include "AbstractImageCapturer.h"#include "PeriodicTask.h"#include "NewCamera.h"#include "AbstractImageTransmitter.h"#include <chrono>#include <iomanip>#include <csignal>#include <unistd.h>#include <time.h>
Macros | |
| #define | CONSOLE_PRINTOUT_ENABLED 1 |
Functions | |
| static void | resetTerminalOnSignal (int sig) |
This code is developed as part of the MSOE SWE4211 Real Time Systems course, but can be freely used by others.
SWE4211 Real Time Systems is a required course for students studying the discipline of software engineering.
This Software is provided under the License on an "AS IS" basis and without warranties of any kind concerning the Software, including without limitation merchantability, fitness for a particular purpose, absence of defects or errors, accuracy, and non-infringement of intellectual property rights other than copyright. This disclaimer of warranty is an essential part of the License and a condition for the grant of any rights to this Software.
This file implements the shared behavior of the abstract image capturer: managing the overlays, measuring the thread's CPU time, resetting the metrics when a new connection starts, and printing the metrics to the console.
| #define CONSOLE_PRINTOUT_ENABLED 1 |
This enables (1) or disables (0) printing the timing table to the console. The metrics are still collected when it is disabled.
|
static |
This signal handler restores normal terminal scrolling and moves the cursor to the bottom row when the program is interrupted (i.e. Ctrl-C), then terminates the program as the signal normally would.
| sig | This is the signal that was received. |
