IRSOL
C++ code implementing socket server for interacting with Baumer camera.
inquiry_input_sequence_length.cpp
Go to the documentation of this file.
2
4#include "irsol/utils.hpp"
5
6namespace irsol {
7namespace server {
8namespace handlers {
12
13std::vector<out_message_t>
15 std::shared_ptr<irsol::server::ClientSession> session,
17{
18
19 auto& frameListeningState = session->userData().frameListeningState;
20 auto inputSequenceLength = frameListeningState.gisParams.inputSequenceLength;
21
22 std::vector<out_message_t> result;
24 std::move(message), irsol::types::protocol_value_t{static_cast<int>(inputSequenceLength)}));
25 return result;
26}
27} // namespace handlers
28} // namespace server
29} // namespace irsol
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 input sequence length.
InquiryInputSequenceLengthHandler(std::shared_ptr< Context > ctx)
Constructs the InquiryInputSequenceLengthHandler.
Generic handler base class for protocol messages.
Definition base.hpp:39
Declaration of the InquiryInputSequenceLengthHandler class.
#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
Declaration of the ClientSession class.
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
General utility functions used throughout the irsol library.