-char encBuf[ENC_BUF_MAX_LEN];
-int encBufSize;
-
-S16 SendE2APMsg(Region , Pool );
-
-
-/*******************************************************************
- *
- * @brief Writes the encoded chunks into a buffer
- *
- * @details
- *
- * Function : PrepFinalEncBuf
- *
- * Functionality:Fills the encoded buffer
- *
- * @params[in] void *buffer,initial encoded data
- * @params[in] size_t size,size of buffer
- * @params[in] void *encodedBuf,final buffer
- * @return ROK - success
- * RFAILED - failure
- *
- * ****************************************************************/
-static int PrepFinalEncBuf(const void *buffer, size_t size, void *encodedBuf)
-{
- memcpy(encodedBuf + encBufSize, buffer, size);
- encBufSize += size;
- return 0;
-} /* PrepFinalEncBuf */
-
-/*******************************************************************
- *
- * @brief Builds PLMN ID
- *
- * @details
- *
- * Function : BuildPlmnId
- *
- * Functionality: Building the PLMN ID
- *
- * @params[in] PLMNID plmn
- * OCTET_STRING_t *plmnid
- * @return ROK - success
- * RFAILED - failure
- *
- * ****************************************************************/
-
-S16 BuildPlmnId(PlmnId plmn, OCTET_STRING_t *plmnid)
-{
- U8 mncCnt;
- plmnid->size = 3;
- DU_ALLOC(plmnid->buf, plmnid->size * sizeof(U8));
- if(plmnid->buf == NULLP)
- {
- RETVALUE(RFAILED);
- }
- mncCnt = 2;
- plmnid->buf[0] = ((plmn.mcc[1] << 4) | (plmn.mcc[0]));
- if(mncCnt == 2)
- {
- plmnid->buf[1] = ((0xf0) | (plmn.mcc[2]));
- plmnid->buf[2] = ((plmn.mnc[1] << 4) | (plmn.mnc[0]));
- }
- else
- {
- plmnid->buf[1] = ((plmn.mnc[0] << 4) | (plmn.mcc[2]));
- plmnid->buf[2] = ((plmn.mnc[2] << 4) | (plmn.mnc[1]));
- }
- RETVALUE(ROK);
-}
-
-/*******************************************************************
- *
- * @brief Builds NodeB Id
- *
- * @details
- *
- * Function : BuildNodeBId
- *
- * Functionality: Building the NodeBId
- *
- * @params[in] BIT_STRING_t *nbid,
- * U8 unusedBits
- * U8 byteSize
- * U8 val
- *
- * @return ROK - success
- * RFAILED - failure
- *
- * ****************************************************************/
-
-S16 BuildNodeBId(BIT_STRING_t *nbid, U8 unusedBits, U8 byteSize, U8 val)
-{
- U8 tmp;
- nbid->size = byteSize;
- DU_ALLOC(nbid->buf, nbid->size * sizeof(U8));
- if(nbid->buf == NULLP)
- {
- RETVALUE(RFAILED);
- }
-
- for (tmp = 0 ; tmp < ((nbid->size)-1); tmp++)
- {
- nbid->buf[tmp] = 0;
- }
- nbid->buf[byteSize-1] = val;
- nbid->bits_unused = unusedBits;
- RETVALUE(ROK);
-}