IRSOL
C++ code implementing socket server for interacting with Baumer camera.
irsol::server::handlers::InquiryInputSequenceLengthHandler Class Reference

Handler for inquiry of the input sequence length parameter. More...

#include <inquiry_input_sequence_length.hpp>

Inheritance diagram for irsol::server::handlers::InquiryInputSequenceLengthHandler:
irsol::server::handlers::internal::HandlerBase< T, >

Public Member Functions

 InquiryInputSequenceLengthHandler (std::shared_ptr< Context > ctx)
 Constructs the InquiryInputSequenceLengthHandler.
 
- Public Member Functions inherited from irsol::server::handlers::internal::HandlerBase< T, >
virtual std::vector< out_message_toperator() (const irsol::types::client_id_t &clientId, T &&message)
 Invokes the handler for a given client and message.
 

Protected Member Functions

std::vector< out_message_tprocess (std::shared_ptr< irsol::server::ClientSession > session, protocol::Inquiry &&message) final override
 Processes an inquiry message to retrieve the input sequence length.
 
- Protected Member Functions inherited from irsol::server::handlers::internal::HandlerBase< T, >
 HandlerBase (std::shared_ptr< Context > ctx)
 Constructs the handler base.
 
virtual std::vector< out_message_tprocess (std::shared_ptr< irsol::server::ClientSession > session, T &&message)=0
 Processes the protocol message for the given session.
 

Additional Inherited Members

- Protected Attributes inherited from irsol::server::handlers::internal::HandlerBase< T, >
std::shared_ptr< Contextctx
 Handler context (provides access to app and utilities).
 

Detailed Description

Handler for inquiry of the input sequence length parameter.

Processes inquiry messages to retrieve the current input sequence length setting.

Definition at line 24 of file inquiry_input_sequence_length.hpp.

Constructor & Destructor Documentation

◆ InquiryInputSequenceLengthHandler()

irsol::server::handlers::InquiryInputSequenceLengthHandler::InquiryInputSequenceLengthHandler ( std::shared_ptr< Context ctx)

Constructs the InquiryInputSequenceLengthHandler.

Parameters
ctxHandler context.

Definition at line 9 of file inquiry_input_sequence_length.cpp.

11{}
std::shared_ptr< Context > ctx
Handler context (provides access to app and utilities).
Definition base.hpp:81
internal::HandlerBase< protocol::Inquiry > InquiryHandler
Handler type for inquiry messages.
Definition base.hpp:92

Member Function Documentation

◆ process()

std::vector< out_message_t > irsol::server::handlers::InquiryInputSequenceLengthHandler::process ( std::shared_ptr< irsol::server::ClientSession session,
protocol::Inquiry &&  message 
)
finaloverrideprotected

Processes an inquiry message to retrieve the input sequence length.

Parameters
sessionThe client session.
messageThe inquiry message.
Returns
Vector of outbound messages containing the input sequence length.

Definition at line 14 of file inquiry_input_sequence_length.cpp.

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}
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
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

The documentation for this class was generated from the following files: