26#ifndef PROTOCORE_GPIB_H
27#define PROTOCORE_GPIB_H
31#if PROTOCORE_ENABLE_GPIB
36#define PROTOCORE_GPIB_PORT 1234
38#define PROTOCORE_GPIB_DISCOVERY_PORT 3040
45 GPIB_EOS_PROTOCORE_NONE = 3,
60size_t protocore_gpib_command(
char *buf,
size_t cap,
const char *cmd);
68size_t protocore_gpib_addr(
char *buf,
size_t cap, uint8_t pad,
int sad);
75size_t protocore_gpib_read(
char *buf,
size_t cap, GpibRead mode, uint8_t ch);
82size_t protocore_gpib_spoll(
char *buf,
size_t cap,
int pad,
int sad);
85size_t protocore_gpib_eos(
char *buf,
size_t cap, GpibEos eos);
93size_t protocore_gpib_build_data(uint8_t *buf,
size_t cap,
const uint8_t *src,
size_t len);
96embed_bool protocore_gpib_is_command(
const char *line,
size_t len);
103embed_bool protocore_gpib_parse_decimal(
const char *s,
size_t len, uint32_t *out);
111embed_bool protocore_gpib_parse_addr(
const char *s,
size_t len, uint8_t *pad,
int *sad);
118embed_bool protocore_gpib_parse_version(
const char *s,
size_t len,
const char **ver,
size_t *ver_len);
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.