KymoCore/Documentation
v8.0.0 Stable⌄
Versions8.0.0 Current
GitHub ↗
KYMOCORE / API REFERENCE

kymo_core.h Source File

API contracts in their original English. Navigation and guides are bilingual.
Go to the documentation of this file.
1/* SPDX-License-Identifier: MIT */
10#ifndef KYMO_CORE_H
11#define KYMO_CORE_H
12#include "kymo_types.h"
13#if KYMO_EFFECTIVE_CORE || defined(DOXYGEN)
14#ifdef __cplusplus
15extern "C"
16{
17#endif
18
25 typedef struct
26 {
27 /* Callbacks: all callable fields precede resource parameters. */
30
33
36
39
42
43 /* Parameters: contexts, then each array pointer beside its byte size. */
46
49
51 uint8_t *pTxBufferAv;
52
55
57 uint8_t *pRxBufferAv;
58
62
73
82#ifdef __cplusplus
83}
84#endif
85#endif
86#endif
KymoStatus KymoCore_main(void)
Run one bounded turn for initialized features.
KymoStatus KymoCore_init(const KymoCoreConfig *pConfig)
Initialize the default core once, without activating any feature.
Status codes and callback types shared by every KymoCore module.
size_t(*) KymoWriteBytesFn(void *pContext, const uint8_t *pBytesAv, size_t byteCount)
Nonblocking byte writer shared by Core, frame sender and mux.
Definition kymo_types.h:156
uint32_t(*) KymoClockMsFn(void *pContext)
Read a monotonic millisecond counter.
Definition kymo_types.h:133
uint8_t KymoStatus
Result of a KymoCore operation.
Definition kymo_types.h:40
void(*) KymoServiceFn(void *pContext)
Advance application-side transport maintenance once per cycle.
Definition kymo_types.h:194
uint8_t(*) KymoIsBusyFn(void *pContext)
Report whether the transport still owns the last transmit buffer.
Definition kymo_types.h:184
size_t(*) KymoReadBytesFn(void *pContext, uint8_t *pBytesAv, size_t bufferSizeBytes)
Nonblocking read of available transport bytes.
Definition kymo_types.h:143
Shared transport resources, without feature state.
Definition kymo_core.h:26
KymoServiceFn serviceCbk
Optional bounded port maintenance.
Definition kymo_core.h:38
uint8_t * pRxBufferAv
Persistent RX array; required with readBytesCbk.
Definition kymo_core.h:57
KymoIsBusyFn isBusyCbk
Required when write borrows TX storage.
Definition kymo_core.h:35
size_t rxBufferSizeBytes
RX array capacity and byte budget per Main.
Definition kymo_core.h:60
uint8_t * pTxBufferAv
Persistent TX array; required with a config.
Definition kymo_core.h:51
void * pClockContext
Context passed to clockMsCbk.
Definition kymo_core.h:48
void * pTransportContext
Context for read/write/busy/service callbacks.
Definition kymo_core.h:45
KymoClockMsFn clockMsCbk
Optional monotonic millisecond clock.
Definition kymo_core.h:41
size_t txBufferSizeBytes
TX array capacity; must fit selected frames.
Definition kymo_core.h:54
KymoWriteBytesFn writeBytesCbk
Required with transport config.
Definition kymo_core.h:32
KymoReadBytesFn readBytesCbk
Required for receiving features.
Definition kymo_core.h:29