LibJuno 1.0.4
LibJuno is a lightweight C11 library designed specifically for embedded systems.
Loading...
Searching...
No Matches
udp_bridge_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
56#ifndef UDP_BRIDGE_APP_H
57#define UDP_BRIDGE_APP_H
58
59#include "juno/app/app_api.h"
60#include "juno/sb/broker_api.h"
61#include "udp_api.h"
62
63#ifdef __cplusplus
64extern "C"
65{
66#endif
67
68/* --------------------------------------------------------------------------
69 * UDP_BRIDGE_APP_T — concrete application struct
70 * -------------------------------------------------------------------------- */
71
87struct UDP_BRIDGE_APP_TAG JUNO_MODULE_DERIVE(JUNO_APP_ROOT_T,
89 JUNO_UDP_ROOT_T *ptUdp;
91 JUNO_SB_BROKER_ROOT_T *ptBroker;
92);
93typedef struct UDP_BRIDGE_APP_TAG UDP_BRIDGE_APP_T;
94
95/* --------------------------------------------------------------------------
96 * UdpBridgeApp_Init
97 * -------------------------------------------------------------------------- */
98
125 UDP_BRIDGE_APP_T *ptApp,
126 JUNO_UDP_ROOT_T *ptUdp,
127 JUNO_SB_BROKER_ROOT_T *ptBroker,
128 JUNO_FAILURE_HANDLER_T pfcnFailureHandler,
129 void *pvFailureUserData
130);
131
132#ifdef __cplusplus
133}
134#endif
135
136#endif /* UDP_BRIDGE_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
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
JUNO_STATUS_T UdpBridgeApp_Init(UDP_BRIDGE_APP_T *ptApp, JUNO_UDP_ROOT_T *ptUdp, JUNO_SB_BROKER_ROOT_T *ptBroker, JUNO_FAILURE_HANDLER_T pfcnFailureHandler, void *pvFailureUserData)
Initialize a UdpBridgeApp instance with its dependencies.
Definition udp_bridge_app.cpp:46
struct UDP_BRIDGE_APP_TAG UDP_BRIDGE_APP_T
Definition udp_bridge_app.h:93