-
Notifications
You must be signed in to change notification settings - Fork 0
/
parse_config.h
40 lines (34 loc) · 896 Bytes
/
parse_config.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
/* parse_config.h */
#ifndef PARSE_CONFIG_H
#define PARSE_CONFIG_H
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "ini.h"
typedef struct
{
const char* ip;
int controlport;
} server_config;
typedef struct
{
const char* name;
const char* outputprotocol; /* TCP or UDP */
const char* inputprotocol; /* USB or RS232 */
int commandport; /* for direct control */
int outputport;
int outputfreq;
char *serial_device;
int baud_rate;
int bits;
int parity;
int stop_bit;
} device_config;
extern server_config s_config;
extern device_config ire_config;
extern device_config kt15_config;
static int s_handler(void*, const char*, const char*, const char*);
static int kt15_handler(void*, const char*, const char*, const char*);
static int ire_handler(void*, const char*, const char*, const char*);
int read_config(void);
#endif