LibJuno 1.0.4
LibJuno is a lightweight C11 library designed specifically for embedded systems.
Loading...
Searching...
No Matches
sender_app.cpp File Reference
#include "sender_app.h"
#include "udp_msg_api.h"
#include "juno/status.h"
#include "juno/macros.h"
#include <stdio.h>
#include <string.h>
#include <stdalign.h>
Include dependency graph for sender_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 SenderApp_Init (SENDER_APP_T *ptApp, JUNO_UDP_ROOT_T *ptUdp, JUNO_SB_BROKER_ROOT_T *ptBroker, JUNO_FAILURE_HANDLER_T pfcnFailureHandler, void *pvFailureUserData)
 Initialize a SenderApp instance.
 

Variables

static const JUNO_APP_API_T s_tSenderAppApi
 

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

◆ SenderApp_Init()

JUNO_STATUS_T SenderApp_Init ( SENDER_APP_T ptApp,
JUNO_UDP_ROOT_T ptUdp,
JUNO_SB_BROKER_ROOT_T ptBroker,
JUNO_FAILURE_HANDLER_T  pfcnFailureHandler,
void *  pvFailureUserData 
)

Initialize a SenderApp instance.

Wires the internal static vtable into ptApp->tRoot.ptApi, stores ptUdp and ptBroker, stores the failure handler and user data into the root, and sets _uSeqNum to zero. Verifies that no required injected pointer is NULL before returning.

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

Parameters
ptAppCaller-owned SenderApp storage; must be non-NULL.
ptUdpUDP module root configured for sender role; must be non-NULL and outlive ptApp.
ptBrokerThread 1 broker root; 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_tSenderAppApi

const JUNO_APP_API_T s_tSenderAppApi
static
Initial value:
= {
}
static JUNO_STATUS_T OnStart(JUNO_APP_ROOT_T *ptApp)
Definition sender_app.cpp:51
static JUNO_STATUS_T OnProcess(JUNO_APP_ROOT_T *ptApp)
Definition sender_app.cpp:61
static JUNO_STATUS_T OnExit(JUNO_APP_ROOT_T *ptApp)
Definition sender_app.cpp:92