diff options
author | Harald Welte <laforge@gnumonks.org> | 2019-09-03 13:54:37 +0200 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2019-09-05 14:30:17 +0200 |
commit | f53fde91a36eff2601df9811fddee97b8f89d6ee (patch) | |
tree | 4fab4e91ba2be64871a04406d2d257f4e6f221b8 /tests | |
parent | cb57028d52b711dfbc27dacf0b82c5a12f1f71c2 (diff) |
ETWS Primary Notification via P1 Rest Octets
The ETWS (Earthquake and Tsunami Warning System) uses a so-called
ETWS Primary Notification which is sent
* to phones in dedicated mode (via DCCH from the BSC)
* to phones in idle mode (via P1 Rest Octets on PCH/CCCH)
This patch implements the second part of the functionality, i.e.
transmitting the related ETWS Primary Notification via PCH. As
3GPP doesn't specify how this is communicated over Abis, we use
a new, vendor-specific RSL message type.
Closes: OS#4047
Depends: libosmocore I89c24a81ada6627694a9632e87485a61cbd3e680
Depends: libosmocore I36fc2ffc22728887d1cb8768c7fcd9739a8ec0fc
Change-Id: I18c60cdb86b9c19e09f5ec06d66e9b91608880e6
Diffstat (limited to 'tests')
-rw-r--r-- | tests/paging/paging_test.c | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/tests/paging/paging_test.c b/tests/paging/paging_test.c index f112404a..af8accc5 100644 --- a/tests/paging/paging_test.c +++ b/tests/paging/paging_test.c @@ -42,6 +42,16 @@ static const uint8_t static_ilv[] = { abort(); \ } +static bool is_padding(const uint8_t *in, size_t len) +{ + int i; + for (i = 0; i < len; i++) { + if (in[i] != 0x2b) + return false; + } + return true; +} + static void test_paging_smoke(void) { int rc; @@ -61,7 +71,8 @@ static void test_paging_smoke(void) g_time.t2 = 0; g_time.t3 = 6; rc = paging_gen_msg(bts->paging_state, out_buf, &g_time, &is_empty); - ASSERT_TRUE(rc == 13); + ASSERT_TRUE(rc == 23); + ASSERT_TRUE(is_padding(out_buf+13, 23-13)); ASSERT_TRUE(is_empty == 0); ASSERT_TRUE(paging_group_queue_empty(bts->paging_state, 0)); @@ -73,7 +84,8 @@ static void test_paging_smoke(void) g_time.t2 = 0; g_time.t3 = 6; rc = paging_gen_msg(bts->paging_state, out_buf, &g_time, &is_empty); - ASSERT_TRUE(rc == 6); + ASSERT_TRUE(rc == 23); + ASSERT_TRUE(is_padding(out_buf+6, 23-6)); ASSERT_TRUE(is_empty == 1); /* @@ -104,7 +116,8 @@ static void test_paging_sleep(void) g_time.t2 = 0; g_time.t3 = 6; rc = paging_gen_msg(bts->paging_state, out_buf, &g_time, &is_empty); - ASSERT_TRUE(rc == 13); + ASSERT_TRUE(rc == 23); + ASSERT_TRUE(is_padding(out_buf+13, 23-13)); ASSERT_TRUE(is_empty == 0); ASSERT_TRUE(paging_group_queue_empty(bts->paging_state, 0)); |