diff options
| author | Loic Guegan <manzerbredes@mailbox.org> | 2021-05-05 16:42:11 +0200 |
|---|---|---|
| committer | Loic Guegan <manzerbredes@mailbox.org> | 2021-05-05 16:42:11 +0200 |
| commit | f0208cbc865822057196de77054163dbade48581 (patch) | |
| tree | d6813d3dc122314014c18d56c4ade14d363129c0 /inputs.cc | |
Create simulator
Diffstat (limited to 'inputs.cc')
| -rw-r--r-- | inputs.cc | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/inputs.cc b/inputs.cc new file mode 100644 index 0000000..1f90ab6 --- /dev/null +++ b/inputs.cc @@ -0,0 +1,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(); +}
\ No newline at end of file |
