Add configuration file to read CLASS parameters

This commit changes the parameters reading. It introduces
getopt to read input parameters from command line and it
uses a configuration yaml file to read the input parameters
for the network, the map and the cameras.

This commit fixes a bug in message sending to the aggregator.

Signed-off-by: Davide Sapienza <sapienza.dav@gmail.com>
This commit is contained in:
Davide Sapienza
2019-10-15 09:59:39 +02:00
parent 35787cc771
commit d5ae26dfef
3 changed files with 208 additions and 94 deletions
+21
View File
@@ -0,0 +1,21 @@
#ifndef CONFIGURATION_H
#define CONFIGURATION_H
#include "cameraUtils.h"
#include <iostream>
#include <cstring>
#include <yaml-cpp/yaml.h>
struct Parameters_t
{
char *net;
char *tiffile;
int n_cameras;
Camera_t *cameras;
};
void readCamerasParametersYaml(const std::string &camerasParams, Parameters_t *par);
bool read_parameters(int argc, char *argv[], Parameters_t *par);
#endif /*CONFIGURATION_H*/