IRSOL
C++ code implementing socket server for interacting with Baumer camera.
irsol::types Namespace Reference

Contains fundamental type aliases used throughout the irsol library. More...

Typedefs

Server-related Types

Type aliases for server networking components.

using port_t = uint16_t
 Represents a network port number. Typically used to specify TCP or UDP ports.
 
using client_id_t = std::string
 Represents a unique client identifier. Typically used to identify connected clients by string IDs.
 
using acceptor_t = sockpp::tcp_acceptor
 Alias for the TCP server socket acceptor type.
 
using connector_t = sockpp::tcp_connector
 Alias for the TCP client connector type.
 
using inet_address_t = sockpp::inet_address
 Alias for an IPv4/IPv6 internet address.
 
using socket_t = sockpp::tcp_socket
 Alias for a TCP socket.
 
using connection_result_t = sockpp::result<>
 Result type representing success or failure of a socket operation.
 
Time-related Types

Type aliases related to steady clock time points and durations.

using clock_t = std::chrono::steady_clock
 Alias for the steady clock type used throughout the library.
 
using timepoint_t = clock_t::time_point
 Alias for a point in time as defined by clock_t.
 
using duration_t = clock_t::duration
 Alias for a duration of time as defined by clock_t.
 
Protocol-related Types

Variant types representing values in the communication protocol.

using protocol_value_t = std::variant< int, double, std::string >
 Variant type representing protocol values that can be one of several types.
 
Serialization-related Types
using byte_t = std::byte
 Alias for a single byte used in serialization or binary data handling.
 

Detailed Description

Contains fundamental type aliases used throughout the irsol library.

The types namespace centralizes definitions for:

  • Server networking primitives (e.g., sockets, acceptors, client identifiers).
  • Time-related types for steady clock timing and durations.
  • Protocol-related variant types representing protocol values.
  • Serialization byte type.

This organization promotes consistency and code clarity.

Typedef Documentation

◆ acceptor_t

Alias for the TCP server socket acceptor type.

Uses sockpp::tcp_acceptor to listen for incoming TCP connection requests.

Definition at line 63 of file types.hpp.

◆ byte_t

Alias for a single byte used in serialization or binary data handling.

Uses std::byte from the C++ standard library for type-safe byte representation.

Definition at line 165 of file types.hpp.

◆ client_id_t

Represents a unique client identifier. Typically used to identify connected clients by string IDs.

Definition at line 55 of file types.hpp.

◆ clock_t

Alias for the steady clock type used throughout the library.

Steady clock provides monotonic time measurement to avoid issues with system clock changes.

Definition at line 112 of file types.hpp.

◆ connection_result_t

Result type representing success or failure of a socket operation.

Uses sockpp::result<> to encapsulate operation outcomes.

Definition at line 95 of file types.hpp.

◆ connector_t

Alias for the TCP client connector type.

Uses sockpp::tcp_connector to initiate outbound TCP connections.

Definition at line 71 of file types.hpp.

◆ duration_t

Alias for a duration of time as defined by clock_t.

Represents an elapsed time interval.

Definition at line 128 of file types.hpp.

◆ inet_address_t

Alias for an IPv4/IPv6 internet address.

Uses sockpp::inet_address for IP address representation.

Definition at line 79 of file types.hpp.

◆ port_t

Represents a network port number. Typically used to specify TCP or UDP ports.

Definition at line 48 of file types.hpp.

◆ protocol_value_t

Variant type representing protocol values that can be one of several types.

Used to store protocol fields flexibly, supporting:

  • int for integer values,
  • double for floating-point values,
  • std::string for textual values.
See also
irsol::protocol::Assignment
irsol::protocol::Parser::parseValue

Definition at line 150 of file types.hpp.

◆ socket_t

Alias for a TCP socket.

Uses sockpp::tcp_socket for bidirectional TCP communication.

Definition at line 87 of file types.hpp.

◆ timepoint_t

Alias for a point in time as defined by clock_t.

Represents a timestamp or moment in steady clock time.

Definition at line 120 of file types.hpp.