10 std::shared_ptr<Context> ctx)
14std::vector<out_message_t>
16 std::shared_ptr<irsol::server::ClientSession>
session,
19 auto& frameListeningState =
session->userData().frameListeningState;
20 if(frameListeningState.running()) {
22 session->id(),
"Session is already listening to frames. Cannot set a inputSequenceLength.");
23 std::vector<out_message_t>
result;
25 message,
"Session is already listening to frames. Cannot set a inputSequenceLength."));
29 if(inputSequenceLength <= 0) {
31 session->id(),
"inputSequenceLength ({}) must be positive.", inputSequenceLength);
32 std::vector<out_message_t>
result;
39 frameListeningState.gisParams.inputSequenceLength =
static_cast<uint64_t>(inputSequenceLength);
40 std::vector<out_message_t>
result;
Generic handler base class for protocol messages.
#define IRSOL_NAMED_LOG_INFO(name,...)
Logs an info-level message using a named logger.
#define IRSOL_NAMED_LOG_WARN(name,...)
Logs a warning-level message using a named logger.
constexpr auto makeHandler(std::shared_ptr< Context > ctx, Args &&... args)
Constructs a handler instance of the given type.
int toInt(const irsol::types::protocol_value_t &x)
Converts a protocol value to an integer.
Declaration of the ClientSession class.
Represents an assignment operation in the protocol.
static Error from(const T &msg, const std::string &description)
Creates an error from a specific incoming message type.
static Success from(const Assignment &msg, std::optional< irsol::types::protocol_value_t > overrideValue=std::nullopt)
Creates a success message from an Assignment.
General utility functions used throughout the irsol library.