2020-05-05 09:42:02 +00:00
|
|
|
#ifndef CORE_CONTANTS_H
|
|
|
|
#define CORE_CONTANTS_H
|
|
|
|
|
|
|
|
#define SECONDS_PER_DAY 86400 // 60 * 60 * 24
|
|
|
|
|
|
|
|
#define SECONDS_PER_MINUTE 60
|
|
|
|
|
|
|
|
#define POLL_FDS_COUNT 2
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @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 Maximum number of dbs for the databases for the MDB_env
|
|
|
|
*
|
|
|
|
* Used when calling mdb_env_set_maxdbs() in database_setup()
|
|
|
|
*/
|
|
|
|
#define MDB_MAXDBS 8
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief How many milli seconds to wait until poll timeout in main loop
|
|
|
|
*/
|
|
|
|
#define ACCEPT_TIMEOUT_MSECONDS 1000
|
|
|
|
|
|
|
|
#define PIFACE_GPIO_BASE 200
|
|
|
|
|
2020-05-05 20:29:04 +00:00
|
|
|
#define STANDARD_HEADERS "Access-Control-Allow-Origin: *"
|
|
|
|
|
2020-05-05 09:42:02 +00:00
|
|
|
#endif /* CORE_CONTANTS_H */
|