47 std::optional<irsol::types::protocol_value_t>
body{};
77 std::optional<irsol::types::protocol_value_t> overrideValue = std::nullopt)
82 overrideValue.has_value() ? overrideValue : std::make_optional(
msg.value));
126 std::optional<irsol::types::protocol_value_t>
body = std::nullopt);
InMessageKind
Represents the type of an incoming message.
Common portability and diagnostic macros for the irsol library.
std::variant< int, double, std::string > protocol_value_t
Variant type representing protocol values that can be one of several types.
Represents an assignment operation in the protocol.
Represents a command invocation in the protocol.
Represents a value inquiry in the protocol.
Represents a success response message from the server.
static Success from(const Assignment &msg, std::optional< irsol::types::protocol_value_t > overrideValue=std::nullopt)
Creates a success message from an Assignment.
std::string identifier
The identifier associated with the success response.
static Success asStatus(const std::string &identifier, irsol::types::protocol_value_t value)
Creates a standalone status message with a value.
static Success from(const Command &msg)
Creates a success message from a Command.
std::string toString() const
Converts the success message to a human-readable string.
std::optional< irsol::types::protocol_value_t > body
Optional result or data associated with the response.
InMessageKind source
The kind of the incoming message that triggered this response.
static Success from(const Inquiry &msg, irsol::types::protocol_value_t result)
Creates a success message from an Inquiry.
Template metaprogramming traits for type introspection in the irsol library.
Core type definitions for networking, time handling, and protocol values used throughout the irsol li...
Definitions and utilities for incoming and outgoing protocol messages.