refactor(architecture): unify facade headers and remove unused lcd dependency
This commit is contained in:
37
components/control_plane/include/control_plane.h
Normal file
37
components/control_plane/include/control_plane.h
Normal file
@@ -0,0 +1,37 @@
|
||||
#pragma once
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#include "esp_err.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef enum {
|
||||
CONTROLLER_LIFECYCLE_STATE_STOPPED = 0,
|
||||
CONTROLLER_LIFECYCLE_STATE_STARTING,
|
||||
CONTROLLER_LIFECYCLE_STATE_RUNNING,
|
||||
CONTROLLER_LIFECYCLE_STATE_DEGRADED,
|
||||
CONTROLLER_LIFECYCLE_STATE_STOPPING,
|
||||
} controller_lifecycle_state_t;
|
||||
|
||||
typedef struct {
|
||||
controller_lifecycle_state_t state;
|
||||
esp_err_t last_error;
|
||||
uint32_t start_attempt;
|
||||
int64_t last_transition_ms;
|
||||
char last_stage[32];
|
||||
} controller_lifecycle_status_t;
|
||||
|
||||
esp_err_t controller_lifecycle_start(void);
|
||||
esp_err_t controller_lifecycle_stop(void);
|
||||
void controller_lifecycle_get_status(controller_lifecycle_status_t *out_status);
|
||||
const char *controller_lifecycle_state_str(controller_lifecycle_state_t state);
|
||||
|
||||
esp_err_t rest_server_start(void);
|
||||
void rest_server_stop(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
Reference in New Issue
Block a user