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

Handler for inquiry of the current frame rate parameter. More...

#include <inquiry_frame_rate.hpp>

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

Public Member Functions

 InquiryFrameRateHandler (std::shared_ptr< Context > ctx)
 Constructs the InquiryFrameRateHandler.
 
- 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 current frame rate.
 
- 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 current frame rate parameter.

Processes inquiry messages to retrieve the current frame rate setting.

Definition at line 23 of file inquiry_frame_rate.hpp.

Constructor & Destructor Documentation

◆ InquiryFrameRateHandler()

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

Constructs the InquiryFrameRateHandler.

Parameters
ctxHandler context.

Definition at line 11 of file inquiry_frame_rate.cpp.

12{}
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::InquiryFrameRateHandler::process ( std::shared_ptr< irsol::server::ClientSession session,
protocol::Inquiry &&  message 
)
finaloverrideprotected

Processes an inquiry message to retrieve the current frame rate.

Parameters
sessionThe client session.
messageThe inquiry message.
Returns
Vector of outbound messages containing the frame rate.

Definition at line 15 of file inquiry_frame_rate.cpp.

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