HORIBA C++ SDK
Library for HORIBA devices
Loading...
Searching...
No Matches
command.h
Go to the documentation of this file.
1#ifndef COMMAND_H
2#define COMMAND_H
3
4#include <atomic>
5#include <memory>
6#include <nlohmann/json.hpp>
7#include <string>
8
13class Command {
14 public:
21 explicit Command(std::string command, nlohmann::json parameters = {});
22
28 [[nodiscard]] nlohmann::json json() const;
29
30 private:
31 static std::atomic<unsigned long long int> next_id;
32 unsigned long long int id;
33 std::string command;
34 nlohmann::json parameters;
35};
36} /* namespace horiba::communication */
37#endif /* ifndef COMMAND_H */
nlohmann::json json() const
JSON representation of the command.
Command(std::string command, nlohmann::json parameters={})
Builds a command based on the command string and json parameters.
Definition command.h:9