![]() |
IRSOL
C++ code implementing socket server for interacting with Baumer camera.
|
Example client that sends gis
(get images) commands to the camera server.
More...
#include "irsol/args.hpp"
#include "irsol/irsol.hpp"
#include <atomic>
#include <csignal>
#include <opencv2/opencv.hpp>
#include <optional>
#include <regex>
Go to the source code of this file.
Functions | |
void | signalHandler (int signal) |
bool | configureGis (irsol::types::connector_t &conn, double fps, uint64_t isl) |
std::optional< std::vector< std::pair< size_t, cv::Mat > > > | queryImages (irsol::types::connector_t &conn) |
std::optional< irsol::types::connector_t > | createConnectionWithRetry (const std::string &host, irsol::types::port_t port, std::chrono::seconds retryTimeout=std::chrono::seconds(1)) |
void | run (double inFps, uint64_t sequenceLength) |
int | main (int argc, char **argv) |
Variables | |
std::atomic< bool > | g_terminate {false} |
Example client that sends gis
(get images) commands to the camera server.
This executable connects to the camera server and requests a stream of images using the gis
command, specifying the desired frame rate and sequence length. Each received image is displayed using OpenCV, with annotations for image ID and index.
Command-line options: -f, –fps <fps> Set the requested stream FPS (default: 0.5 FPS) -i, –isl <isl> Set the input sequence length (default: 10)
Usage: ./06-client-server-interaction-image-commands-viewer-gis [-f <fps>] [-i <isl>]
The client can be interrupted with Ctrl+C or by pressing 'q' in the OpenCV window. All logging is written to logs/viewer-client-gis.log.
Definition in file viewer_client_gis.cpp.
bool configureGis | ( | irsol::types::connector_t & | conn, |
double | fps, | ||
uint64_t | isl | ||
) |
Definition at line 43 of file viewer_client_gis.cpp.
std::optional< irsol::types::connector_t > createConnectionWithRetry | ( | const std::string & | host, |
irsol::types::port_t | port, | ||
std::chrono::seconds | retryTimeout = std::chrono::seconds(1) |
||
) |
Definition at line 222 of file viewer_client_gis.cpp.
int main | ( | int | argc, |
char ** | argv | ||
) |
Definition at line 357 of file viewer_client_gis.cpp.
std::optional< std::vector< std::pair< size_t, cv::Mat > > > queryImages | ( | irsol::types::connector_t & | conn | ) |
Definition at line 95 of file viewer_client_gis.cpp.
void run | ( | double | inFps, |
uint64_t | sequenceLength | ||
) |
Definition at line 247 of file viewer_client_gis.cpp.
void signalHandler | ( | int | signal | ) |
Definition at line 34 of file viewer_client_gis.cpp.
std::atomic<bool> g_terminate {false} |
Definition at line 30 of file viewer_client_gis.cpp.