37#define T1_DEFAULT_IFSC 32
40#define T1_LEN_RESERVED 0xFF
111uint8_t
t1_lrc(
const uint8_t *buf,
size_t len);
118uint16_t
t1_crc(
const uint8_t *buf,
size_t len);
133 const uint8_t *inf, uint8_t inf_len,
135 uint8_t *out,
size_t out_cap,
size_t *out_len);
149 uint8_t *out,
size_t out_cap,
size_t *out_len);
163 const uint8_t *inf, uint8_t inf_len,
165 uint8_t *out,
size_t out_cap,
size_t *out_len);
Decoded block. INF points into the buffer supplied to t1_block_decode.
t1_status_t t1_block_encode_r(uint8_t nad, uint8_t nr, t1_r_error_t err, bool use_crc, uint8_t *out, size_t out_cap, size_t *out_len)
Encode an R-block.
t1_s_subtype_t
S-block subtype (PCB bits 5-0).
t1_block_kind_t
T=1 block taxonomy.
t1_r_error_t
R-block error indicator (PCB bits 1-0).
t1_status_t t1_block_encode_s(uint8_t nad, t1_s_subtype_t subtype, const uint8_t *inf, uint8_t inf_len, bool use_crc, uint8_t *out, size_t out_cap, size_t *out_len)
Encode an S-block.
uint16_t t1_crc(const uint8_t *buf, size_t len)
Compute the ISO/IEC 13239 CRC-16 of a buffer (polynomial 0x1021, initial value 0xFFFF,...
t1_status_t
Result of t1_block_decode / t1_block_encode.
uint8_t t1_lrc(const uint8_t *buf, size_t len)
Compute the longitudinal redundancy check (LRC) of a buffer.
t1_status_t t1_block_encode_i(uint8_t nad, uint8_t ns, bool more, const uint8_t *inf, uint8_t inf_len, bool use_crc, uint8_t *out, size_t out_cap, size_t *out_len)
Encode an I-block.
t1_status_t t1_block_decode(const uint8_t *buf, size_t buf_len, bool use_crc, t1_block_t *out)
Decode a T=1 block.