LibJuno 1.0.1
LibJuno is a lightweight C11 library designed specifically for embedded systems.
Loading...
Searching...
No Matches
system_manager_app.h
Go to the documentation of this file.
1/*
2 MIT License
3
4 Copyright (c) 2025 Robin A. Onsay
5
6 Permission is hereby granted, free of charge, to any person obtaining
7 a copy of this software and associated documentation files
8 (the "Software"), to deal in the Software without restriction,
9 including without limitation the rights to use, copy, modify, merge,
10 publish, distribute, sublicense, and/or sell copies of the Software,
11 and to permit persons to whom the Software is furnished to do so,
12 subject to the following conditions:
13
14 The above copyright notice and this permission notice shall be
15 included in all copies or substantial portions of the Software.
16*/
17
27#ifndef SYSTEM_MANAGER_APP_API_H
28#define SYSTEM_MANAGER_APP_API_H
29#include "juno/log/log_api.h"
30#include "juno/sb/broker_api.h"
31#include "juno/status.h"
32#include "juno/module.h"
33#include "juno/app/app_api.h"
34#include "juno/time/time_api.h"
36#include <stdint.h>
37#ifdef __cplusplus
38extern "C"
39{
40#endif
41
42typedef struct SYSTEM_MANAGER_APP_API_TAG SYSTEM_MANAGER_APP_API_T;
43typedef struct SYSTEM_MANAGER_APP_TAG SYSTEM_MANAGER_APP_T;
44
45#define ENGINE_TLM_MSG_PIPE_DEPTH (1)
46
47struct SYSTEM_MANAGER_APP_TAG JUNO_MODULE_DERIVE(JUNO_APP_ROOT_T,
48 const JUNO_LOG_ROOT_T *ptLogger;
49 const JUNO_TIME_ROOT_T *ptTime;
50 JUNO_SB_BROKER_ROOT_T *ptBroker;
52 ENGINE_TLM_MSG_ARRAY_T tEngineTlmArray;
53 JUNO_SB_PIPE_T tEngineTlmPipe;
54 JUNO_TIMESTAMP_T tEngineStart;
55 float fTargetRpm;
56);
57
59 SYSTEM_MANAGER_APP_T *ptSystemManagerApp,
60 JUNO_LOG_ROOT_T *ptLogger,
61 JUNO_TIME_ROOT_T *ptTime,
62 JUNO_SB_BROKER_ROOT_T *ptBroker,
63 JUNO_FAILURE_HANDLER_T pfcnFailureHandler,
64 JUNO_USER_DATA_T *pvUserData
65);
66
67#ifdef __cplusplus
68}
69#endif
70#endif // SYSTEM_MANAGER_APP_API_H
Application module API (start/process/exit lifecycle).
struct JUNO_APP_ROOT_TAG JUNO_APP_ROOT_T
The application module.
Definition app_api.h:50
Software Bus (SB) broker for single-threaded message fan-out.
struct JUNO_SB_BROKER_ROOT_TAG JUNO_SB_BROKER_ROOT_T
Definition broker_api.h:65
struct JUNO_SB_PIPE_TAG JUNO_SB_PIPE_T
Definition broker_api.h:67
#define JUNO_MODULE_DERIVE(ROOT_T,...)
Implement a derived module embedding the root as the first member.
Definition module.h:157
void(* JUNO_FAILURE_HANDLER_T)(JUNO_STATUS_T tStatus, const char *pcCustomMessage, JUNO_USER_DATA_T *pvUserData)
Failure handler callback signature.
Definition status.h:104
int32_t JUNO_STATUS_T
Canonical status type for LibJuno functions.
Definition status.h:49
void JUNO_USER_DATA_T
Opaque user data type for failure callbacks.
Definition status.h:96
struct JUNO_TIME_ROOT_TAG JUNO_TIME_ROOT_T
Definition time_api.h:69
Minimal logging facade for embedded targets.
struct JUNO_LOG_ROOT_TAG JUNO_LOG_ROOT_T
Definition log_api.h:49
Module system and dependency injection primitives for LibJuno.
Status codes and failure-handling helpers for LibJuno.
Definition engine_tlm_msg.h:34
Timestamp consisting of whole seconds and fixed-point subseconds.
Definition time_api.h:105
#define ENGINE_TLM_MSG_PIPE_DEPTH
Definition system_manager_app.h:45
struct SYSTEM_MANAGER_APP_TAG SYSTEM_MANAGER_APP_T
Definition system_manager_app.h:43
JUNO_STATUS_T SystemManagerApp(SYSTEM_MANAGER_APP_T *ptSystemManagerApp, JUNO_LOG_ROOT_T *ptLogger, JUNO_TIME_ROOT_T *ptTime, JUNO_SB_BROKER_ROOT_T *ptBroker, JUNO_FAILURE_HANDLER_T pfcnFailureHandler, JUNO_USER_DATA_T *pvUserData)
Definition system_manager_app.c:70
struct SYSTEM_MANAGER_APP_API_TAG SYSTEM_MANAGER_APP_API_T
Definition system_manager_app.h:42
Juno Time module API and common time math helpers.