15 cfg_opt_t destinationArea_opt[] =
17 CFG_INT(
"shape", 0, CFGF_NONE),
18 CFG_INT(
"geoAreaPosLatitude", 429416147, CFGF_NONE),
19 CFG_INT(
"geoAreaPosLongitude", 40636518, CFGF_NONE),
20 CFG_INT(
"distanceA", 500, CFGF_NONE),
21 CFG_INT(
"distanceB", 0, CFGF_NONE),
22 CFG_INT(
"angle", 0, CFGF_NONE),
28 CFG_INT(
"upperTesterListenPort", 4200, CFGF_NONE),
29 CFG_INT(
"upperTesterWritePort", 4201, CFGF_NONE),
30 CFG_INT(
"upperTesterEventIndicationListenPort", 4210, CFGF_NONE),
31 CFG_INT(
"upperTesterEventIndicationWritePort", 4211, CFGF_NONE),
32 CFG_SEC(
"destinationArea", destinationArea_opt, CFGF_NONE),
37 cfg_t *cfg_destinationArea;
39 cfg = cfg_init(opts, CFGF_NONE);
46 cfg_add_searchpath(cfg,
"/etc/its/config");
47 if(cfg_parse(cfg,
"upperTester.conf") == CFG_PARSE_ERROR)
48 printf(
"PARSE_ERROR\n");
55 cfg_destinationArea = cfg_getsec(cfg,
"destinationArea");
58 cfg_getint(cfg_destinationArea,
"geoAreaPosLatitude"),
59 cfg_getint(cfg_destinationArea,
"geoAreaPosLongitude"),
60 cfg_getint(cfg_destinationArea,
"distanceA"),
61 cfg_getint(cfg_destinationArea,
"distanceB"),
62 cfg_getint(cfg_destinationArea,
"angle")
71 printf(
"-----------------------------------------------------------------\n\t\tReadUpperTester\n\n");
int m_upperTesterEventIndicationListenPort
int validate_unsigned_int(cfg_t *cfg, cfg_opt_t *opt)
validate_unsigned_int Check if an option is an unsigned int
DestinationAreaData m_destinationArea
ParameterUpperTester()
ParameterUpperTester ParameterUpperTester constructor.
int m_upperTesterListenPort
void read()
read Configuration file reading.
void readDebug()
readDebug Configuration printing.
e_shape
The e_shape enum defines the shape types.
int m_upperTesterEventIndicationWritePort
ParameterUpperTester & operator=(const ParameterUpperTester &other)
operator= ParameterUpperTester affectation operator.
int m_upperTesterWritePort
UpperTester configuration.