4#ifndef PROTOCORE_SIGFOX_H
5#define PROTOCORE_SIGFOX_H
45 uint16_t (*
build_uplink)(
const uint8_t *,
const uint8_t *, uint8_t,
char *, uint16_t);
46 protocore_sigfox_result (*
parse_response)(
const uint8_t *,
const char *, uint16_t);
#define PROTOCORE_UNUSED
Suppress the unused warning. Every module ends in a namespace most callers only partly use.
#define PROTOCORE_NS_LAYOUT(T,...)
Pin every dispatch slot of a table that is nothing but function pointers.
#define PROTOCORE_NS
Storage for a dispatch table. The const is load bearing.
uint16_t protocore_sigfox_build_uplink(const uint8_t *work, const uint8_t *payload, uint8_t len, char *out, uint16_t cap)
Format an AT$SF=<hex>\r\n uplink command for payload into out (a .
EMBED_ENUM_BYTE(protocore_sigfox_result, SIGFOX_PENDING=0, SIGFOX_OK=1, SIGFOX_ERROR=2,)
Classification of a Sigfox modem response line.
protocore_sigfox_result protocore_sigfox_parse_response(const uint8_t *work, const char *buf, uint16_t len)
Classify a modem reply (scans buf for "OK" / "ERROR").
Dispatch table. Addressed by offset, so the layout is asserted below.
uint16_t(* build_uplink)(const uint8_t *, const uint8_t *, uint8_t, char *, uint16_t)
protocore_sigfox_result(* parse_response)(const uint8_t *, const char *, uint16_t)