Use GSM48_MT_RR_IMM_ASS instead of hardcoded 0x3f value
Change-Id: Id966cbab403763d006bd5e59757c5bf57402bf9d
diff --git a/src/encoding.cpp b/src/encoding.cpp
index c24d187..67defec 100644
--- a/src/encoding.cpp
+++ b/src/encoding.cpp
@@ -447,7 +447,7 @@
bitvec_write_field(dest, &wp, 0x0, 4); // Skip Indicator
bitvec_write_field(dest, &wp, 0x6, 4); // Protocol Discriminator
- bitvec_write_field(dest, &wp, 0x3F, 8); // Immediate Assignment Message Type
+ bitvec_write_field(dest, &wp, GSM48_MT_RR_IMM_ASS, 8); // Immediate Assignment Message Type
// 10.5.2.25b Dedicated mode or TBF
bitvec_write_field(dest, &wp, 0x0, 1); // spare
diff --git a/src/pcu_l1_if.cpp b/src/pcu_l1_if.cpp
index 67e4de5..f964b78 100644
--- a/src/pcu_l1_if.cpp
+++ b/src/pcu_l1_if.cpp
@@ -510,7 +510,7 @@
switch (data_cnf->sapi) {
case PCU_IF_SAPI_PCH:
- if (data_cnf->data[2] == 0x3f)
+ if (data_cnf->data[2] == GSM48_MT_RR_IMM_ASS)
bts_rcv_imm_ass_cnf(bts, data_cnf->data, data_cnf->fn);
break;
default:
diff --git a/tests/types/TypesTest.cpp b/tests/types/TypesTest.cpp
index c497d07..90244dd 100644
--- a/tests/types/TypesTest.cpp
+++ b/tests/types/TypesTest.cpp
@@ -781,7 +781,7 @@
struct gprs_rlcmac_tbf *tbf = tbf_alloc_dl_tbf(bts, ms, 0, false);
static uint8_t res[] = { 0x06,
- 0x3f, /* Immediate Assignment Message Type */
+ 0x3f, /* Immediate Assignment Message Type (GSM48_MT_RR_IMM_ASS) */
0x30, /* §10.5.2.26 Page Mode and §10.5.2.25b Dedicated mode/TBF */
0x0d, 0x23, 0x6d, /* §10.5.2.25a Packet Channel Description */
/* ETSI TS 44.018 §10.5.2.30 Request Reference */
@@ -806,7 +806,7 @@
GprsMs *ms = bts_alloc_ms(bts, 1, 0);
struct gprs_rlcmac_tbf *tbf = tbf_alloc_ul_tbf(bts, ms, 0, false);
static uint8_t res[] = { 0x06,
- 0x3f, /* Immediate Assignment Message Type */
+ 0x3f, /* Immediate Assignment Message Type (GSM48_MT_RR_IMM_ASS) */
0x10, /* §10.5.2.26 Page Mode and §10.5.2.25b Dedicated mode/TBF */
0x0d, 0x23, 0x6d, /* §10.5.2.25a Packet Channel Description */
/* ETSI TS 44.018 §10.5.2.30 Request Reference */
@@ -824,7 +824,7 @@
void test_immediate_assign_ul0s()
{
static uint8_t res[] = { 0x06,
- 0x3f, /* Immediate Assignment Message Type */
+ 0x3f, /* Immediate Assignment Message Type (GSM48_MT_RR_IMM_ASS) */
0x10, /* §10.5.2.26 Page Mode and §10.5.2.25b Dedicated mode/TBF */
0x0d, 0x23, 0x6d, /* §10.5.2.25a Packet Channel Description */
/* ETSI TS 44.018 §10.5.2.30 Request Reference */
@@ -848,7 +848,7 @@
GprsMs *ms = bts_alloc_ms(bts, 1, 1);
struct gprs_rlcmac_tbf *tbf = tbf_alloc_ul_tbf(bts, ms, 0, false);
static uint8_t res[] = { 0x06,
- 0x3f, /* Immediate Assignment Message Type */
+ 0x3f, /* Immediate Assignment Message Type (GSM48_MT_RR_IMM_ASS) */
0x10, /* §10.5.2.26 Page Mode and §10.5.2.25b Dedicated mode/TBF */
0x0d, 0x23, 0x6d, /* §10.5.2.25a Packet Channel Description */
/* ETSI TS 44.018 §10.5.2.30 Request Reference */
@@ -866,7 +866,7 @@
void test_immediate_assign_ul1m()
{
static uint8_t res[] = { 0x06,
- 0x3f, /* Immediate Assignment Message Type */
+ 0x3f, /* Immediate Assignment Message Type (GSM48_MT_RR_IMM_ASS) */
0x10, /* §10.5.2.26 Page Mode and §10.5.2.25b Dedicated mode/TBF */
0x0d, 0x23, 0x6d, /* §10.5.2.25a Packet Channel Description */
/* ETSI TS 44.018 §10.5.2.30 Request Reference */