2020-09-03 22:28:49 +00:00
|
|
|
#ifndef CORE_MODELS_MACRO_ACTION_H
|
|
|
|
#define CORE_MODELS_MACRO_ACTION_H
|
|
|
|
|
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
int macro_id;
|
|
|
|
int relay_id;
|
|
|
|
int schedule_id;
|
|
|
|
uint8_t weekday;
|
|
|
|
} macro_action_t;
|
|
|
|
|
|
|
|
int
|
|
|
|
macro_action_insert(macro_action_t *macro_action);
|
|
|
|
|
2020-09-05 11:29:46 +00:00
|
|
|
int
|
|
|
|
macro_action_delete_for_macro(int macro_id);
|
|
|
|
|
2020-09-03 22:28:49 +00:00
|
|
|
macro_action_t**
|
|
|
|
macro_action_get_for_macro(int macro_id);
|
|
|
|
|
2024-04-16 21:07:30 +00:00
|
|
|
macro_action_t**
|
|
|
|
macro_action_get_for_macro_and_weekday(int macro_id, int weekday);
|
|
|
|
|
2020-09-06 11:12:33 +00:00
|
|
|
int
|
|
|
|
macro_action_execute(macro_action_t *macro_action);
|
|
|
|
|
2020-09-03 22:28:49 +00:00
|
|
|
void
|
|
|
|
macro_action_free_list(macro_action_t **macro_actions);
|
|
|
|
|
|
|
|
int*
|
|
|
|
macro_action_get_macro_ids_with_schedule(int schedule_id);
|
|
|
|
|
|
|
|
int*
|
|
|
|
macro_action_get_macro_ids_with_relay(int relay_id);
|
|
|
|
|
|
|
|
#endif /* CORE_MODELS_MACRO_ACTION_H */
|