76#ifndef RTE_APPMANAGER_H
77#define RTE_APPMANAGER_H
246 const char *(*get_name)(void);
255 const char *(*get_version)(void);
345#define RTE_APPMANAGER_CHECKPOINT_SIGNATURE_SEED ((uint64_t)0xFFFFFFFFFFFFFFFFULL)
412#define RTE_CHECKPOINT_MARK() rte_appmanager_checkpoint_mark(__FILE__, (int32_t)__LINE__, NULL)
420#define RTE_CHECKPOINT_MARK_LABEL(label_str) rte_appmanager_checkpoint_mark(__FILE__, (int32_t)__LINE__, (label_str))
void rte_appmanager_reset_state(void)
Forcibly resets the application manager's own bookkeeping (lifecycle state, iteration/error counters,...
rte_app_state_t
Application state enumeration.
uint32_t rte_appmanager_checkpoint_fold_signature(uint64_t signature)
Pure helper: folds a 64-bit checkpoint signature down to the uint32_t rte_checkpoint_config_t::checkp...
rte_status_t rte_appmanager_get_stats(rte_appmanager_state_t *state)
Get application statistics.
int rte_appmanager_run(const rte_appmanager_config_t *config)
Run application with lifecycle management.
void rte_appmanager_checkpoint_mark(const char *file, int32_t line, const char *label)
Folds a hash of this call site into the current cycle's checkpoint signature (ADR-034).
void rte_appmanager_request_shutdown(void)
Request application shutdown.
rte_status_t rte_appmanager_install_default_signal_handlers(void)
POSIX-only convenience: installs SIGINT and SIGTERM handlers that call rte_appmanager_request_shutdow...
rte_app_state_t rte_appmanager_get_state(void)
Get current application state.
@ RTE_APP_STATE_SHUTTING_DOWN
@ RTE_APP_STATE_INITIALIZING
@ RTE_APP_STATE_UNINITIALIZED
rte_status_t
Common result/status codes.
uint32_t rte_duration_ms_t
rte_voter_storage_t rte_voter_t
Opaque handle to a voter instance.
Common status/error codes returned by every Safe API Framework function. Shared across all OS Abstrac...
Common fixed-width types and the caller-owned-storage handle pattern used by every OAL service (see A...
N-way voting across registered rte_channel_t links (2oo2/2oo3/NMR).
Watchdog mechanism for detecting system/task hang conditions.
Optional built-in checkpoint rendezvous configuration (ADR-019/ADR-034).
uint32_t expected_node_count
rte_duration_ms_t max_delay_ms
Application manager configuration.
const rte_appmanager_operations_t * ops
const rte_appmanager_checkpoint_config_t * checkpoint
Application lifecycle operations.
rte_status_t(*) shutdown(void *context)
Shutdown application.
rte_status_t(*) pre_execute(void *context)
Optional per-cycle input/prepare stage (ADR-019).
rte_status_t(*) execute(void *context)
Execute main application logic.
rte_status_t(*) post_execute(void *context)
Optional per-cycle output/cleanup stage (ADR-019).
rte_status_t(*) init(void *context)
Initialize application.
rte_status_t(*) on_checkpoint_result(void *context, bool committed)
Optional per-cycle checkpoint outcome hook (ADR-034).
Application manager runtime state.