diff options
| author | Yuval Adam <yuv.adm@gmail.com> | 2013-01-28 00:01:15 +0200 |
|---|---|---|
| committer | Yuval Adam <yuv.adm@gmail.com> | 2013-01-28 00:02:44 +0200 |
| commit | 1b8a61dca46d3c5b1d2bc6e0d38377a86bfd3a3f (patch) | |
| tree | 3ecbba2b085b00466f00e4a37dde10d534b6f2c6 | |
| parent | af4871b62b1bfd8946bdc43e5d199ab103bd0099 (diff) | |
POCSAG message struct
| -rw-r--r-- | gascop.c | 16 |
1 files changed, 16 insertions, 0 deletions
@@ -14,6 +14,7 @@ #define POCSAG_WORDSIZE 32 #define POCSAG_SOFTTHRESHOLD 2 #define POCSAG_MAXWORD 16 +#define POCSAG_MSG_LEN 256 #define POCSAG_ASYNC_BUF_NUMBER 12 #define POCSAG_DATA_LEN (16*16384) /* 256K */ @@ -53,6 +54,21 @@ struct { int freq; } Gascop; +struct pocsag_msg +{ + uint32_t bits; + int nb; + int nc; + char buf[POCSAG_MSG_LEN]; +}; + +void pocsag_msg_init(struct pocsag_msg *msg) { + msg->bits = 0; + msg->nb = 0; + msg->nc = 0; + memset(msg->buf, 0x00, POCSAG_MSG_LEN); +} + int hammingWeight(uint32_t n) { unsigned int c; for (c = 0; n; c++) |
