Commit 8073aefe authored by knopp's avatar knopp
Browse files

applied patches from S. Held, addition of scansim.c and PHY files for UE band scanning

git-svn-id: http://svn.eurecom.fr/openair4G/trunk@6475 818b1a75-f10b-46b9-bf7c-635c3b92a50f
parent 2ff16039
......@@ -222,9 +222,9 @@ void openair_rrc_top_init(int eMBMS_active, char *uecap_xer, uint8_t cba_group_a
// fill UE capability
UECap = fill_ue_capability (uecap_xer);
UE_rrc_inst[module_id].UECap = UECap;
for (module_id = 0; module_id < NB_UE_INST; module_id++) {
UE_rrc_inst[module_id].UECap = UECap;
UE_rrc_inst[module_id].UECapability = UECap->sdu;
UE_rrc_inst[module_id].UECapability_size = UECap->sdu_size;
}
......
......@@ -37,12 +37,12 @@ unsigned int MIH_C_BITMAP82String(MIH_C_BITMAP8_T* dataP, char* bufP) {
return sprintf(bufP, "0x%02X", *dataP);
}
//-----------------------------------------------------------------------------
inline void MIH_C_BITMAP8_encode(Bit_Buffer_t* bbP, MIH_C_BITMAP8_T* dataP) {
void MIH_C_BITMAP8_encode(Bit_Buffer_t* bbP, MIH_C_BITMAP8_T* dataP) {
printf("[MIH_C] %s: %02X\n", __FUNCTION__, *dataP);
BitBuffer_write8(bbP, *dataP);
}
//-----------------------------------------------------------------------------
inline void MIH_C_BITMAP16_encode(Bit_Buffer_t* bbP, MIH_C_BITMAP16_T* dataP) {
void MIH_C_BITMAP16_encode(Bit_Buffer_t* bbP, MIH_C_BITMAP16_T* dataP) {
printf("[MIH_C] %s: %04X\n", __FUNCTION__, *dataP);
BitBuffer_write16(bbP, *dataP);
}
......@@ -52,7 +52,7 @@ unsigned int MIH_C_BITMAP162String(MIH_C_BITMAP16_T* dataP, char* bufP) {
return sprintf(bufP, "0x%04X", *dataP);
}
//-----------------------------------------------------------------------------
inline void MIH_C_BITMAP24_encode(Bit_Buffer_t* bbP, MIH_C_BITMAP24_T* dataP) {
void MIH_C_BITMAP24_encode(Bit_Buffer_t* bbP, MIH_C_BITMAP24_T* dataP) {
//-----------------------------------------------------------------------------
printf("[MIH_C] %s: %02X%02X%02X\n", __FUNCTION__, dataP->val[0],dataP->val[1], dataP->val[2]);
MIH_C_BITMAP8_encode(bbP, &dataP->val[0]);
......@@ -65,26 +65,26 @@ unsigned int MIH_C_BITMAP242String(MIH_C_BITMAP24_T* dataP, char* bufP) {
return sprintf(bufP, "0x%02X%02X%02X", dataP->val[0], dataP->val[1], dataP->val[2]);
}
//-----------------------------------------------------------------------------
inline void MIH_C_BITMAP32_encode(Bit_Buffer_t* bbP, MIH_C_BITMAP32_T* dataP) {
void MIH_C_BITMAP32_encode(Bit_Buffer_t* bbP, MIH_C_BITMAP32_T* dataP) {
printf("[MIH_C] %s: %08X\n", __FUNCTION__, *dataP);
BitBuffer_write32(bbP, *dataP);
}
//-----------------------------------------------------------------------------
inline void MIH_C_BITMAP64_encode(Bit_Buffer_t* bbP, MIH_C_BITMAP64_T* dataP) {
void MIH_C_BITMAP64_encode(Bit_Buffer_t* bbP, MIH_C_BITMAP64_T* dataP) {
//-----------------------------------------------------------------------------
printf("[MIH_C] %s: %16X\n", __FUNCTION__, *dataP);
BitBuffer_write32(bbP, (MIH_C_UNSIGNED_INT4_T)(*dataP>>32));
BitBuffer_write32(bbP, (MIH_C_UNSIGNED_INT4_T)*dataP);
}
//-----------------------------------------------------------------------------
inline void MIH_C_BITMAP128_encode(Bit_Buffer_t* bbP, MIH_C_BITMAP128_T* dataP) {
void MIH_C_BITMAP128_encode(Bit_Buffer_t* bbP, MIH_C_BITMAP128_T* dataP) {
//-----------------------------------------------------------------------------
printf("[MIH_C] %s: %16X%16X\n", __FUNCTION__, dataP->val[0], dataP->val[1]);
MIH_C_BITMAP64_encode(bbP, &dataP->val[0]);
MIH_C_BITMAP64_encode(bbP, &dataP->val[1]);
}
//-----------------------------------------------------------------------------
inline void MIH_C_BITMAP256_encode(Bit_Buffer_t* bbP, MIH_C_BITMAP256_T* dataP) {
void MIH_C_BITMAP256_encode(Bit_Buffer_t* bbP, MIH_C_BITMAP256_T* dataP) {
//-----------------------------------------------------------------------------
printf("[MIH_C] %s: %16X%16X%16X%16X\n", __FUNCTION__, dataP->val[0], dataP->val[1], dataP->val[2], dataP->val[3]);
MIH_C_BITMAP64_encode(bbP, &dataP->val[0]);
......@@ -93,40 +93,40 @@ inline void MIH_C_BITMAP256_encode(Bit_Buffer_t* bbP, MIH_C_BITMAP256_T* dataP)
MIH_C_BITMAP64_encode(bbP, &dataP->val[3]);
}
//-----------------------------------------------------------------------------
inline void MIH_C_CHOICE_encode(Bit_Buffer_t* bbP, MIH_C_CHOICE_T* dataP) {
void MIH_C_CHOICE_encode(Bit_Buffer_t* bbP, MIH_C_CHOICE_T* dataP) {
//-----------------------------------------------------------------------------
BitBuffer_write8(bbP, *dataP);
}
//-----------------------------------------------------------------------------
inline void MIH_C_INTEGER1_encode(Bit_Buffer_t* bbP, MIH_C_INTEGER1_T* dataP) {
void MIH_C_INTEGER1_encode(Bit_Buffer_t* bbP, MIH_C_INTEGER1_T* dataP) {
//-----------------------------------------------------------------------------
BitBuffer_write8(bbP, *dataP);
}
//-----------------------------------------------------------------------------
inline void MIH_C_INTEGER2_encode(Bit_Buffer_t* bbP, MIH_C_INTEGER2_T* dataP) {
void MIH_C_INTEGER2_encode(Bit_Buffer_t* bbP, MIH_C_INTEGER2_T* dataP) {
//-----------------------------------------------------------------------------
BitBuffer_write16(bbP, *dataP);
}
//-----------------------------------------------------------------------------
inline void MIH_C_INTEGER4_encode(Bit_Buffer_t* bbP, MIH_C_INTEGER4_T* dataP) {
void MIH_C_INTEGER4_encode(Bit_Buffer_t* bbP, MIH_C_INTEGER4_T* dataP) {
//-----------------------------------------------------------------------------
BitBuffer_write32(bbP, *dataP);
}
//-----------------------------------------------------------------------------
inline void MIH_C_INTEGER8_encode(Bit_Buffer_t* bbP, MIH_C_INTEGER8_T* dataP) {
void MIH_C_INTEGER8_encode(Bit_Buffer_t* bbP, MIH_C_INTEGER8_T* dataP) {
//-----------------------------------------------------------------------------
BitBuffer_write32(bbP, (MIH_C_UNSIGNED_INT4_T)(*dataP>>32));
BitBuffer_write32(bbP, (MIH_C_UNSIGNED_INT4_T)*dataP);
}
//-----------------------------------------------------------------------------
inline void MIH_C_NULL_encode(Bit_Buffer_t* bbP, MIH_C_NULL_T* dataP) {;}
void MIH_C_NULL_encode(Bit_Buffer_t* bbP, MIH_C_NULL_T* dataP) {;}
//-----------------------------------------------------------------------------
inline void MIH_C_OCTET_encode(Bit_Buffer_t* bbP, MIH_C_F1_Generic_Octet_t *dataP, int lengthP) {
void MIH_C_OCTET_encode(Bit_Buffer_t* bbP, MIH_C_F1_Generic_Octet_t *dataP, int lengthP) {
//-----------------------------------------------------------------------------
BitBuffer_writeMem(bbP, dataP->val, lengthP);
}
//-----------------------------------------------------------------------------
inline void MIH_C_UNSIGNED_INT1_encode(Bit_Buffer_t* bbP, MIH_C_UNSIGNED_INT1_T* dataP) {
void MIH_C_UNSIGNED_INT1_encode(Bit_Buffer_t* bbP, MIH_C_UNSIGNED_INT1_T* dataP) {
printf("[MIH_C] %s: %02X\n", __FUNCTION__, *dataP);
BitBuffer_write8(bbP, *dataP);
}
......@@ -136,7 +136,7 @@ unsigned int MIH_C_UNSIGNED_INT12String(MIH_C_UNSIGNED_INT1_T* dataP, char* bufP
return sprintf(bufP, "0x%02X", *dataP);
}
//-----------------------------------------------------------------------------
inline void MIH_C_UNSIGNED_INT2_encode(Bit_Buffer_t* bbP, MIH_C_UNSIGNED_INT2_T* dataP) {
void MIH_C_UNSIGNED_INT2_encode(Bit_Buffer_t* bbP, MIH_C_UNSIGNED_INT2_T* dataP) {
//-----------------------------------------------------------------------------
BitBuffer_write16(bbP, *dataP);
}
......@@ -146,7 +146,7 @@ unsigned int MIH_C_UNSIGNED_INT22String(MIH_C_UNSIGNED_INT2_T* dataP, char* bufP
return sprintf(bufP, "0x%04X", *dataP);
}
//-----------------------------------------------------------------------------
inline void MIH_C_UNSIGNED_INT4_encode(Bit_Buffer_t* bbP, MIH_C_UNSIGNED_INT4_T* dataP) {
void MIH_C_UNSIGNED_INT4_encode(Bit_Buffer_t* bbP, MIH_C_UNSIGNED_INT4_T* dataP) {
//-----------------------------------------------------------------------------
BitBuffer_write32(bbP, *dataP);
}
......@@ -156,7 +156,7 @@ unsigned int MIH_C_UNSIGNED_INT42String(MIH_C_UNSIGNED_INT4_T* dataP, char* bufP
return sprintf(bufP, "0x%08X", *dataP);
}
//-----------------------------------------------------------------------------
inline void MIH_C_UNSIGNED_INT8_encode(Bit_Buffer_t* bbP, MIH_C_UNSIGNED_INT8_T* dataP) {
void MIH_C_UNSIGNED_INT8_encode(Bit_Buffer_t* bbP, MIH_C_UNSIGNED_INT8_T* dataP) {
//-----------------------------------------------------------------------------
BitBuffer_write32(bbP, (MIH_C_UNSIGNED_INT4_T)(*dataP>>32));
BitBuffer_write32(bbP, (MIH_C_UNSIGNED_INT4_T)*dataP);
......@@ -170,33 +170,33 @@ unsigned int MIH_C_UNSIGNED_INT82String(MIH_C_UNSIGNED_INT8_T* dataP, char* bufP
return buffer_index;\
}
//-----------------------------------------------------------------------------
inline void MIH_C_BITMAP8_decode(Bit_Buffer_t* bbP, MIH_C_BITMAP8_T* dataP) {*dataP = BitBuffer_read(bbP, 8);}
void MIH_C_BITMAP8_decode(Bit_Buffer_t* bbP, MIH_C_BITMAP8_T* dataP) {*dataP = BitBuffer_read(bbP, 8);}
//-----------------------------------------------------------------------------
inline void MIH_C_BITMAP16_decode(Bit_Buffer_t* bbP, MIH_C_BITMAP16_T* dataP) {*dataP = BitBuffer_read(bbP, 16);}
void MIH_C_BITMAP16_decode(Bit_Buffer_t* bbP, MIH_C_BITMAP16_T* dataP) {*dataP = BitBuffer_read(bbP, 16);}
//-----------------------------------------------------------------------------
inline void MIH_C_BITMAP24_decode(Bit_Buffer_t* bbP, MIH_C_BITMAP24_T* dataP) {
void MIH_C_BITMAP24_decode(Bit_Buffer_t* bbP, MIH_C_BITMAP24_T* dataP) {
//-----------------------------------------------------------------------------
MIH_C_BITMAP8_decode(bbP, &dataP->val[0]);
MIH_C_BITMAP8_decode(bbP, &dataP->val[1]);
MIH_C_BITMAP8_decode(bbP, &dataP->val[2]);
}
//-----------------------------------------------------------------------------
inline void MIH_C_BITMAP32_decode(Bit_Buffer_t* bbP, MIH_C_BITMAP32_T* dataP) {*dataP = BitBuffer_read(bbP, 32);}
void MIH_C_BITMAP32_decode(Bit_Buffer_t* bbP, MIH_C_BITMAP32_T* dataP) {*dataP = BitBuffer_read(bbP, 32);}
//-----------------------------------------------------------------------------
inline void MIH_C_BITMAP64_decode(Bit_Buffer_t* bbP, MIH_C_BITMAP64_T* dataP) {
void MIH_C_BITMAP64_decode(Bit_Buffer_t* bbP, MIH_C_BITMAP64_T* dataP) {
//-----------------------------------------------------------------------------
*dataP = BitBuffer_read(bbP, 32);
*dataP = *dataP << 32;
*dataP = *dataP | BitBuffer_read(bbP, 32);
}
//-----------------------------------------------------------------------------
inline void MIH_C_BITMAP128_decode(Bit_Buffer_t* bbP, MIH_C_BITMAP128_T* dataP) {
void MIH_C_BITMAP128_decode(Bit_Buffer_t* bbP, MIH_C_BITMAP128_T* dataP) {
//-----------------------------------------------------------------------------
MIH_C_BITMAP64_decode(bbP, &dataP->val[0]);
MIH_C_BITMAP64_decode(bbP, &dataP->val[1]);
}
//-----------------------------------------------------------------------------
inline void MIH_C_BITMAP256_decode(Bit_Buffer_t* bbP, MIH_C_BITMAP256_T* dataP) {
void MIH_C_BITMAP256_decode(Bit_Buffer_t* bbP, MIH_C_BITMAP256_T* dataP) {
//-----------------------------------------------------------------------------
MIH_C_BITMAP64_decode(bbP, &dataP->val[0]);
MIH_C_BITMAP64_decode(bbP, &dataP->val[1]);
......@@ -204,42 +204,42 @@ inline void MIH_C_BITMAP256_decode(Bit_Buffer_t* bbP, MIH_C_BITMAP256_T* dataP)
MIH_C_BITMAP64_decode(bbP, &dataP->val[3]);
}
//-----------------------------------------------------------------------------
inline void MIH_C_CHOICE_decode(Bit_Buffer_t* bbP, MIH_C_CHOICE_T* dataP) {*dataP = BitBuffer_read(bbP, sizeof(MIH_C_CHOICE_T)*8);}
void MIH_C_CHOICE_decode(Bit_Buffer_t* bbP, MIH_C_CHOICE_T* dataP) {*dataP = BitBuffer_read(bbP, sizeof(MIH_C_CHOICE_T)*8);}
//-----------------------------------------------------------------------------
inline void MIH_C_INTEGER1_decode(Bit_Buffer_t* bbP, MIH_C_INTEGER1_T* dataP) {*dataP = BitBuffer_read(bbP, sizeof(MIH_C_INTEGER1_T)*8);}
void MIH_C_INTEGER1_decode(Bit_Buffer_t* bbP, MIH_C_INTEGER1_T* dataP) {*dataP = BitBuffer_read(bbP, sizeof(MIH_C_INTEGER1_T)*8);}
//-----------------------------------------------------------------------------
inline void MIH_C_INTEGER2_decode(Bit_Buffer_t* bbP, MIH_C_INTEGER2_T* dataP) {*dataP = BitBuffer_read(bbP, sizeof(MIH_C_INTEGER2_T)*8);}
void MIH_C_INTEGER2_decode(Bit_Buffer_t* bbP, MIH_C_INTEGER2_T* dataP) {*dataP = BitBuffer_read(bbP, sizeof(MIH_C_INTEGER2_T)*8);}
//-----------------------------------------------------------------------------
inline void MIH_C_INTEGER4_decode(Bit_Buffer_t* bbP, MIH_C_INTEGER4_T* dataP) {*dataP = BitBuffer_read(bbP, sizeof(MIH_C_INTEGER4_T)*8);}
void MIH_C_INTEGER4_decode(Bit_Buffer_t* bbP, MIH_C_INTEGER4_T* dataP) {*dataP = BitBuffer_read(bbP, sizeof(MIH_C_INTEGER4_T)*8);}
//-----------------------------------------------------------------------------
inline void MIH_C_INTEGER8_decode(Bit_Buffer_t* bbP, MIH_C_INTEGER8_T* dataP) {
void MIH_C_INTEGER8_decode(Bit_Buffer_t* bbP, MIH_C_INTEGER8_T* dataP) {
//-----------------------------------------------------------------------------
*dataP = BitBuffer_read(bbP, sizeof(MIH_C_INTEGER4_T)*8);
*dataP = *dataP << (sizeof(MIH_C_INTEGER4_T)*8);
*dataP = *dataP | BitBuffer_read(bbP, sizeof(MIH_C_INTEGER4_T)*8);
}
//-----------------------------------------------------------------------------
inline void MIH_C_NULL_decode(Bit_Buffer_t* bbP) {;}
void MIH_C_NULL_decode(Bit_Buffer_t* bbP) {;}
//-----------------------------------------------------------------------------
inline void MIH_C_OCTET_decode(Bit_Buffer_t* bbP, MIH_C_F1_Generic_Octet_t *dataP, int lengthP) {
void MIH_C_OCTET_decode(Bit_Buffer_t* bbP, MIH_C_F1_Generic_Octet_t *dataP, int lengthP) {
//-----------------------------------------------------------------------------
BitBuffer_readMem(bbP, dataP->val, lengthP);
}
//-----------------------------------------------------------------------------
inline void MIH_C_UNSIGNED_INT1_decode(Bit_Buffer_t* bbP, MIH_C_UNSIGNED_INT1_T* dataP) {*dataP = BitBuffer_read(bbP, sizeof(MIH_C_UNSIGNED_INT1_T)*8);}
void MIH_C_UNSIGNED_INT1_decode(Bit_Buffer_t* bbP, MIH_C_UNSIGNED_INT1_T* dataP) {*dataP = BitBuffer_read(bbP, sizeof(MIH_C_UNSIGNED_INT1_T)*8);}
//-----------------------------------------------------------------------------
inline void MIH_C_UNSIGNED_INT2_decode(Bit_Buffer_t* bbP, MIH_C_UNSIGNED_INT2_T* dataP) {*dataP = BitBuffer_read(bbP, sizeof(MIH_C_UNSIGNED_INT2_T)*8);}
void MIH_C_UNSIGNED_INT2_decode(Bit_Buffer_t* bbP, MIH_C_UNSIGNED_INT2_T* dataP) {*dataP = BitBuffer_read(bbP, sizeof(MIH_C_UNSIGNED_INT2_T)*8);}
//-----------------------------------------------------------------------------
inline void MIH_C_UNSIGNED_INT4_decode(Bit_Buffer_t* bbP, MIH_C_UNSIGNED_INT4_T* dataP) {*dataP = BitBuffer_read(bbP, sizeof(MIH_C_UNSIGNED_INT4_T)*8);}
void MIH_C_UNSIGNED_INT4_decode(Bit_Buffer_t* bbP, MIH_C_UNSIGNED_INT4_T* dataP) {*dataP = BitBuffer_read(bbP, sizeof(MIH_C_UNSIGNED_INT4_T)*8);}
//-----------------------------------------------------------------------------
inline void MIH_C_UNSIGNED_INT8_decode(Bit_Buffer_t* bbP, MIH_C_UNSIGNED_INT8_T* dataP) {
void MIH_C_UNSIGNED_INT8_decode(Bit_Buffer_t* bbP, MIH_C_UNSIGNED_INT8_T* dataP) {
//-----------------------------------------------------------------------------
*dataP = BitBuffer_read(bbP, sizeof(MIH_C_UNSIGNED_INT4_T)*8);
*dataP = *dataP << 32;
*dataP = *dataP | BitBuffer_read(bbP, sizeof(MIH_C_UNSIGNED_INT4_T)*8);
}
//-----------------------------------------------------------------------------
inline void MIH_C_LIST_LENGTH_encode(Bit_Buffer_t* bbP, u_int16_t lengthP) {
void MIH_C_LIST_LENGTH_encode(Bit_Buffer_t* bbP, u_int16_t lengthP) {
//-----------------------------------------------------------------------------
unsigned int num_more_bytes;
int length;
......@@ -268,7 +268,7 @@ inline void MIH_C_LIST_LENGTH_encode(Bit_Buffer_t* bbP, u_int16_t lengthP) {
}
}
//-----------------------------------------------------------------------------
inline u_int16_t MIH_C_LIST_LENGTH_get_encode_num_bytes(u_int16_t lengthP) {
u_int16_t MIH_C_LIST_LENGTH_get_encode_num_bytes(u_int16_t lengthP) {
//-----------------------------------------------------------------------------
unsigned int num_more_bytes;
if (lengthP <= 128) {
......@@ -283,7 +283,7 @@ inline u_int16_t MIH_C_LIST_LENGTH_get_encode_num_bytes(u_int16_t lengthP) {
}
}
//-----------------------------------------------------------------------------
inline void MIH_C_LIST_LENGTH_decode(Bit_Buffer_t* bbP, u_int16_t *lengthP) {
void MIH_C_LIST_LENGTH_decode(Bit_Buffer_t* bbP, u_int16_t *lengthP) {
//-----------------------------------------------------------------------------
unsigned int num_more_bytes;
MIH_C_UNSIGNED_INT1_T byte1;
......
......@@ -44,14 +44,14 @@ unsigned int MIH_C_3GPP_2G_CELL_ID2String(MIH_C_3GPP_2G_CELL_ID_T *dataP, char*
return buffer_index;
}
//-----------------------------------------------------------------------------
inline void MIH_C_3GPP_2G_CELL_ID_encode(Bit_Buffer_t* bbP, MIH_C_3GPP_2G_CELL_ID_T *dataP) {
void MIH_C_3GPP_2G_CELL_ID_encode(Bit_Buffer_t* bbP, MIH_C_3GPP_2G_CELL_ID_T *dataP) {
//-----------------------------------------------------------------------------
MIH_C_PLMN_ID_encode(bbP, &dataP->plmn_id);
MIH_C_LAC_encode(bbP, &dataP->lac);
MIH_C_CI_encode(bbP, &dataP->ci);
}
//-----------------------------------------------------------------------------
inline void MIH_C_3GPP_2G_CELL_ID_decode(Bit_Buffer_t* bbP, MIH_C_3GPP_2G_CELL_ID_T *dataP) {
void MIH_C_3GPP_2G_CELL_ID_decode(Bit_Buffer_t* bbP, MIH_C_3GPP_2G_CELL_ID_T *dataP) {
//-----------------------------------------------------------------------------
MIH_C_PLMN_ID_decode(bbP, &dataP->plmn_id);
MIH_C_LAC_decode(bbP, &dataP->lac);
......@@ -66,13 +66,13 @@ unsigned int MIH_C_3GPP_3G_CELL_ID2String(MIH_C_3GPP_3G_CELL_ID_T *dataP, char*
return buffer_index;
}
//-----------------------------------------------------------------------------
inline void MIH_C_3GPP_3G_CELL_ID_encode(Bit_Buffer_t* bbP, MIH_C_3GPP_3G_CELL_ID_T *dataP) {
void MIH_C_3GPP_3G_CELL_ID_encode(Bit_Buffer_t* bbP, MIH_C_3GPP_3G_CELL_ID_T *dataP) {
//-----------------------------------------------------------------------------
MIH_C_PLMN_ID_encode(bbP, &dataP->plmn_id);
MIH_C_CELL_ID_encode(bbP, &dataP->cell_id);
}
//-----------------------------------------------------------------------------
inline void MIH_C_3GPP_3G_CELL_ID_decode(Bit_Buffer_t* bbP, MIH_C_3GPP_3G_CELL_ID_T *dataP) {
void MIH_C_3GPP_3G_CELL_ID_decode(Bit_Buffer_t* bbP, MIH_C_3GPP_3G_CELL_ID_T *dataP) {
//-----------------------------------------------------------------------------
MIH_C_PLMN_ID_decode(bbP, &dataP->plmn_id);
MIH_C_CELL_ID_decode(bbP, &dataP->cell_id);
......@@ -112,7 +112,7 @@ unsigned int MIH_C_LINK_ADDR2String(MIH_C_LINK_ADDR_T *dataP, char* bufP) {
return buffer_index;
}
//-----------------------------------------------------------------------------
inline void MIH_C_LINK_ADDR_encode(Bit_Buffer_t* bbP, MIH_C_LINK_ADDR_T *dataP) {
void MIH_C_LINK_ADDR_encode(Bit_Buffer_t* bbP, MIH_C_LINK_ADDR_T *dataP) {
//-----------------------------------------------------------------------------
MIH_C_CHOICE_encode(bbP, &dataP->choice);
switch (dataP->choice) {
......@@ -139,7 +139,7 @@ inline void MIH_C_LINK_ADDR_encode(Bit_Buffer_t* bbP, MIH_C_LINK_ADDR_T *dataP)
}
}
//-----------------------------------------------------------------------------
inline void MIH_C_LINK_ADDR_decode(Bit_Buffer_t* bbP, MIH_C_LINK_ADDR_T *dataP) {
void MIH_C_LINK_ADDR_decode(Bit_Buffer_t* bbP, MIH_C_LINK_ADDR_T *dataP) {
//-----------------------------------------------------------------------------
MIH_C_CHOICE_decode(bbP, &dataP->choice);
switch (dataP->choice) {
......
......@@ -56,7 +56,7 @@ unsigned int MIH_C_OPMODE2String2(MIH_C_OPMODE_T *dataP, char* bufP) {
return buffer_index;
}
//-----------------------------------------------------------------------------
inline void MIH_C_DEV_STATE_RSP_encode(Bit_Buffer_t* bbP, MIH_C_DEV_STATE_RSP_T *dataP) {
void MIH_C_DEV_STATE_RSP_encode(Bit_Buffer_t* bbP, MIH_C_DEV_STATE_RSP_T *dataP) {
//-----------------------------------------------------------------------------
MIH_C_CHOICE_encode(bbP, &dataP->choice);
switch (dataP->choice) {
......@@ -71,7 +71,7 @@ inline void MIH_C_DEV_STATE_RSP_encode(Bit_Buffer_t* bbP, MIH_C_DEV_STATE_RSP_T
}
}
//-----------------------------------------------------------------------------
inline void MIH_C_DEV_STATE_RSP_decode(Bit_Buffer_t* bbP, MIH_C_DEV_STATE_RSP_T *dataP) {
void MIH_C_DEV_STATE_RSP_decode(Bit_Buffer_t* bbP, MIH_C_DEV_STATE_RSP_T *dataP) {
//-----------------------------------------------------------------------------
MIH_C_CHOICE_decode(bbP, &dataP->choice);
switch (dataP->choice) {
......@@ -149,13 +149,13 @@ unsigned int MIH_C_LINK_ID2String(MIH_C_LINK_ID_T *dataP, char* bufP) {
return buffer_index;
}
//-----------------------------------------------------------------------------
inline void MIH_C_LINK_ID_encode(Bit_Buffer_t* bbP, MIH_C_LINK_ID_T *dataP) {
void MIH_C_LINK_ID_encode(Bit_Buffer_t* bbP, MIH_C_LINK_ID_T *dataP) {
//-----------------------------------------------------------------------------
MIH_C_LINK_TYPE_encode(bbP, &dataP->link_type);
MIH_C_LINK_ADDR_encode(bbP, &dataP->link_addr);
}
//-----------------------------------------------------------------------------
inline void MIH_C_LINK_ID_decode(Bit_Buffer_t* bbP, MIH_C_LINK_ID_T *dataP) {
void MIH_C_LINK_ID_decode(Bit_Buffer_t* bbP, MIH_C_LINK_ID_T *dataP) {
//-----------------------------------------------------------------------------
MIH_C_LINK_TYPE_decode(bbP, &dataP->link_type);
MIH_C_LINK_ADDR_decode(bbP, &dataP->link_addr);
......@@ -206,7 +206,7 @@ unsigned int MIH_C_LINK_AC_TYPE2String2(MIH_C_LINK_AC_TYPE_T *dataP, char* bufP)
return buffer_index;
}
//-----------------------------------------------------------------------------
inline void MIH_C_LINK_ACTION_encode(Bit_Buffer_t* bbP, MIH_C_LINK_ACTION_T *dataP) {
void MIH_C_LINK_ACTION_encode(Bit_Buffer_t* bbP, MIH_C_LINK_ACTION_T *dataP) {
//-----------------------------------------------------------------------------
MIH_C_LINK_AC_TYPE_encode(bbP, &dataP->link_ac_type);
MIH_C_LINK_AC_ATTR_encode(bbP, &dataP->link_ac_attr);
......@@ -215,7 +215,7 @@ inline void MIH_C_LINK_ACTION_encode(Bit_Buffer_t* bbP, MIH_C_LINK_ACTION_T *dat
#endif
}
//-----------------------------------------------------------------------------
inline void MIH_C_LINK_ACTION_decode(Bit_Buffer_t* bbP, MIH_C_LINK_ACTION_T *dataP) {
void MIH_C_LINK_ACTION_decode(Bit_Buffer_t* bbP, MIH_C_LINK_ACTION_T *dataP) {
//-----------------------------------------------------------------------------
MIH_C_LINK_AC_TYPE_decode(bbP, &dataP->link_ac_type);
MIH_C_LINK_AC_ATTR_decode(bbP, &dataP->link_ac_attr);
......@@ -226,7 +226,7 @@ inline void MIH_C_LINK_ACTION_decode(Bit_Buffer_t* bbP, MIH_C_LINK_ACTION_T *dat
//-----------------------------------------------------------------------------
// MW Function to bypass ODTONE problem
inline void MIH_C_LINK_ACTION_short_decode(Bit_Buffer_t* bbP, MIH_C_LINK_ACTION_T *dataP) {
void MIH_C_LINK_ACTION_short_decode(Bit_Buffer_t* bbP, MIH_C_LINK_ACTION_T *dataP) {
//-----------------------------------------------------------------------------
MIH_C_LINK_AC_TYPE_decode(bbP, &dataP->link_ac_type);
MIH_C_LINK_AC_ATTR_decode(bbP, &dataP->link_ac_attr);
......@@ -236,7 +236,7 @@ inline void MIH_C_LINK_ACTION_short_decode(Bit_Buffer_t* bbP, MIH_C_LINK_ACTION_
}
//-----------------------------------------------------------------------------
inline void MIH_C_LINK_ACTION_REQ_encode(Bit_Buffer_t* bbP, MIH_C_LINK_ACTION_REQ_T *dataP) {
void MIH_C_LINK_ACTION_REQ_encode(Bit_Buffer_t* bbP, MIH_C_LINK_ACTION_REQ_T *dataP) {
//-----------------------------------------------------------------------------
MIH_C_LINK_ID_encode(bbP, &dataP->link_id);
MIH_C_CHOICE_encode(bbP, &dataP->choice);
......@@ -253,7 +253,7 @@ inline void MIH_C_LINK_ACTION_REQ_encode(Bit_Buffer_t* bbP, MIH_C_LINK_ACTION_RE
MIH_C_LINK_AC_EX_TIME_encode(bbP, &dataP->link_action_ex_time);
}
//-----------------------------------------------------------------------------
inline void MIH_C_LINK_ACTION_REQ_decode(Bit_Buffer_t* bbP, MIH_C_LINK_ACTION_REQ_T *dataP) {
void MIH_C_LINK_ACTION_REQ_decode(Bit_Buffer_t* bbP, MIH_C_LINK_ACTION_REQ_T *dataP) {
//-----------------------------------------------------------------------------
MIH_C_LINK_ID_decode(bbP, &dataP->link_id);
MIH_C_CHOICE_decode(bbP, &dataP->choice);
......@@ -286,7 +286,7 @@ unsigned int MIH_C_SIG_STRENGTH2String(MIH_C_SIG_STRENGTH_T *dataP, char* bufP)
return buffer_index;
}
//-----------------------------------------------------------------------------
inline void MIH_C_SIG_STRENGTH_encode(Bit_Buffer_t* bbP, MIH_C_SIG_STRENGTH_T *dataP) {
void MIH_C_SIG_STRENGTH_encode(Bit_Buffer_t* bbP, MIH_C_SIG_STRENGTH_T *dataP) {
//-----------------------------------------------------------------------------
MIH_C_CHOICE_encode(bbP, &dataP->choice);
switch (dataP->choice) {
......@@ -301,7 +301,7 @@ inline void MIH_C_SIG_STRENGTH_encode(Bit_Buffer_t* bbP, MIH_C_SIG_STRENGTH_T *d
}
}
//-----------------------------------------------------------------------------
inline void MIH_C_SIG_STRENGTH_decode(Bit_Buffer_t* bbP, MIH_C_SIG_STRENGTH_T *dataP) {
void MIH_C_SIG_STRENGTH_decode(Bit_Buffer_t* bbP, MIH_C_SIG_STRENGTH_T *dataP) {
//-----------------------------------------------------------------------------
MIH_C_CHOICE_decode(bbP, &dataP->choice);
switch (dataP->choice) {
......@@ -329,14 +329,14 @@ unsigned int MIH_C_LINK_SCAN_RSP2String(MIH_C_LINK_SCAN_RSP_T *dataP, char* bufP
return buffer_index;
}
//-----------------------------------------------------------------------------
inline void MIH_C_LINK_SCAN_RSP_encode(Bit_Buffer_t* bbP, MIH_C_LINK_SCAN_RSP_T *dataP) {
void MIH_C_LINK_SCAN_RSP_encode(Bit_Buffer_t* bbP, MIH_C_LINK_SCAN_RSP_T *dataP) {
//-----------------------------------------------------------------------------
MIH_C_LINK_ADDR_encode(bbP, &dataP->link_addr);
MIH_C_NETWORK_ID_encode(bbP, &dataP->network_id);
MIH_C_SIG_STRENGTH_encode(bbP, &dataP->sig_strength);
}
//-----------------------------------------------------------------------------
inline void MIH_C_LINK_SCAN_RSP_decode(Bit_Buffer_t* bbP, MIH_C_LINK_SCAN_RSP_T *dataP) {
void MIH_C_LINK_SCAN_RSP_decode(Bit_Buffer_t* bbP, MIH_C_LINK_SCAN_RSP_T *dataP) {
//-----------------------------------------------------------------------------
MIH_C_LINK_ADDR_decode(bbP, &dataP->link_addr);
MIH_C_NETWORK_ID_decode(bbP, &dataP->network_id);
......@@ -344,7 +344,7 @@ inline void MIH_C_LINK_SCAN_RSP_decode(Bit_Buffer_t* bbP, MIH_C_LINK_SCAN_RSP_T
}
//-----------------------------------------------------------------------------
inline void MIH_C_LINK_ACTION_RSP_encode(Bit_Buffer_t* bbP, MIH_C_LINK_ACTION_RSP_T *dataP) {
void MIH_C_LINK_ACTION_RSP_encode(Bit_Buffer_t* bbP, MIH_C_LINK_ACTION_RSP_T *dataP) {
//-----------------------------------------------------------------------------
MIH_C_LINK_ID_encode(bbP, &dataP->link_id);
MIH_C_LINK_AC_RESULT_encode(bbP, &dataP->link_ac_result);
......@@ -360,7 +360,7 @@ inline void MIH_C_LINK_ACTION_RSP_encode(Bit_Buffer_t* bbP, MIH_C_LINK_ACTION_RS
}
}
//-----------------------------------------------------------------------------
inline void MIH_C_LINK_ACTION_RSP_decode(Bit_Buffer_t* bbP, MIH_C_LINK_ACTION_RSP_T *dataP) {
void MIH_C_LINK_ACTION_RSP_decode(Bit_Buffer_t* bbP, MIH_C_LINK_ACTION_RSP_T *dataP) {
//-----------------------------------------------------------------------------
MIH_C_LINK_ID_decode(bbP, &dataP->link_id);
MIH_C_LINK_AC_RESULT_decode(bbP, &dataP->link_ac_result);
......@@ -386,13 +386,13 @@ unsigned int MIH_C_THRESHOLD2String(MIH_C_THRESHOLD_T *dataP, char* bufP) {
return buffer_index;
}
//-----------------------------------------------------------------------------
inline void MIH_C_THRESHOLD_encode(Bit_Buffer_t* bbP, MIH_C_THRESHOLD_T *dataP) {
void MIH_C_THRESHOLD_encode(Bit_Buffer_t* bbP, MIH_C_THRESHOLD_T *dataP) {
//-----------------------------------------------------------------------------
MIH_C_THRESHOLD_VAL_encode(bbP, &dataP->threshold_val);
MIH_C_THRESHOLD_XDIR_encode(bbP, &dataP->threshold_xdir);
}
//-----------------------------------------------------------------------------
inline void MIH_C_THRESHOLD_decode(Bit_Buffer_t* bbP, MIH_C_THRESHOLD_T *dataP) {
void MIH_C_THRESHOLD_decode(Bit_Buffer_t* bbP, MIH_C_THRESHOLD_T *dataP) {
//-----------------------------------------------------------------------------
MIH_C_THRESHOLD_VAL_decode(bbP, &dataP->threshold_val);
MIH_C_THRESHOLD_XDIR_decode(bbP, &dataP->threshold_xdir);
......@@ -424,7 +424,7 @@ unsigned int MIH_C_LINK_PARAM_TYPE2String( MIH_C_LINK_PARAM_TYPE_T *dataP, char*
return buffer_index;
}
//-----------------------------------------------------------------------------
inline void MIH_C_LINK_PARAM_TYPE_encode(Bit_Buffer_t* bbP, MIH_C_LINK_PARAM_TYPE_T *dataP) {
void MIH_C_LINK_PARAM_TYPE_encode(Bit_Buffer_t* bbP, MIH_C_LINK_PARAM_TYPE_T *dataP) {
//-----------------------------------------------------------------------------
MIH_C_CHOICE_encode(bbP, &dataP->choice);
switch (dataP->choice) {
......@@ -446,7 +446,7 @@ inline void MIH_C_LINK_PARAM_TYPE_encode(Bit_Buffer_t* bbP, MIH_C_LINK_PARAM_TYP
}
}
//-----------------------------------------------------------------------------
inline void MIH_C_LINK_PARAM_TYPE_decode(Bit_Buffer_t* bbP, MIH_C_LINK_PARAM_TYPE_T *dataP) {
void MIH_C_LINK_PARAM_TYPE_decode(Bit_Buffer_t* bbP, MIH_C_LINK_PARAM_TYPE_T *dataP) {
//-----------------------------------------------------------------------------
MIH_C_CHOICE_decode(bbP, &dataP->choice);
switch (dataP->choice) {
......@@ -500,7 +500,7 @@ unsigned int MIH_C_LINK_CFG_PARAM2String(MIH_C_LINK_CFG_PARAM_T *dataP, char* bu
return buffer_index;
}
//-----------------------------------------------------------------------------
inline void MIH_C_LINK_CFG_PARAM_encode(Bit_Buffer_t* bbP, MIH_C_LINK_CFG_PARAM_T *dataP) {
void MIH_C_LINK_CFG_PARAM_encode(Bit_Buffer_t* bbP, MIH_C_LINK_CFG_PARAM_T *dataP) {
//-----------------------------------------------------------------------------
MIH_C_LINK_PARAM_TYPE_encode(bbP, &dataP->link_param_type);
MIH_C_CHOICE_encode(bbP, &dataP->choice);
......@@ -522,7 +522,7 @@ inline void MIH_C_LINK_CFG_PARAM_encode(Bit_Buffer_t* bbP, MIH_C_LINK_CFG_PARAM_
MIH_C_THRESHOLD_LIST_encode(bbP, &dataP->threshold_list);
}
//-----------------------------------------------------------------------------
inline void MIH_C_LINK_CFG_PARAM_decode(Bit_Buffer_t* bbP, MIH_C_LINK_CFG_PARAM_T *dataP) {
void MIH_C_LINK_CFG_PARAM_decode(Bit_Buffer_t* bbP, MIH_C_LINK_CFG_PARAM_T *dataP) {
//-----------------------------------------------------------------------------
MIH_C_LINK_PARAM_TYPE_decode(bbP, &dataP->link_param_type);
MIH_C_CHOICE_decode(bbP, &dataP->choice);
......@@ -558,14 +558,14 @@ unsigned int MIH_C_LINK_CFG_STATUS2String(MIH_C_LINK_CFG_STATUS_T *dataP, char*
return buffer_index;
}
//-----------------------------------------------------------------------------
inline void MIH_C_LINK_CFG_STATUS_encode(Bit_Buffer_t* bbP, MIH_C_LINK_CFG_STATUS_T *dataP) {
void MIH_C_LINK_CFG_STATUS_encode(Bit_Buffer_t* bbP, MIH_C_LINK_CFG_STATUS_T *dataP) {
//-----------------------------------------------------------------------------
MIH_C_LINK_PARAM_TYPE_encode(bbP, &dataP->link_param_type);
MIH_C_THRESHOLD_encode(bbP, &dataP->threshold);
MIH_C_CONFIG_STATUS_encode(bbP, &dataP->config_status);
}
//-----------------------------------------------------------------------------
inline void MIH_C_LINK_CFG_STATUS_decode(Bit_Buffer_t* bbP, MIH_C_LINK_CFG_STATUS_T *dataP) {
void MIH_C_LINK_CFG_STATUS_decode(Bit_Buffer_t* bbP, MIH_C_LINK_CFG_STATUS_T *dataP) {
//-----------------------------------------------------------------------------
MIH_C_LINK_PARAM_TYPE_decode(bbP, &dataP->link_param_type);
MIH_C_THRESHOLD_decode(bbP, &dataP->threshold);
......@@ -590,7 +590,7 @@ unsigned int MIH_C_LINK_DESC_RSP2String(MIH_C_LINK_DESC_RSP_T *dataP, char* bufP
return buffer_index;
}
//-----------------------------------------------------------------------------
inline void MIH_C_LINK_DESC_RSP_encode(Bit_Buffer_t* bbP, MIH_C_LINK_DESC_RSP_T *dataP) {
void MIH_C_LINK_DESC_RSP_encode(Bit_Buffer_t* bbP, MIH_C_LINK_DESC_RSP_T *dataP) {
//-----------------------------------------------------------------------------
MIH_C_CHOICE_encode(bbP, &dataP->choice);
switch (dataP->choice) {
......@@ -605,7 +605,7 @@ inline void MIH_C_LINK_DESC_RSP_encode(Bit_Buffer_t* bbP, MIH_C_LINK_DESC_RSP_T
}
}
//-----------------------------------------------------------------------------
inline void MIH_C_LINK_DESC_RSP_decode(Bit_Buffer_t* bbP, MIH_C_LINK_DESC_RSP_T *dataP) {
void MIH_C_LINK_DESC_RSP_decode(Bit_Buffer_t* bbP, MIH_C_LINK_DESC_RSP_T *dataP) {
//-----------------------------------------------------------------------------
MIH_C_CHOICE_decode(bbP, &dataP->choice);
switch (dataP->choice) {
......@@ -640,7 +640,7 @@ unsigned int MIH_C_LINK_PARAM2String(MIH_C_LINK_PARAM_T *dataP, char* bufP) {
return buffer_index;
}
//-----------------------------------------------------------------------------
inline void MIH_C_LINK_PARAM_encode(Bit_Buffer_t* bbP, MIH_C_LINK_PARAM_T *dataP) {
void MIH_C_LINK_PARAM_encode(Bit_Buffer_t* bbP, MIH_C_LINK_PARAM_T *dataP) {
//-----------------------------------------------------------------------------
MIH_C_LINK_PARAM_TYPE_encode(bbP, &dataP->link_param_type);
MIH_C_CHOICE_encode(bbP, &dataP->choice);
......@@ -652,7 +652,7 @@ inline void MIH_C_LINK_PARAM_encode(Bit_Buffer_t* bbP, MIH_C_LINK_PARAM_T *dataP
}
}
//-----------------------------------------------------------------------------
inline void MIH_C_LINK_PARAM_decode(Bit_Buffer_t* bbP, MIH_C_LINK_PARAM_T *dataP) {
void MIH_C_LINK_PARAM_decode(Bit_Buffer_t* bbP, MIH_C_LINK_PARAM_T *dataP) {
//-----------------------------------------------------------------------------
MIH_C_LINK_PARAM_TYPE_decode(bbP, &dataP->link_param_type);
MIH_C_CHOICE_decode(bbP, &dataP->choice);
......@@ -683,7 +683,7 @@ unsigned int MIH_C_LINK_PARAM_RPT2String(MIH_C_LINK_PARAM_RPT_T *dataP, char* bu
return buffer_index;
}
//-----------------------------------------------------------------------------
inline void MIH_C_LINK_PARAM_RPT_encode(Bit_Buffer_t* bbP, MIH_C_LINK_PARAM_RPT_T *dataP) {
void MIH_C_LINK_PARAM_RPT_encode(Bit_Buffer_t* bbP, MIH_C_LINK_PARAM_RPT_T *dataP) {
//-----------------------------------------------------------------------------
MIH_C_LINK_PARAM_encode(bbP, &dataP->link_param);
MIH_C_CHOICE_encode(bbP, &dataP->choice);
......@@ -695,7 +695,7 @@ inline void MIH_C_LINK_PARAM_RPT_encode(Bit_Buffer_t* bbP, MIH_C_LINK_PARAM_RPT_
}
}
//-----------------------------------------------------------------------------
inline void MIH_C_LINK_PARAM_RPT_decode(Bit_Buffer_t* bbP, MIH_C_LINK_PARAM_RPT_T *dataP) {
void MIH_C_LINK_PARAM_RPT_decode(Bit_Buffer_t* bbP, MIH_C_LINK_PARAM_RPT_T *dataP) {
//-----------------------------------------------------------------------------
MIH_C_LINK_PARAM_decode(bbP, &dataP->link_param);
MIH_C_CHOICE_decode(bbP, &dataP->choice);
......@@ -707,13 +707,13 @@ inline void MIH_C_LINK_PARAM_RPT_decode(Bit_Buffer_t* bbP, MIH_C_LINK_PARAM_RPT_
}
}
//-----------------------------------------------------------------------------
inline void MIH_C_LINK_POA_LIST_encode(Bit_Buffer_t* bbP, MIH_C_LINK_POA_LIST_T *dataP) {
void MIH_C_LINK_POA_LIST_encode(Bit_Buffer_t* bbP, MIH_C_LINK_POA_LIST_T *dataP) {
//-----------------------------------------------------------------------------
MIH_C_LINK_ID_encode(bbP, &dataP->link_id);
MIH_C_LINK_ADDR_LIST_encode(bbP, &dataP->link_addr_list);
}
//-----------------------------------------------------------------------------
inline void MIH_C_LINK_POA_LIST_decode(Bit_Buffer_t* bbP, MIH_C_LINK_POA_LIST_T *dataP) {
void MIH_C_LINK_POA_LIST_decode(Bit_Buffer_t* bbP, MIH_C_LINK_POA_LIST_T *dataP) {
//-----------------------------------------------------------------------------
MIH_C_LINK_ID_decode(bbP, &dataP->link_id);
MIH_C_LINK_ADDR_LIST_decode(bbP, &dataP->link_addr_list);
......@@ -737,7 +737,7 @@ unsigned int MIH_C_LINK_STATES_RSP2String(MIH_C_LINK_STATES_RSP_T *dataP, char*
return buffer_index;
}
//-----------------------------------------------------------------------------
inline void MIH_C_LINK_STATES_RSP_encode(Bit_Buffer_t* bbP, MIH_C_LINK_STATES_RSP_T *dataP