MOVE_AI/src/component/plotter.hpp
2026-02-28 15:25:24 +08:00

29 lines
476 B
C++

#ifndef COMPONENT__PLOTTER_HPP
#define COMPONENT__PLOTTER_HPP
#include <netinet/in.h> // sockaddr_in
#include <mutex>
#include <nlohmann/json.hpp>
#include <string>
namespace component
{
class Plotter
{
public:
Plotter(std::string host = "127.0.0.1", uint16_t port = 9870);
~Plotter();
void plot(const nlohmann::json & json);
private:
int socket_;
sockaddr_in destination_;
std::mutex mutex_;
};
} // namespace component
#endif // COMPONENT__PLOTTER_HPP