HORIBA C++ SDK
Library for HORIBA devices
Loading...
Searching...
No Matches
horiba::communication::Response Class Reference

Represents a response of the ICL. More...

#include <response.h>

Public Member Functions

 Response (unsigned long long int id, std::string command, nlohmann::json::object_t results, std::vector< std::string > errors)
 Builds a response of the ICL.
 
nlohmann::json json_results () const
 JSON representation of the "results" field of the response.
 
std::vector< std::string > errors () const
 Errors, if any, from the ICL.
 

Detailed Description

Represents a response of the ICL.

Constructor & Destructor Documentation

◆ Response()

horiba::communication::Response::Response ( unsigned long long int id,
std::string command,
nlohmann::json::object_t results,
std::vector< std::string > errors )

Builds a response of the ICL.

Parameters
idThe id of the sent command
commandThe sent command
resultsThe results, if any, of the command
errorsThe errors, if any, of the command

Member Function Documentation

◆ errors()

std::vector< std::string > horiba::communication::Response::errors ( ) const
nodiscard

Errors, if any, from the ICL.

Returns
Errors happened during the call to the ICL

◆ json_results()

nlohmann::json horiba::communication::Response::json_results ( ) const
nodiscard

JSON representation of the "results" field of the response.

Returns
JSON of response["results"]

The documentation for this class was generated from the following file: