|
LibJuno 1.0.4
LibJuno is a lightweight C11 library designed specifically for embedded systems.
|
Message API infrastructure for the udp-threads example. More...
#include "udp_api.h"#include "juno/ds/array_api.h"#include "juno/memory/pointer_api.h"#include "juno/sb/broker_api.h"

Go to the source code of this file.
Macros | |
| #define | UDPTH_PIPE_CAPACITY 8u |
| #define | UDPTH_MSG_MID ((JUNO_SB_MID_T)1u) |
| #define | UdpThreadMsg_PointerInit(addr) JunoMemory_PointerInit(&g_udpThreadMsgPointerApi, UDP_THREAD_MSG_T, (addr)) |
| Convenience macro to initialise a JUNO_POINTER_T for a UDP_THREAD_MSG_T. | |
Typedefs | |
| typedef struct UDPTH_MSG_ARRAY_TAG | UDPTH_MSG_ARRAY_T |
Functions | |
| struct UDPTH_MSG_ARRAY_TAG | JUNO_MODULE_DERIVE (JUNO_DS_ARRAY_ROOT_T, UDP_THREAD_MSG_T atBuffer[UDPTH_PIPE_CAPACITY];) |
| Concrete array type for the MonitorApp and ProcessorApp pipe queues. | |
| static JUNO_STATUS_T | UdpThreadMsgArray_Init (UDPTH_MSG_ARRAY_T *ptArr, JUNO_FAILURE_HANDLER_T pfcnHandler, JUNO_USER_DATA_T *pvUserData) |
| Initialise a UDPTH_MSG_ARRAY_T with the shared array API. | |
Variables | |
| const JUNO_POINTER_API_T | g_udpThreadMsgPointerApi |
| Pointer API for UDP_THREAD_MSG_T — used with JunoMemory_PointerInit. | |
| const JUNO_DS_ARRAY_API_T | g_udpThreadMsgArrayApi |
| Array API for UDPTH_MSG_ARRAY_T — used with JunoDs_ArrayInit. | |
Message API infrastructure for the udp-threads example.
Provides the pointer API and array API for UDP_THREAD_MSG_T, along with the concrete UDPTH_MSG_ARRAY_T type used as backing storage for pipe queues in MonitorApp and ProcessorApp. Also defines the shared message ID constant.
| #define UDPTH_MSG_MID ((JUNO_SB_MID_T)1u) |
Message ID used by all four apps on the software bus.
| #define UDPTH_PIPE_CAPACITY 8u |
Number of messages the pipe queue can buffer.
| #define UdpThreadMsg_PointerInit | ( | addr | ) | JunoMemory_PointerInit(&g_udpThreadMsgPointerApi, UDP_THREAD_MSG_T, (addr)) |
Convenience macro to initialise a JUNO_POINTER_T for a UDP_THREAD_MSG_T.
| addr | Address of the UDP_THREAD_MSG_T instance. |
| typedef struct UDPTH_MSG_ARRAY_TAG UDPTH_MSG_ARRAY_T |
| struct UDPTH_MSG_ARRAY_TAG JUNO_MODULE_DERIVE | ( | JUNO_DS_ARRAY_ROOT_T | , |
| UDP_THREAD_MSG_T atBuffer; | [UDPTH_PIPE_CAPACITY] | ||
| ) |
Concrete array type for the MonitorApp and ProcessorApp pipe queues.
Embeds JUNO_DS_ARRAY_ROOT_T as first member (via JUNO_MODULE_DERIVE pattern), followed by the fixed-size message buffer. The composition root allocates this struct statically and injects &tArr.tRoot into MonitorApp_Init / ProcessorApp_Init.
|
inlinestatic |
Initialise a UDPTH_MSG_ARRAY_T with the shared array API.
| ptArr | Caller-owned array storage; must be non-NULL. |
| pfcnHandler | Optional failure handler; may be NULL. |
| pvUserData | Optional user data passed to the failure handler; may be NULL. |
|
extern |
Array API for UDPTH_MSG_ARRAY_T — used with JunoDs_ArrayInit.
|
extern |
Pointer API for UDP_THREAD_MSG_T — used with JunoMemory_PointerInit.