29 static constexpr std::string_view
name =
"OffsetX";
37 static constexpr std::string_view
name =
"Width";
45 static constexpr std::string_view
name =
"OffsetY";
53 static constexpr std::string_view
name =
"Height";
63template<
typename AssignmentCameraImageAttribute>
66 static constexpr std::string_view
name = AssignmentCameraImageAttribute::name;
86 auto&
cam =
ctx->app.camera();
88 std::vector<out_message_t>
result;
Main server application managing client connections and camera streaming.
Base handler templates for protocol message processing.
Base handler template for assigning a camera image region parameter.
std::vector< out_message_t > process(IRSOL_MAYBE_UNUSED std::shared_ptr< irsol::server::ClientSession > session, protocol::Assignment &&message) final override
Processes an assignment message to set the camera image parameter.
static constexpr std::string_view name
AssignmentImgHandlerBase(std::shared_ptr< Context > ctx)
Constructs the handler.
Generic handler base class for protocol messages.
std::shared_ptr< Context > ctx
Handler context (provides access to app and utilities).
Common portability and diagnostic macros for the irsol library.
#define IRSOL_MAYBE_UNUSED
Suppresses compiler warnings about unused variables or parameters.
constexpr auto makeHandler(std::shared_ptr< Context > ctx, Args &&... args)
Constructs a handler instance of the given type.
std::variant< int, double, std::string > protocol_value_t
Variant type representing protocol values that can be one of several types.
int toInt(const irsol::types::protocol_value_t &x)
Converts a protocol value to an integer.
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.
Tag type for the camera image height parameter ("Height").
static constexpr std::string_view name
Tag type for the camera image left offset parameter ("OffsetX").
static constexpr std::string_view name
Tag type for the camera image top offset parameter ("OffsetY").
static constexpr std::string_view name
Tag type for the camera image width parameter ("Width").
static constexpr std::string_view name
Core type definitions for networking, time handling, and protocol values used throughout the irsol li...
General utility functions used throughout the irsol library.