controller-legacy/include/constants.h

33 lines
884 B
C
Raw Permalink Normal View History

2020-04-16 23:38:25 +00:00
#ifndef CONTROLLER_CONTANTS_H
#define CONTROLLER_CONTANTS_H
2020-04-13 22:50:55 +00:00
#define SECONDS_PER_DAY 86400 // 60 * 60 * 24
#define SECONDS_PER_MINUTE 60
2020-04-16 19:19:56 +00:00
#define POLL_FDS_COUNT 2
2020-04-16 23:38:25 +00:00
/**
* @brief Limit the maximum length of a controller/relay/etc name
*
* The NULL terminator is not included. Arrays of length #MAX_NAME_LENGTH + 1 are required.
*/
#define MAX_NAME_LENGTH 128
/**
* @brief How many milli seconds to wait until poll timeout in main loop
*/
#define ACCEPT_TIMEOUT_MSECONDS 1000
#define PIFACE_GPIO_BASE 200
2020-11-21 23:56:01 +00:00
#define DEFAULT_CONTROLLER_NAME "emgauwa-controller"
#define DEFAULT_CONFIG_PATH "emgauwa-controller.conf"
#define DEFAULT_GLOBAL_CONFIG_PATH "/etc/emgauwa/controller.conf"
#define DEFAULT_DATABASE_PATH "emgauwa-controller.sqlite"
#define DEFAULT_DISCOVERY_PORT 4421
#define DEFAULT_MQTT_PORT 1885
#define DEFAULT_MQTT_HOST "127.0.0.1"
2020-04-16 23:38:25 +00:00
#endif /* CONTROLLER_CONTANTS_H */