IRSOL
C++ code implementing socket server for interacting with Baumer camera.
irsol::protocol::Inquiry Struct Reference

Represents a value inquiry in the protocol. More...

#include <inquiry.hpp>

Public Member Functions

 Inquiry (const std::string &identifier)
 Constructs an Inquiry.
 
std::string toString () const
 Converts the inquiry to a human-readable string.
 

Public Attributes

std::string identifier
 The identifier whose value is being requested.
 

Detailed Description

Represents a value inquiry in the protocol.

An inquiry consists of an identifier and is used to request the current value associated with that identifier. Typically corresponds to input like x?.

Can be stored in a irsol::protocol::InMessage variant.

Definition at line 31 of file inquiry.hpp.

Constructor & Destructor Documentation

◆ Inquiry()

irsol::protocol::Inquiry::Inquiry ( const std::string &  identifier)

Constructs an Inquiry.

Parameters
identifierThe identifier string; must start with a character and contain alphanumeric characters or underscores.

Definition at line 9 of file inquiry.cpp.

10{}
std::string validateIdentifier(const std::string &identifier)
Validate that a string is a valid protocol identifier.
Definition utils.hpp:55
std::string identifier
The identifier whose value is being requested.
Definition inquiry.hpp:41

Member Function Documentation

◆ toString()

std::string irsol::protocol::Inquiry::toString ( ) const

Converts the inquiry to a human-readable string.

Returns
A string representation of the inquiry.

Definition at line 13 of file inquiry.cpp.

14{
15 std::ostringstream oss;
16 oss << "Inquiry{"
17 << "identifier: '" << identifier << "'}";
18 return oss.str();
19}

Member Data Documentation

◆ identifier

std::string irsol::protocol::Inquiry::identifier

The identifier whose value is being requested.

Definition at line 41 of file inquiry.hpp.


The documentation for this struct was generated from the following files: