Skip to content

Commit

Permalink
fix(docker): fix problematic <format> include
Browse files Browse the repository at this point in the history
  • Loading branch information
y4cer committed Jul 16, 2023
1 parent 41749c8 commit c27d840
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

#include <iostream>
#include <thread>
#include <format>

#include "grpc/key_value_service_client.h"
#include "snmp/SNMP_client.h"
Expand All @@ -27,12 +26,12 @@ void driver_generate(unsigned int rps, const std::string& ip,
grpc::CreateChannel(grpc_server_addr,
grpc::InsecureChannelCredentials()));
timer_start([&client, &ip, &sensor_name, &oid]() -> void {
std::string key = std::format("SNMP_{}_{}", sensor_name, ip);
std::string key = "SNMP_" + sensor_name + "_" + ip;
std::cout << "KEY: " << key << std::endl;
std::vector<std::string> resp =
SNMPClient(ip, "public").send_request(oid);
for (auto& str : resp) {
std::string val = std::format("{} = {}", oid, str);
std::string val = oid + " = " + str;
std::cout << "VALUE:" << val << std::endl;
std::cout << client.store_value(ip, str) << std::endl;
}} , interval);
Expand Down

0 comments on commit c27d840

Please sign in to comment.