LibJuno 1.0.4
LibJuno is a lightweight C11 library designed specifically for embedded systems.
Loading...
Searching...
No Matches
processor_app.cpp File Reference
#include "processor_app.h"
#include "udp_msg_api.h"
#include "juno/macros.h"
#include <stdio.h>
Include dependency graph for processor_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 ProcessorApp_Init (PROCESSOR_APP_T *ptApp, JUNO_SB_BROKER_ROOT_T *ptBroker, JUNO_DS_ARRAY_ROOT_T *ptPipeArray, JUNO_FAILURE_HANDLER_T pfcnFailureHandler, void *pvFailureUserData)
 Initialize a ProcessorApp instance.
 

Variables

static const JUNO_APP_API_T s_tProcessorAppApi
 

Function Documentation

◆ 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

◆ ProcessorApp_Init()

JUNO_STATUS_T ProcessorApp_Init ( PROCESSOR_APP_T ptApp,
JUNO_SB_BROKER_ROOT_T ptBroker,
JUNO_DS_ARRAY_ROOT_T ptPipeArray,
JUNO_FAILURE_HANDLER_T  pfcnFailureHandler,
void *  pvFailureUserData 
)

Initialize a ProcessorApp instance.

Wires the internal static vtable into ptApp->tRoot.ptApi, stores ptBroker, ptPipeArray, the failure handler, and user data. Verifies that no required injected pointer is NULL before returning. Pipe initialization is deferred to the OnStart lifecycle callback; this function does not call JunoSb_PipeInit or RegisterSubscriber.

Must be called before any lifecycle operation. All caller-allocated storage; this function does not allocate any memory.

Parameters
ptAppCaller-owned ProcessorApp storage; must be non-NULL.
ptBrokerThread 2 broker root; must be non-NULL and outlive ptApp.
ptPipeArrayBacking array for the subscription pipe; must be non-NULL and outlive ptApp.
pfcnFailureHandlerDiagnostic callback invoked before any error return; may be NULL.
pvFailureUserDataOpaque pointer passed to the failure handler; may be NULL.
Returns
JUNO_STATUS_SUCCESS on success; JUNO_STATUS_NULLPTR_ERROR if any required pointer is NULL.

Variable Documentation

◆ s_tProcessorAppApi

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