2020-02-23 00:13:27 +00:00
|
|
|
#ifndef CONTROLLER_ENUMS_H
|
|
|
|
#define CONTROLLER_ENUMS_H
|
|
|
|
|
2020-04-16 23:38:25 +00:00
|
|
|
typedef enum
|
2020-04-13 22:50:55 +00:00
|
|
|
{
|
2020-04-16 19:19:56 +00:00
|
|
|
POLL_FDS_DISCOVERY,
|
|
|
|
POLL_FDS_COMMAND
|
2020-04-16 23:38:25 +00:00
|
|
|
} poll_fds_t;
|
2020-04-13 22:50:55 +00:00
|
|
|
|
2020-04-16 23:38:25 +00:00
|
|
|
typedef enum
|
2020-04-13 22:50:55 +00:00
|
|
|
{
|
|
|
|
DISCOVERY_MAPPING_ID = 0,
|
|
|
|
DISCOVERY_MAPPING_NAME = 1,
|
|
|
|
DISCOVERY_MAPPING_COMMAND_PORT = 2,
|
|
|
|
DISCOVERY_MAPPING_RELAY_COUNT = 3,
|
2020-04-16 23:38:25 +00:00
|
|
|
} discovery_mapping_t;
|
2020-04-13 22:50:55 +00:00
|
|
|
|
2020-04-16 23:38:25 +00:00
|
|
|
typedef enum
|
2020-04-13 22:50:55 +00:00
|
|
|
{
|
|
|
|
COMMAND_MAPPING_CODE = 0,
|
|
|
|
COMMAND_MAPPING_NAME = 1,
|
|
|
|
COMMAND_MAPPING_RELAY_NUM = 2,
|
|
|
|
COMMAND_MAPPING_SCHEDULE_ID = 3,
|
|
|
|
COMMAND_MAPPING_PERIODS_COUNT = 4,
|
|
|
|
COMMAND_MAPPING_PERIODS_BLOB = 5,
|
2020-04-16 23:38:25 +00:00
|
|
|
} control_mapping_t;
|
2020-04-13 22:50:55 +00:00
|
|
|
|
2020-04-16 23:38:25 +00:00
|
|
|
typedef enum
|
2020-04-13 22:50:55 +00:00
|
|
|
{
|
|
|
|
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,
|
2020-04-16 23:38:25 +00:00
|
|
|
} command_code_t;
|
|
|
|
|
|
|
|
typedef enum
|
|
|
|
{
|
|
|
|
RELAY_DRIVER_NONE = 0,
|
|
|
|
RELAY_DRIVER_GPIO = 1,
|
|
|
|
RELAY_DRIVER_PIFACE = 2,
|
|
|
|
} relay_driver_t;
|
2020-02-23 00:13:27 +00:00
|
|
|
|
|
|
|
#endif /* CONTROLLER_ENUMS_H */
|