|
LibJuno 1.0.4
LibJuno is a lightweight C11 library designed specifically for embedded systems.
|
#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>
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 |
|
static |
|
static |
|
static |
| 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.
| ptApp | Caller-owned SenderApp storage; must be non-NULL. |
| ptUdp | UDP module root configured for sender role; must be non-NULL and outlive ptApp. |
| ptBroker | Thread 1 broker root; must be non-NULL and outlive ptApp. |
| pfcnFailureHandler | Diagnostic callback invoked before any error return; may be NULL. |
| pvFailureUserData | Opaque pointer passed to the failure handler; may be NULL. |
JUNO_STATUS_SUCCESS on success; JUNO_STATUS_NULLPTR_ERROR if any required pointer is NULL.
|
static |