20#ifndef PROTOCORE_DNC_STREAM_H
21#define PROTOCORE_DNC_STREAM_H
25#if PROTOCORE_ENABLE_DNC
35 DNC_STREAM_ERR_ARG = -1,
36 DNC_STREAM_ERR_IO = -2,
37 DNC_STREAM_ERR_ENCODE = -3,
48typedef int (*DncSendFn)(
void *ctx,
const uint8_t *data,
size_t len);
49typedef int (*DncRecvFn)(
void *ctx, uint8_t *buf,
size_t cap);
61DncStreamResult dnc_stream(
const DncCfg *cfg,
const char *program,
size_t prog_len, DncSendFn send, DncRecvFn recv,
PROTO_ENUM_PACKED
Application protocol spoken on a listener port or connection slot.
CNC RS-232 DNC (Distributed Numerical Control) drip-feed codec (PROTOCORE_ENABLE_DNC).
#define PROTOCORE_BEGIN_DECLS
Give a header's declarations C linkage, so their symbol names carry no parameter types.
#define PROTOCORE_END_DECLS