LibJuno 1.0.4
LibJuno is a lightweight C11 library designed specifically for embedded systems.
Loading...
Searching...
No Matches
udp_thread_msg.cpp File Reference

Pointer API and array API implementations for UDP_THREAD_MSG_T. More...

#include "udp_msg_api.h"
#include "juno/macros.h"
#include "juno/memory/pointer_api.h"
#include <string.h>
#include <stdalign.h>
Include dependency graph for udp_thread_msg.cpp:

Functions

static JUNO_POINTER_T MakeMsgPointer (UDP_THREAD_MSG_T *ptMsg)
 Build a JUNO_POINTER_T for a UDP_THREAD_MSG_T slot.
 
static JUNO_STATUS_T UdpThreadMsg_Copy (JUNO_POINTER_T tDest, const JUNO_POINTER_T tSrc)
 
static JUNO_STATUS_T UdpThreadMsg_Reset (JUNO_POINTER_T tPointer)
 
static JUNO_STATUS_T UdpThreadMsgArray_SetAt (JUNO_DS_ARRAY_ROOT_T *ptArray, JUNO_POINTER_T tItem, size_t iIndex)
 
static JUNO_RESULT_POINTER_T UdpThreadMsgArray_GetAt (JUNO_DS_ARRAY_ROOT_T *ptArray, size_t iIndex)
 
static JUNO_STATUS_T UdpThreadMsgArray_RemoveAt (JUNO_DS_ARRAY_ROOT_T *ptArray, size_t iIndex)
 

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.
 

Detailed Description

Pointer API and array API implementations for UDP_THREAD_MSG_T.

Provides g_udpThreadMsgPointerApi (Copy/Reset for UDP_THREAD_MSG_T) and g_udpThreadMsgArrayApi (SetAt/GetAt/RemoveAt over UDPTH_MSG_ARRAY_T backing storage). These globals are injected into pipe queues and the software bus.

Function Documentation

◆ MakeMsgPointer()

static JUNO_POINTER_T MakeMsgPointer ( UDP_THREAD_MSG_T ptMsg)
static

Build a JUNO_POINTER_T for a UDP_THREAD_MSG_T slot.

Avoids the C99 compound-literal syntax used by JunoMemory_PointerInit so that this translation unit compiles cleanly as C++11.

Parameters
ptMsgAddress of the UDP_THREAD_MSG_T instance.
Returns
Populated JUNO_POINTER_T.

◆ UdpThreadMsg_Copy()

static JUNO_STATUS_T UdpThreadMsg_Copy ( JUNO_POINTER_T  tDest,
const JUNO_POINTER_T  tSrc 
)
static

◆ UdpThreadMsg_Reset()

static JUNO_STATUS_T UdpThreadMsg_Reset ( JUNO_POINTER_T  tPointer)
static

◆ UdpThreadMsgArray_GetAt()

static JUNO_RESULT_POINTER_T UdpThreadMsgArray_GetAt ( JUNO_DS_ARRAY_ROOT_T ptArray,
size_t  iIndex 
)
static

◆ UdpThreadMsgArray_RemoveAt()

static JUNO_STATUS_T UdpThreadMsgArray_RemoveAt ( JUNO_DS_ARRAY_ROOT_T ptArray,
size_t  iIndex 
)
static

◆ UdpThreadMsgArray_SetAt()

static JUNO_STATUS_T UdpThreadMsgArray_SetAt ( JUNO_DS_ARRAY_ROOT_T ptArray,
JUNO_POINTER_T  tItem,
size_t  iIndex 
)
static

Variable Documentation

◆ g_udpThreadMsgArrayApi

const JUNO_DS_ARRAY_API_T g_udpThreadMsgArrayApi
Initial value:
= {
}
static JUNO_STATUS_T UdpThreadMsgArray_SetAt(JUNO_DS_ARRAY_ROOT_T *ptArray, JUNO_POINTER_T tItem, size_t iIndex)
Definition udp_thread_msg.cpp:95
static JUNO_RESULT_POINTER_T UdpThreadMsgArray_GetAt(JUNO_DS_ARRAY_ROOT_T *ptArray, size_t iIndex)
Definition udp_thread_msg.cpp:104
static JUNO_STATUS_T UdpThreadMsgArray_RemoveAt(JUNO_DS_ARRAY_ROOT_T *ptArray, size_t iIndex)
Definition udp_thread_msg.cpp:126

Array API for UDPTH_MSG_ARRAY_T — used with JunoDs_ArrayInit.

◆ g_udpThreadMsgPointerApi

const JUNO_POINTER_API_T g_udpThreadMsgPointerApi
Initial value:
= {
}
static JUNO_STATUS_T UdpThreadMsg_Reset(JUNO_POINTER_T tPointer)
Definition udp_thread_msg.cpp:76
static JUNO_STATUS_T UdpThreadMsg_Copy(JUNO_POINTER_T tDest, const JUNO_POINTER_T tSrc)
Definition udp_thread_msg.cpp:64

Pointer API for UDP_THREAD_MSG_T — used with JunoMemory_PointerInit.