|
LibJuno 1.0.4
LibJuno is a lightweight C11 library designed specifically for embedded systems.
|
Composition root for the udp-threads example. More...
#include "juno/sch/juno_sch_api.h"#include "juno/sb/broker_api.h"#include "juno/thread_linux.h"#include "udp_linux.h"#include "udp_msg_api.h"#include "sender_app.h"#include "monitor_app.h"#include "udp_bridge_app.h"#include "processor_app.h"#include "juno/status.h"#include <unistd.h>
Functions | |
| static JUNO_STATUS_T | SchExecute (JUNO_SCH_ROOT_T *ptSch) |
| static void * | Thread1Entry (void *pvArg) |
| static void * | Thread2Entry (void *pvArg) |
| int | main (void) |
Variables | |
| static const JUNO_SCH_API_T | s_tSchApi = { SchExecute, NULL, NULL } |
| static JUNO_THREAD_T | s_tThread1 |
| static JUNO_THREAD_T | s_tThread2 |
| static JUNO_SCH_ROOT_T | s_tSch1 |
| static JUNO_SCH_ROOT_T | s_tSch2 |
| static JUNO_SB_BROKER_ROOT_T | s_tBroker1 |
| static JUNO_SB_BROKER_ROOT_T | s_tBroker2 |
| static JUNO_SB_PIPE_T * | s_aptBroker1Registry [2u] |
| static JUNO_SB_PIPE_T * | s_aptBroker2Registry [2u] |
| static JUNO_UDP_T | s_tUdpSender |
| static JUNO_UDP_T | s_tUdpReceiver |
| static UDPTH_MSG_ARRAY_T | s_tMsgArray1 |
| static UDPTH_MSG_ARRAY_T | s_tMsgArray2 |
| static SENDER_APP_T | s_tSenderApp |
| static MONITOR_APP_T | s_tMonitorApp |
| static UDP_BRIDGE_APP_T | s_tBridgeApp |
| static PROCESSOR_APP_T | s_tProcessorApp |
| static JUNO_APP_ROOT_T * | s_arrSchTable1 [2u] |
| static JUNO_APP_ROOT_T * | s_arrSchTable2 [2u] |
| static const JUNO_UDP_CFG_T | s_tSenderCfg = { "127.0.0.1", 9000u, false } |
| static const JUNO_UDP_CFG_T | s_tReceiverCfg = { "0.0.0.0", 9000u, true } |
Composition root for the udp-threads example.
Owns all static module instances. Wires dependencies bottom-up, spawns two POSIX threads (each with its own scheduler, broker, and applications), runs for 10 seconds, then performs cooperative shutdown.
Thread 1: SenderApp + MonitorApp via s_tSch1 and s_tBroker1. Thread 2: UdpBridgeApp + ProcessorApp via s_tSch2 and s_tBroker2.
No dynamic allocation. No global mutable state beyond the static instances declared here (which are owned exclusively by this translation unit).
| int main | ( | void | ) |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |