LibJuno 1.0.4
LibJuno is a lightweight C11 library designed specifically for embedded systems.
Loading...
Searching...
No Matches
sender_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
46#ifndef SENDER_APP_H
47#define SENDER_APP_H
48
49#include <stdint.h>
50#include "juno/app/app_api.h"
51#include "juno/sb/broker_api.h"
52#include "udp_api.h"
53#include "juno/module.h"
54#include "juno/types.h"
55
56#ifdef __cplusplus
57extern "C"
58{
59#endif
60
61/* --------------------------------------------------------------------------
62 * SENDER_APP_T — concrete SenderApp struct
63 * -------------------------------------------------------------------------- */
64
82struct SENDER_APP_TAG JUNO_MODULE_DERIVE(JUNO_APP_ROOT_T,
84 JUNO_UDP_ROOT_T *ptUdp;
86 JUNO_SB_BROKER_ROOT_T *ptBroker;
88 uint32_t _uSeqNum;
89);
90typedef struct SENDER_APP_TAG SENDER_APP_T;
91
92/* --------------------------------------------------------------------------
93 * SenderApp_Init — wire vtable and inject dependencies
94 * -------------------------------------------------------------------------- */
95
119// @{"req": ["REQ-UDPAPP-002"]}
121 SENDER_APP_T *ptApp,
122 JUNO_UDP_ROOT_T *ptUdp,
123 JUNO_SB_BROKER_ROOT_T *ptBroker,
124 JUNO_FAILURE_HANDLER_T pfcnFailureHandler,
125 void *pvFailureUserData
126);
127
128#ifdef __cplusplus
129}
130#endif
131
132#endif /* SENDER_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
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
#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
Module system and dependency injection primitives for LibJuno.
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.
Definition sender_app.cpp:104
struct SENDER_APP_TAG SENDER_APP_T
Definition sender_app.h:90
Common module result type aliases used throughout LibJuno.
Freestanding C11 interface for the UDP socket module (udp-threads example).
struct JUNO_UDP_ROOT_TAG JUNO_UDP_ROOT_T
Forward declaration of the UDP module root type.
Definition udp_api.h:71