added basic hyperframe support for output

This commit is contained in:
luckyhacky 2013-12-30 20:32:09 +01:00 committed by Harald Welte
parent 6430bdeb5f
commit 59e06e22ee
2 changed files with 2 additions and 2 deletions

View File

@ -95,6 +95,5 @@ char *tetra_tdma_time_dump(const struct tetra_tdma_time *tm)
uint32_t tetra_tdma_time2fn(struct tetra_tdma_time *tm)
{
/* FIXME: add hyperframe number !! */
return (tm->mn *18) + tm->fn;
return (((tm->hn * 60) + tm->mn) * 18) + tm->fn;
}

View File

@ -4,6 +4,7 @@
#include <stdint.h>
struct tetra_tdma_time {
uint16_t hn; /* hyperframe number (1 ... 65535) */
uint32_t sn; /* symbol number (1 ... 255) */
uint32_t tn; /* timeslot number (1 .. 4) */
uint32_t fn; /* frame number (1 .. 18) */