IRSOL
C++ code implementing socket server for interacting with Baumer camera.
inquiry_frame_rate.cpp
Go to the documentation of this file.
2
3#include "irsol/macros.hpp"
4#include "irsol/protocol.hpp"
6
7namespace irsol {
8namespace server {
9namespace handlers {
10
13
14std::vector<out_message_t>
16 IRSOL_MAYBE_UNUSED std::shared_ptr<irsol::server::ClientSession> session,
18{
19 auto& frameListeningState = session->userData().frameListeningState;
20 auto frameRate = frameListeningState.gisParams.frameRate;
21
22 std::vector<out_message_t> result;
23 result.emplace_back(
25 return result;
26}
27
28} // namespace handlers
29} // namespace server
30} // namespace irsol
Main server application managing client connections and camera streaming.
std::vector< out_message_t > process(std::shared_ptr< irsol::server::ClientSession > session, protocol::Inquiry &&message) final override
Processes an inquiry message to retrieve the current frame rate.
InquiryFrameRateHandler(std::shared_ptr< Context > ctx)
Constructs the InquiryFrameRateHandler.
Generic handler base class for protocol messages.
Definition base.hpp:39
Declaration of the InquiryFrameRateHandler class.
Common portability and diagnostic macros for the irsol library.
#define IRSOL_MAYBE_UNUSED
Suppresses compiler warnings about unused variables or parameters.
Definition macros.hpp:39
constexpr auto makeHandler(std::shared_ptr< Context > ctx, Args &&... args)
Constructs a handler instance of the given type.
Definition factory.hpp:28
std::variant< int, double, std::string > protocol_value_t
Variant type representing protocol values that can be one of several types.
Definition types.hpp:150
Represents a value inquiry in the protocol.
Definition inquiry.hpp:32
static Success from(const Assignment &msg, std::optional< irsol::types::protocol_value_t > overrideValue=std::nullopt)
Creates a success message from an Assignment.
Definition success.hpp:75
auto result