HORIBA C++ SDK
Library for HORIBA devices
Loading...
Searching...
No Matches
response.h
Go to the documentation of this file.
1#ifndef RESPONSE_H
2#define RESPONSE_H
3
4#include <any>
5#include <nlohmann/json.hpp>
6#include <string>
7#include <vector>
8
9namespace horiba::communication {
13class Response {
14 public:
23 Response(unsigned long long int id, std::string command,
24 nlohmann::json::object_t results, std::vector<std::string> errors);
25
31 [[nodiscard]] nlohmann::json json_results() const;
32
38 [[nodiscard]] std::vector<std::string> errors() const;
39
40 private:
41 unsigned long long int id;
42 std::string command;
43 nlohmann::json::object_t results;
44 std::vector<std::string> icl_errors;
45};
46} /* namespace horiba::communication */
47#endif /* ifndef RESPONSE_H */
std::vector< std::string > errors() const
Errors, if any, from the ICL.
nlohmann::json json_results() const
JSON representation of the "results" field of the 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.
Definition command.h:9