14std::vector<out_message_t>
16 std::shared_ptr<irsol::server::ClientSession>
session,
23 "Expected integer/double for integration time, got type {}: '{}'",
24 message.hasString() ?
"<string>" :
"<unknown>",
38 "Setting camera integration time to {}",
44 1.0 * std::chrono::duration_cast<std::chrono::microseconds>(
resultingExposure).count() / 1000);
Main server application managing client connections and camera streaming.
Declaration of the AssignmentIntegrationTimeHandler class.
std::vector< out_message_t > process(std::shared_ptr< irsol::server::ClientSession > session, protocol::Assignment &&message) final override
Processes an assignment message to set the integration time.
AssignmentIntegrationTimeHandler(std::shared_ptr< Context > ctx)
Constructs the AssignmentIntegrationTimeHandler.
Generic handler base class for protocol messages.
std::shared_ptr< Context > ctx
Handler context (provides access to app and utilities).
#define IRSOL_ASSERT_ERROR
Error-level assertion macro.
#define IRSOL_NAMED_LOG_INFO(name,...)
Logs an info-level message using a named logger.
#define IRSOL_NAMED_LOG_ERROR(name,...)
Logs an error-level message using a named logger.
constexpr auto makeHandler(std::shared_ptr< Context > ctx, Args &&... args)
Constructs a handler instance of the given type.
clock_t::duration duration_t
Alias for a duration of time as defined by clock_t.
double toDouble(const irsol::types::protocol_value_t &x)
Converts a protocol value to a double.
int toInt(const irsol::types::protocol_value_t &x)
Converts a protocol value to an integer.
std::string durationToString(irsol::types::duration_t dr)
Converts a duration to a human-readable string.
Declaration of the ClientSession class.
Represents an assignment operation in the protocol.
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.