57 lines
1.1 KiB
C
57 lines
1.1 KiB
C
|
#ifndef CORE_ENUMS_H
|
||
|
#define CORE_ENUMS_H
|
||
|
|
||
|
typedef enum
|
||
|
{
|
||
|
POLL_FDS_DISCOVERY,
|
||
|
POLL_FDS_COMMAND
|
||
|
} poll_fds_t;
|
||
|
|
||
|
typedef enum
|
||
|
{
|
||
|
COMMAND_MAPPING_CODE = 0,
|
||
|
COMMAND_MAPPING_NAME = 1,
|
||
|
COMMAND_MAPPING_RELAY_NUM = 2,
|
||
|
COMMAND_MAPPING_SCHEDULES_ARRAY = 3,
|
||
|
COMMAND_MAPPING_SCHEDULE_ID = 4,
|
||
|
COMMAND_MAPPING_PERIODS_COUNT = 5,
|
||
|
COMMAND_MAPPING_PERIODS_BLOB = 6,
|
||
|
} control_mapping_t;
|
||
|
|
||
|
typedef enum
|
||
|
{
|
||
|
COMMAND_CODE_GET_TIME = 1,
|
||
|
COMMAND_CODE_GET_ID = 2,
|
||
|
COMMAND_CODE_SET_NAME = 100,
|
||
|
COMMAND_CODE_GET_NAME = 101,
|
||
|
COMMAND_CODE_SET_SCHEDULE = 102,
|
||
|
COMMAND_CODE_GET_SCHEDULE = 103,
|
||
|
COMMAND_CODE_SET_RELAY_NAME = 104,
|
||
|
COMMAND_CODE_GET_RELAY_NAME = 105,
|
||
|
} command_code_t;
|
||
|
|
||
|
typedef enum
|
||
|
{
|
||
|
RELAY_DRIVER_NONE,
|
||
|
RELAY_DRIVER_GPIO,
|
||
|
RELAY_DRIVER_PIFACE,
|
||
|
} relay_driver_t;
|
||
|
|
||
|
typedef enum
|
||
|
{
|
||
|
RUN_TYPE_START,
|
||
|
RUN_TYPE_TEST,
|
||
|
} run_type_t;
|
||
|
|
||
|
typedef enum
|
||
|
{
|
||
|
LOG_LEVEL_TRACE = 5,
|
||
|
LOG_LEVEL_DEBUG = 4,
|
||
|
LOG_LEVEL_INFO = 3,
|
||
|
LOG_LEVEL_WARN = 2,
|
||
|
LOG_LEVEL_ERROR = 1,
|
||
|
LOG_LEVEL_FATAL = 0,
|
||
|
} log_level_t;
|
||
|
|
||
|
#endif /* CORE_ENUMS_H */
|