another attempt

This commit is contained in:
2026-11-15 00:58:12 +01:00
parent e7ae3d3ee8
commit 7832c1968e
14 changed files with 332 additions and 126 deletions

No files matched your search

+7 -3
View File
@@ -10,15 +10,19 @@
#define POCSAG_MAX_RIC 0x1FFFFFUL // 21 bit capcode (2097151)
#define POCSAG_ANY_RIC 0xFFFFFFFFUL // POCSAG_Decode(): accept any address
#define POCSAG_MAX_MESSAGE_LENGTH 20U
// Longest alphanumeric message (TX and RX). Also the stored message length, see
// app/messages.h. Up to 45 fits the fixed two-batch TX frame (checked in pocsag.c).
#ifndef POCSAG_MAX_MESSAGE_LENGTH
#define POCSAG_MAX_MESSAGE_LENGTH 33U
#endif
#define POCSAG_PREAMBLE_BYTES 72U // 576 bits of 1010..., the minimum the spec allows
#define POCSAG_BATCH_WORDS 16U
#define POCSAG_BATCH_BYTES (4U + POCSAG_BATCH_WORDS * 4U)
#define POCSAG_BATCH_COUNT 2U
// Every frame produced by POCSAG_Encode() is exactly this long: preamble + two batches.
// Two batches always hold the address plus a 20 character message followed by at least
// one idle codeword (the address sits in slot <= 14, the message needs <= 7 codewords).
// Two batches always hold the address plus a POCSAG_MAX_MESSAGE_LENGTH message followed
// by at least one idle codeword (the address sits in slot <= 14).
#define POCSAG_MAX_FRAME_SIZE (POCSAG_PREAMBLE_BYTES + POCSAG_BATCH_COUNT * POCSAG_BATCH_BYTES)
// Encodes an alphanumeric page for the given 21 bit capcode (RIC).