34#ifndef PROTOCORE_DNC_H
35#define PROTOCORE_DNC_H
39#if PROTOCORE_ENABLE_DNC
71uint8_t protocore_dnc_iso_to_eia(
char c);
80char protocore_dnc_eia_to_iso(uint8_t b);
87uint8_t protocore_dnc_iso_add_parity(uint8_t ascii7);
96void protocore_dnc_flow_init(DncFlow *f);
103embed_bool protocore_dnc_flow_feed(DncFlow *f, uint8_t rx);
106static inline embed_bool protocore_dnc_flow_can_send(
const DncFlow *f)
115 embed_bool even_parity;
130size_t protocore_dnc_encode_block(
const DncCfg *cfg,
const char *line,
size_t line_len, uint8_t *out,
size_t out_cap);
140size_t protocore_dnc_encode_marker(
const DncCfg *cfg, uint8_t *out,
size_t out_cap);
146size_t protocore_dnc_encode_leader(
const DncCfg *cfg, uint8_t *out,
size_t out_cap);
164 embed_bool in_program;
165 embed_bool line_ready;
169void protocore_dnc_decode_init(DncDecoder *d, DncCode code);
183DncEvent protocore_dnc_decode_feed(DncDecoder *d, uint8_t wire);
EMBED_ENUM_BYTE(ProtoConn, PROTO_NONE=0, PROTO_HTTP=1, PROTO_TELNET=2, PROTO_SSH=3, PROTO_MODBUS=4, PROTO_OPCUA=5, PROTO_SSH_RFWD=6, PROTO_RELAY=7, PROTO_BRIDGE=8, PROTO_NTRIP_CASTER=9, PROTO_MESH=10, PROTO_UDP=11,)
Application protocol spoken on a listener port or connection slot.
#define PROTOCORE_DNC_LINE_MAX
Largest G-code block (one line) the DNC decoder reassembles (PROTOCORE_ENABLE_DNC).