aboutsummaryrefslogtreecommitdiff
path: root/inputs.cc
blob: 1f90ab662a0d5b2e4a9d656a39848d1941cbdec4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#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();
}