LibJuno 1.0.1
LibJuno is a lightweight C11 library designed specifically for embedded systems.
Loading...
Searching...
No Matches
broker_api.h File Reference

Software Bus (SB) broker for single-threaded message fan-out. More...

#include "juno/ds/array_api.h"
#include "juno/macros.h"
#include "juno/memory/pointer_api.h"
#include "juno/status.h"
#include "juno/module.h"
#include "juno/ds/queue_api.h"
#include <stddef.h>
#include <stdint.h>
Include dependency graph for broker_api.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  JUNO_SB_BROKER_API_TAG
 

Typedefs

typedef struct JUNO_SB_BROKER_ROOT_TAG JUNO_SB_BROKER_ROOT_T
 
typedef struct JUNO_SB_BROKER_API_TAG JUNO_SB_BROKER_API_T
 
typedef struct JUNO_SB_PIPE_TAG JUNO_SB_PIPE_T
 
typedef uint32_t JUNO_SB_MID_T
 

Functions

struct JUNO_SB_PIPE_TAG JUNO_MODULE_DERIVE (JUNO_DS_QUEUE_ROOT_T, JUNO_SB_MID_T iMsgId;)
 A subscriber pipe that carries messages for a specific MID.
 
struct JUNO_SB_BROKER_ROOT_TAG JUNO_MODULE_ROOT (JUNO_SB_BROKER_API_T, JUNO_SB_PIPE_T **ptPipeRegistry;size_t zRegistryLength;size_t zRegistryCapacity;)
 Broker root containing the registry of subscriber pipes.
 
static JUNO_STATUS_T JunoSb_BrokerApiVerify (const JUNO_SB_BROKER_API_T *ptBrokerApi)
 Verify a broker API table has required functions.
 
static JUNO_STATUS_T JunoSb_BrokerVerify (const JUNO_SB_BROKER_ROOT_T *ptBroker)
 Verify a broker instance and basic registry invariants.
 
static JUNO_STATUS_T JunoSb_PipeVerify (const JUNO_SB_PIPE_T *ptPipe)
 Verify a pipe instance.
 
JUNO_STATUS_T JunoSb_BrokerInit (JUNO_SB_BROKER_ROOT_T *ptBroker, JUNO_SB_PIPE_T **ptPipeRegistry, size_t iRegistryCapacity, JUNO_FAILURE_HANDLER_T pfcnFailureHdlr, JUNO_USER_DATA_T *pvFailureUserData)
 Initialize a broker with a pipe registry storage array.
 
static JUNO_STATUS_T JunoSb_PipeInit (JUNO_SB_PIPE_T *ptPipe, JUNO_SB_MID_T iMid, JUNO_DS_ARRAY_ROOT_T *ptArray, JUNO_FAILURE_HANDLER_T pfcnFailureHandler, JUNO_USER_DATA_T *pvUserData)
 Initialize a pipe for a specific MID backed by a queue over ptArray.
 

Detailed Description

Software Bus (SB) broker for single-threaded message fan-out.

This API has been generated by LibJuno: https://www.robinonsay.com/libjuno/

Typedef Documentation

◆ JUNO_SB_BROKER_API_T

◆ JUNO_SB_BROKER_ROOT_T

typedef struct JUNO_SB_BROKER_ROOT_TAG JUNO_SB_BROKER_ROOT_T

◆ JUNO_SB_MID_T

typedef uint32_t JUNO_SB_MID_T

◆ JUNO_SB_PIPE_T

typedef struct JUNO_SB_PIPE_TAG JUNO_SB_PIPE_T

Function Documentation

◆ JUNO_MODULE_DERIVE()

struct JUNO_SB_PIPE_TAG JUNO_MODULE_DERIVE ( JUNO_DS_QUEUE_ROOT_T  ,
JUNO_SB_MID_T iMsgId;   
)

A subscriber pipe that carries messages for a specific MID.

◆ JUNO_MODULE_ROOT()

struct JUNO_SB_BROKER_ROOT_TAG JUNO_MODULE_ROOT ( JUNO_SB_BROKER_API_T  ,
JUNO_SB_PIPE_T **ptPipeRegistry;size_t zRegistryLength;size_t zRegistryCapacity;   
)

Broker root containing the registry of subscriber pipes.

◆ JunoSb_BrokerApiVerify()

static JUNO_STATUS_T JunoSb_BrokerApiVerify ( const JUNO_SB_BROKER_API_T ptBrokerApi)
inlinestatic

Verify a broker API table has required functions.

◆ JunoSb_BrokerInit()

JUNO_STATUS_T JunoSb_BrokerInit ( JUNO_SB_BROKER_ROOT_T ptBroker,
JUNO_SB_PIPE_T **  ptPipeRegistry,
size_t  iRegistryCapacity,
JUNO_FAILURE_HANDLER_T  pfcnFailureHdlr,
JUNO_USER_DATA_T pvFailureUserData 
)

Initialize a broker with a pipe registry storage array.

◆ JunoSb_BrokerVerify()

static JUNO_STATUS_T JunoSb_BrokerVerify ( const JUNO_SB_BROKER_ROOT_T ptBroker)
inlinestatic

Verify a broker instance and basic registry invariants.

◆ JunoSb_PipeInit()

static JUNO_STATUS_T JunoSb_PipeInit ( JUNO_SB_PIPE_T ptPipe,
JUNO_SB_MID_T  iMid,
JUNO_DS_ARRAY_ROOT_T ptArray,
JUNO_FAILURE_HANDLER_T  pfcnFailureHandler,
JUNO_USER_DATA_T pvUserData 
)
inlinestatic

Initialize a pipe for a specific MID backed by a queue over ptArray.

◆ JunoSb_PipeVerify()

static JUNO_STATUS_T JunoSb_PipeVerify ( const JUNO_SB_PIPE_T ptPipe)
inlinestatic

Verify a pipe instance.