LibJuno 1.0.4
LibJuno is a lightweight C11 library designed specifically for embedded systems.
Loading...
Searching...
No Matches
monitor_app.cpp File Reference
#include "monitor_app.h"
#include "udp_msg_api.h"
#include "juno/macros.h"
#include <stdio.h>
Include dependency graph for monitor_app.cpp:

Functions

static JUNO_STATUS_T OnStart (JUNO_APP_ROOT_T *ptApp)
 
static JUNO_STATUS_T OnProcess (JUNO_APP_ROOT_T *ptApp)
 
static JUNO_STATUS_T OnExit (JUNO_APP_ROOT_T *ptApp)
 
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.
 

Variables

static const JUNO_APP_API_T s_tMonitorAppApi
 

Function Documentation

◆ MonitorApp_Init()

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.

Wires the internal vtable, stores all injected dependencies, and verifies that no required pointer is NULL. The pipe (tPipe) is NOT initialized here; pipe initialization is deferred to OnStart so that the broker registration occurs at the correct point in the application lifecycle.

The caller must ensure:

  • ptApp, ptBroker, and ptPipeArray are all non-NULL.
  • ptBroker and ptPipeArray outlive this MONITOR_APP_T instance.
Parameters
ptAppCaller-owned app storage; must be non-NULL.
ptBrokerThread 1's broker instance; must be non-NULL.
ptPipeArrayBacking array for the pipe's internal queue; must be non-NULL and must outlive the pipe registration.
pfcnFailureHandlerDiagnostic callback invoked before any error return; may be NULL.
pvFailureUserDataOpaque pointer passed through to the failure handler; may be NULL.
Returns
JUNO_STATUS_SUCCESS on success; JUNO_STATUS_NULLPTR_ERROR if any required pointer is NULL.

◆ OnExit()

static JUNO_STATUS_T OnExit ( JUNO_APP_ROOT_T ptApp)
static

◆ OnProcess()

static JUNO_STATUS_T OnProcess ( JUNO_APP_ROOT_T ptApp)
static

◆ OnStart()

static JUNO_STATUS_T OnStart ( JUNO_APP_ROOT_T ptApp)
static

Variable Documentation

◆ s_tMonitorAppApi

const JUNO_APP_API_T s_tMonitorAppApi
static
Initial value:
= {
}
static JUNO_STATUS_T OnStart(JUNO_APP_ROOT_T *ptApp)
Definition monitor_app.cpp:46
static JUNO_STATUS_T OnProcess(JUNO_APP_ROOT_T *ptApp)
Definition monitor_app.cpp:67
static JUNO_STATUS_T OnExit(JUNO_APP_ROOT_T *ptApp)
Definition monitor_app.cpp:99