LibJuno 1.0.1
LibJuno is a lightweight C11 library designed specifically for embedded systems.
Loading...
Searching...
No Matches
engine_cmd_msg.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
18#ifndef ENGINE_CMD_MSG_H
19#define ENGINE_CMD_MSG_H
20#include "juno/ds/array_api.h"
22#include "juno/module.h"
23#include "juno/sb/broker_api.h"
24#include "juno/status.h"
25
26#ifdef __cplusplus
27extern "C" {
28#endif
29
45#define ENGINE_CMD_MSG_MID (0x1800)
46
56
71typedef struct ENGINE_CMD_MSG_ARRAY_TAG JUNO_MODULE_DERIVE(JUNO_DS_ARRAY_ROOT_T,
72 ENGINE_CMD_MSG_T *ptArrEngineCmdMsgBuffer;
73) ENGINE_CMD_MSG_ARRAY_T;
74
80
85#define EngineCmdMsg_PointerInit(addr) JunoMemory_PointerInit(&gtEngineCmdMsgPointerApi, ENGINE_CMD_MSG_T, addr)
86#define EngineCmdMsg_PointerVerify(tPointer) JunoMemory_PointerVerifyType(tPointer, ENGINE_CMD_MSG_T, gtEngineCmdMsgPointerApi)
87
92JUNO_STATUS_T EngineCmdMsg_ArrayInit(ENGINE_CMD_MSG_ARRAY_T *ptEngineCmdMsgPipe, ENGINE_CMD_MSG_T *ptArrEngineCmdMsgBuffer, size_t iCapacity, JUNO_FAILURE_HANDLER_T pfcnFailureHdlr, JUNO_USER_DATA_T *pvUserData);
93
95#ifdef __cplusplus
96}
97#endif
98#endif
99
Abstract fixed-capacity array interface for DS modules.
struct JUNO_DS_ARRAY_ROOT_TAG JUNO_DS_ARRAY_ROOT_T
Opaque array root carrying capacity and API pointer.
Definition array_api.h:58
Software Bus (SB) broker for single-threaded message fan-out.
struct ENGINE_CMD_MSG_TAG ENGINE_CMD_MSG_T
const JUNO_POINTER_API_T gtEngineCmdMsgPointerApi
Definition engine_cmd_msg.c:50
JUNO_STATUS_T EngineCmdMsg_ArrayInit(ENGINE_CMD_MSG_ARRAY_T *ptEngineCmdMsgPipe, ENGINE_CMD_MSG_T *ptArrEngineCmdMsgBuffer, size_t iCapacity, JUNO_FAILURE_HANDLER_T pfcnFailureHdlr, JUNO_USER_DATA_T *pvUserData)
Definition engine_cmd_msg.c:111
#define JUNO_MODULE_DERIVE(ROOT_T,...)
Implement a derived module embedding the root as the first member.
Definition module.h:157
void(* JUNO_FAILURE_HANDLER_T)(JUNO_STATUS_T tStatus, const char *pcCustomMessage, JUNO_USER_DATA_T *pvUserData)
Failure handler callback signature.
Definition status.h:104
int32_t JUNO_STATUS_T
Canonical status type for LibJuno functions.
Definition status.h:49
void JUNO_USER_DATA_T
Opaque user data type for failure callbacks.
Definition status.h:96
Module system and dependency injection primitives for LibJuno.
Pointer trait and helpers for memory operations.
Status codes and failure-handling helpers for LibJuno.
Definition engine_cmd_msg.h:53
float fRpm
Definition engine_cmd_msg.h:54
Pointer operations API (copy/reset).
Definition pointer_api.h:74