4#ifndef PROTOCORE_RADIO_SNIFF_H
5#define PROTOCORE_RADIO_SNIFF_H
35#define RADIO_SNIFF_TAP_LEN 20
40 size_t (*global_header)(uint8_t *, uint8_t *, size_t);
41 uint32_t (*i2f32)(uint8_t *, int32_t);
42 size_t (*tap_record)(uint8_t *, uint8_t *, size_t,
const uint8_t *, size_t, int32_t, uint16_t, uint32_t, uint32_t);
75 int32_t rssi_dbm, uint16_t channel, uint32_t ts_sec, uint32_t ts_usec);
#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.
size_t protocore_radio_sniff_global_header(uint8_t *work, uint8_t *out, size_t cap)
Write the pcap global header for a TAP-framed 802.15.4 sniff. 24, .
size_t protocore_radio_sniff_tap_record(uint8_t *work, uint8_t *out, size_t cap, const uint8_t *frame, size_t flen, int32_t rssi_dbm, uint16_t channel, uint32_t ts_sec, uint32_t ts_usec)
Write one capture record: a pcap record header, the 802.15.4 TAP .
PROTOCORE_NS RadioSniffNs RadioSniff PROTOCORE_UNUSED
Module namespace.
uint32_t protocore_radio_sniff_i2f32(uint8_t *work, int32_t dbm)
Encode a signed integer dBm value as an IEEE-754 float32 .
Dispatch table. Addressed by offset, so the layout is asserted below.
size_t(* global_header)(uint8_t *, uint8_t *, size_t)
#define PROTOCORE_BEGIN_DECLS
Give a header's declarations C linkage, so their symbol names carry no parameter types.
#define PROTOCORE_END_DECLS