LibJuno 1.0.4
LibJuno is a lightweight C11 library designed specifically for embedded systems.
Loading...
Searching...
No Matches
monitor_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
43#ifndef MONITOR_APP_H
44#define MONITOR_APP_H
45
46#include "juno/app/app_api.h"
47#include "juno/ds/array_api.h"
48#include "juno/sb/broker_api.h"
49#include "juno/status.h"
50
51#ifdef __cplusplus
52extern "C"
53{
54#endif
55
56/* --------------------------------------------------------------------------
57 * MONITOR_APP_T — concrete application struct
58 * -------------------------------------------------------------------------- */
59
80struct MONITOR_APP_TAG JUNO_MODULE_DERIVE(JUNO_APP_ROOT_T,
82 JUNO_SB_BROKER_ROOT_T *ptBroker;
84 JUNO_DS_ARRAY_ROOT_T *_ptPipeArray;
86 JUNO_FAILURE_HANDLER_T _pfcnFailureHandler;
88 JUNO_USER_DATA_T *_pvFailureUserData;
90 JUNO_SB_PIPE_T tPipe;
91);
92typedef struct MONITOR_APP_TAG MONITOR_APP_T;
93
94/* --------------------------------------------------------------------------
95 * MonitorApp_Init
96 * -------------------------------------------------------------------------- */
97
123 MONITOR_APP_T *ptApp,
124 JUNO_SB_BROKER_ROOT_T *ptBroker,
125 JUNO_DS_ARRAY_ROOT_T *ptPipeArray,
126 JUNO_FAILURE_HANDLER_T pfcnFailureHandler,
127 void *pvFailureUserData
128);
129
130#ifdef __cplusplus
131}
132#endif
133
134#endif /* MONITOR_APP_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
Abstract fixed-capacity array interface for DS modules.
struct JUNO_DS_ARRAY_ROOT_TAG JUNO_DS_ARRAY_ROOT_T
Opaque array root carrying capacity and API pointer.
Definition array_api.h:58
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:66
struct JUNO_SB_PIPE_TAG JUNO_SB_PIPE_T
Definition broker_api.h:68
#define JUNO_MODULE_DERIVE(ROOT_T,...)
Implement a derived module embedding the root as the first member.
Definition module.h:161
void(* JUNO_FAILURE_HANDLER_T)(JUNO_STATUS_T tStatus, const char *pcCustomMessage, JUNO_USER_DATA_T *pvUserData)
Failure handler callback signature.
Definition status.h:110
int32_t JUNO_STATUS_T
Canonical status type for LibJuno functions.
Definition status.h:51
void JUNO_USER_DATA_T
Opaque user data type for failure callbacks.
Definition status.h:101
struct MONITOR_APP_TAG MONITOR_APP_T
Definition monitor_app.h:92
JUNO_STATUS_T MonitorApp_Init(MONITOR_APP_T *ptApp, JUNO_SB_BROKER_ROOT_T *ptBroker, JUNO_DS_ARRAY_ROOT_T *ptPipeArray, JUNO_FAILURE_HANDLER_T pfcnFailureHandler, void *pvFailureUserData)
Initialize a MonitorApp instance.
Definition monitor_app.cpp:110
Status codes and failure-handling helpers for LibJuno.