32#ifndef JUNO_ASYNC_IO_API_H
33#define JUNO_ASYNC_IO_API_H
struct JUNO_ASYNC_IO_ROOT_TAG JUNO_ASYNC_IO_ROOT_T
Definition async_io_api.h:45
#define JUNO_MODULE_EMPTY
Helper for module definitions with no additional members.
Definition module.h:86
#define JUNO_MODULE_ROOT(API_T,...)
Implement a module root struct containing ptApi and failure fields.
Definition module.h:126
int32_t JUNO_STATUS_T
Canonical status type for LibJuno functions.
Definition status.h:49
uint64_t JUNO_TIME_MICROS_T
Microseconds count type.
Definition time_api.h:77
Module system and dependency injection primitives for LibJuno.
Status codes and failure-handling helpers for LibJuno.
Definition async_io_api.h:50
JUNO_STATUS_T(* Poll)(JUNO_ASYNC_IO_ROOT_T *ptIo, JUNO_TIME_MICROS_T iTimeoutUs, bool *pbHasData)
Poll for input readiness within timeout; sets pbHasData.
Definition async_io_api.h:64
JUNO_STATUS_T(* Read)(JUNO_ASYNC_IO_ROOT_T *ptIo, char *pcBuff, size_t *pzBuffSize)
Read up to *pzBuffSize bytes; updates size with bytes read.
Definition async_io_api.h:52
JUNO_STATUS_T(* ReadUntil)(JUNO_ASYNC_IO_ROOT_T *ptIo, char *pcBuff, size_t *pzBuffSize, const char *pcStopChars, size_t zSizeStopChars)
Read until any stop character is received (size updated).
Definition async_io_api.h:56
JUNO_STATUS_T(* TryReadUntil)(JUNO_ASYNC_IO_ROOT_T *ptIo, char *pcBuff, size_t *pzBuffSize, const char *pcStopChars, size_t zSizeStopChars, JUNO_TIME_MICROS_T iTimeoutUs)
Try to read until stop character or timeout.
Definition async_io_api.h:58
JUNO_STATUS_T(* TryWrite)(JUNO_ASYNC_IO_ROOT_T *ptIo, const void *pvBuff, size_t *pzBuffSize, JUNO_TIME_MICROS_T iTimeoutUs)
Try to write with timeout; updates size with bytes written.
Definition async_io_api.h:62
JUNO_STATUS_T(* Write)(JUNO_ASYNC_IO_ROOT_T *ptIo, const void *pvBuff, size_t *pzBuffSize)
Write up to *pzBuffSize bytes; updates size with bytes written.
Definition async_io_api.h:60
JUNO_STATUS_T(* TryRead)(JUNO_ASYNC_IO_ROOT_T *ptIo, char *pcBuff, size_t *pzBuffSize, JUNO_TIME_MICROS_T iTimeoutUs)
Try to read with timeout; returns when data available or timeout.
Definition async_io_api.h:54
Juno Time module API and common time math helpers.