loosely-coupled-dss/inputs.cc
2021-05-05 16:42:11 +02:00

14 lines
No EOL
431 B
C++

#include "inputs.hpp"
Inputs::Inputs(std::string node_name){
FILE* input_file = fopen(INPUTS_FILE, "rb");
char input_file_buffer[65536];
rapidjson::FileReadStream is(input_file, input_file_buffer, sizeof(input_file_buffer));
d.ParseStream(is);
fclose(input_file);
wake_duration=d[node_name.c_str()]["wake_duration"].GetDouble();
wake_interval=d[node_name.c_str()]["wake_interval"].GetDouble();
}