📄 caix.c
字号:
/*====*====*====*====*====*====*====*====*====*====*====*====*====*====*====*
C D M A T R A N S L A T I O N S E R V I C E S
GENERAL DESCRIPTION
This module contains the services which translate a CDMA message between
the internal format used by the Main Control task and the external format
used by the Transmit and Receive tasks.
EXTERNALIZED FUNCTIONS
caix_int_to_ext
Translates a message from internal to external format.
caix_ext_to_int
Translates a message from external to internal format.
INITIALIZATION AND SEQUENCING REQUIREMENTS
None
Copyright (c) 1990,1991,1992 by QUALCOMM, Incorporated. All Rights Reserved.
Copyright (c) 1993,1994,1995 by QUALCOMM, Incorporated. All Rights Reserved.
Copyright (c) 1996,1997,1998 by QUALCOMM, Incorporated. All Rights Reserved.
Copyright (c) 1999-2003 by QUALCOMM, Incorporated. All Rights Reserved.
*====*====*====*====*====*====*====*====*====*====*====*====*====*====*====*/
/* <EJECT> */
/*===========================================================================
EDIT HISTORY FOR MODULE
This section contains comments describing changes made to the module.
Notice that changes are listed in reverse chronological order.
$PVCSPath: L:/src/asw/MSM5100/CP_REL_A/vcs/caix.c_v 1.121 02 Oct 2002 22:52:22 louiel $
$Header: //depot/asic/msmshared/1x/cp/MSMSHARED_CP_CDMA.02.00.64B/caix.c#7 $ $DateTime: 2006/04/11 19:29:28 $ $Author: fchan $
when who what, where, why
-------- --- ----------------------------------------------------------
04/11/06 fc Featurized parser support for ESCAM under FEATURE_IS2000_SCH.
05/26/05 an Pulled in a MEID change from 6500
05/11/05 an Added CAI_NTL_SUP_SVC_REC to xlate_ext_tc_eawim.
05/03/05 an Added support for MEID
02/14/05 an Fixed a packing error for pwr_meas_frames in a PMRM
02/09/05 ph When parsing PPM order from BS for >=PREV7, don't validate ORDQ range.
07/21/04 sj Added support for umts to 1x handover.
03/05/04 bkm Lint cleanup.
02/29/04 yll Revert back the JCDMA JTACS changes because of new JCDMA
requirements.
02/13/04 lh Added validation of PD.
02/12/04 va Pack p_rev 7 fields in CCC IR only if p_rev_in_use
is 7
01/12/04 sb Bug fixes for RTC Reject Order: don't pack rej_param_id for
Retrieve Parms Msg; pack con_ref based on ordq, not msg_type.
12/19/03 sb Fixed for loops in EAWIM/EFWIM, and added dword alignment.
11/18/03 lh Added dependency for qpch_code_chan on sr3_incl in MC_RR.
11/11/03 yll For JCDMA, the mobile shall ignore and discard the
(Extended) Global Service Redirection Message that
contains a JTACS or TACS record.
10/15/03 lh Changed access_ho_allowed[i] to access_ho_allowed inside
the FSIZ macro.
10/03/03 sb Fixed bug in Mobile Station Registered Message.
09/23/02 lh Parsing IT-SPM based on P_REV coming in the message, rather
than based on P_REV_IN_USE.
09/02/03 az Featurized mcc_burst_overflow_size within
FEATURE_MSG_PACK_UNIT_TEST
08/11/03 bkm Made loop condition for record processing CAM same as ECAM,
adds error protection against case of len < order_pos,though
this should never happen.
07/30/03 az Added support to return overflow size for MO SDB
07/30/03 az Added support for FEATURE_SO_8026
07/03/03 fc Removed minimum message length check for ANSI-41 system
parameter message and MC-RR parameter message.
07/01/03 az Added FEATURE_ENHANCED_BAND_CLASS
06/02/03 bkm Lint cleanup.
04/09/03 sb Removed featurization from alignment since SILK supports it.
03/31/03 sb Moved cadence_type to fixed part of Para Alert info rec.
03/21/03 lh Fixed a bug of skipping msg_pos when REL_A is not defined.
03/14/03 va Fixed the bug in traversing recs after CCC in TC stat rsp
if REL_A is not defined.
02/27/03 sb Removed unnecessary is2000_rel_a_incl from Sync Channel Message.
02/19/03 fc Corrected length comparsion on xlate_ext_gen_nl.
02/05/03 fc Cleanup for f-csh forward compability.
01/31/03 bkm Added MSG_HIGH on tranmsit of SCH errors Pwr Msg Rpt Msg.
01/14/03 sb Removed checking for 0 frequency in CCLM.
01/03/03 sb Only align ECAM if not in SILK.
12/12/02 sb Added reserved field to MC-RR.
12/05/02 ph Fixed cc_info_incl reference in UHDM parsing.
11/13/02 sb Fixed featurization.
11/07/02 az Removed FEATURE_IS2000_REV0_PREADDENDUM
11/07/02 az Mainlined FEATURE_IS95B
10/31/02 va Added support for dynamic p_rev
10/02/02 yll Linted the code.
10/01/02 az Mainlined FEATURE_IS2000 and FEATURE_IS2000_2_1_ADDENDUM
07/17/02 ph fixed call wait ind rec parsing to skip the reserved field also.
06/27/02 fc Changes for caii_univ_page_interleaved_addr_type.
06/25/02 az Changed the name of the union for IMSI type specific
subfields from class to class_type.
06/18/02 yll Added support for Base Station Status Req/Rsp Message.
06/13/02 yll Changed the BCSMS feature name to be under Rel A CC.
06/11/02 fc Removed num_page_recs from UPM structure.
06/10/02 sb Removed P_PARAMS macro; changed page_pos to ext_msg_pos.
Changed Sync Channel Message parsing to be more efficient.
06/04/02 sb Sync Channel Message now rejects messages with missing fields.
05/28/02 fc Changes to match UPM interleaved address structure with
message pack unit test.
05/22/02 fc Changes for message pack unit test.
Fixed length comparsion on xlate_ext_e_cl().
Fixed translation for Universal Page Message.
05/20/02 fc Added support for Universal Page Message.
05/06/02 yll Removed FEATURE_IS2000_REL_A_BCSMS for correct message
parsing.
04/16/02 va Fixed emergency record packing for EFWIM.
04/12/02 lh Added support for subaddress in Orig_C.
04/09/02 yll Added Broadcast SMS support on IS2000 RelA common channel.
03/25/02 ph Initialized cc_info_incl for REL_A
03/25/02 fc Removed obsolete messages processing in xlate_ext_fccch_msg.
03/24/02 sb Include ba_parms_len and ra_parms_len in caii_en_ac_parm_type.
03/08/02 sb Updated CAM, ESP, ECAM, Ansi-41, MC-RR, EAPM and SMCM to be in
sync with Addendum 2 published version.
03/12/02 lh Added CMEA support for release A messages.
03/06/02 sb Fixed macro calls for ACCT fields in EAPM
03/04/02 ph Updated with changes to SCM format to sync up with Add 2 pub version.
Also, fixed bug in filling reserved fields for Global Emer Rec
in FWIM and EFWIM.
03/04/02 sb Removed +1's in xlate_ext_bcch_msg function calls (merge error)
02/06/02 lh Fixed NNSCR.
02/22/02 fc Added support for Release A common channels.
02/15/02 sb qpch_power_level_config in MC-RR is now parsed conditionally
02/11/02 va Fixed Global Emer record packing
02/08/02 lh Fixed FTC messages blindly return CAIX_DONE_S.
02/07/02 lh Changed some info rec in RTC msg from byte arry to dword array.
01/24/02 ph Fixed packing of QOS record in outgoing TC msgs (EOM for now)
01/04/02 sb Check p_rev only in SILK (ECCLM)
12/06/01 lh Merged from MSM_CP.05.108.
11/30/01 hxw Added FEATURE_GPSONE_NEW_L2_ACK to support delay L2 Ack
mechanism.
11/13/01 ph In xlate_int_orig(), filled reserved field with '0' before
packing rev_fch_gating_req.
11/27/01 va Merged from MSM_CP.05.100.01.00
10/17/01 lcc When sending release order on access channel, do not include
ORDQ if it is 0.
11/12/01 sb Replaced length check in ECCLM with p_rev check (for Release A fields)
10/15/01 kk Fixed compiler errors when Release A is not defined.
10/12/01 sb Replaced probe_pn_ran in EAPM with reserved field, fixed spelling error
10/03/01 ph fixed dword-alignment problem for Access STRSP and DIM.
10/02/01 ph Merged in from CP VU 96
09/17/01 ht Added a check for null freq in Channel List Message.
09/14/01 lcc Added dword alignment in between translation of each record
in ECAM to make sure that each record starts from a dword
aligned address.
08/21/01 sj Changed rs1_20ms_incl -> rc3_rc5_20ms_incl(Power Control
Msg), rs2_20ms_incl ->rc4_rc6_20ms_incl(Power Control Msg)
& num_visits -> max_num_visits(Candidate Frequency Search
Response message).
09/28/01 kk Added missing position location indicator to Flash msg.
09/10/01 lh Taking out CC fields from GHDM.
09/06/01 sb Replaced length fields in xlate_en_ac_parm with local vars.
08/23/01 ph Fixed typo-bug in nnscr processing
08/20/01 lh Paging channel fixes.
08/16/01 ph Rel A Addendum 2 changes for the FTC
08/16/01 lh Addendum 2 Changes for F-CSCH and R-CSCH.
08/15/01 kk Addendum 2 Changes on Reverse Traffic Channel Added.
06/26/01 kk Added missing field in EOM.
06/26/01 kk Merge from main archive
06/15/01 lcc In xlate_ext_ho_msg, allows extra field to be included at
the end of the message.
06/15/01 lcc Added FEATURE_IS2000 around align_timing in CFSCM.
06/14/01 lcc Corrected Candidate Frequency Search Control Message and
Channel Configuration Capability Information Record to be
Rel. 0 Addendum 2 compliant.
05/29/01 kk Fixed Resource Release msg.
05/22/01 ph some fixes to FTC messages.
05/16/01 lh Merged following changes from common archive.
05/11/01 jq Added length field in ERRM/RRM sending.
05/03/01 lh No logical changes, just added some more parenthesis in
ALIGN_DWORD macro calls, and type casting.
05/02/01 fc Added support of T_ADD_ABORT.
05/02/01 lh Fixed possible mis-alignment for FWD and REV info records.
04/10/01 jq Added msg process related to DCCH and contorl hold support.
05/07/01 ph Fix con_ref so it is not extracted for lock_or_maint order
04/26/01 lh Clean up Band Class Info Rec.
04/18/01 lh Fixes in RTC Status Rsp Msg.
04/18/01 ph some fixes to Ext Disp, changes to sync up "cadence_type" for testing.
04/17/01 lh Changes for unit testing.
04/12/01 ph/kk support for new power control fields, other fixes for FTC msgs.
04/09/01 lh Added capability info rec.
04/09/01 ph FTC uhdm/ghdm fixes.
03/27/01 lh PCH and ACH fixes.
03/27/01 kk Fixed warnings in various functions
03/26/01 kk supplemental channel request message fixes.
03/22/01 ph FTC and RTC fixes in the parser
03/14/01 kk Order fixes
03/13/01 ph Fixes related to FTC msgs
03/12/01 lh UNLM optimization.
03/09/01 lh Fixed compilation problem when FEATURE_IS2000_REL_A is off.
03/08/01 kk Reverse traffic fixes.
03/07/01 lh Release A PCH/ACH bug fixes.
03/06/01 kk Various fixes, removal of pre rel 0 flags.
03/06/01 ph Fixes of bugs found during parser test mostly related
to For traffic channel msgs of Rel A.
03/01/01 kk Maerged changes from the mainline.
02/01/01 cah Correct merge problem in xlate_int_page_resp().
01/24/01 ych Merged T53 and JCDMA features.
01/02/01 lcc Added 6 reserved bits in F/R SCH type specifics fields for BRV
which were missed before.
02/20/02 lh Bug fixes.
02/09/01 lh QOS support in Orig added for unit test.
02/02/01 lh Bug fix in sync msg.
12/21/00 kk/lh Added IS-2000 Release A support.
10/02/00 yll Removed the packing of MSID type. MSID packing was moved
to PDSM.
08/31/00 lcc Added reserved bits in nn-SCR for BRV version of CDMA 2000.
Also removed some lint warnings.
08/18/00 fc Changed F3 PMRM message to use decimal system to indicate
FCH and/or SCH frame statistics.
08/03/00 fc Added #ifdef FEATURE_IS2000 around F3 PMRM message which
indicates SCH statistics.
08/03/00 fc Modified xlate_int_tc_msg() to clarify F3 PMRM message to
indicate FCH and SCH frame statitics.
07/06/00 yll Added packing the MSID to be used by PDSM IS801 services.
07/06/00 yll Added packing the MSID to be used by PDSM IS801 services.
07/06/00 jq Added parser for ECCLM and EGSRM. Modified CFS_RSP and GSRM
parsing for addendum compliance.
06/19/00 jrw 1. Corrected a problem with power control message where the
init_setpt shouldn't have been included with the SCH set points.
2. Added checking for P_REV before parsing the new fields in PMRM.
06/16/00 ks Removed the ifdef FEATURE_IS2000_REV0_PREADDENDUM checking
for flash record tyhpe CAI_FEAT_REC in xlate_int_flash()
06/12/00 ks Added support for align_timing field in CFSRQM message.
06/02/00 jrw Changes to support IS2000 Rev 0 published addendum.
05/25/00 ks Added support for Neighbor Search Window offsets in
Candidate Frequency Search Request Message.
04/24/00 jrw Added ESCAM, outer loop report message, and changes to PMRM.
03/30/00 ry Added a check back to xlate_ext_srv_cfg() that was removed
during the previous merge, and featurized the check under
#ifndef FEATURE_IS2000
03/28/00 ry Fixed compiler warning for Pink Panther build
03/23/00 va Added back support for FEAT_REC_TYPE
Info records alogned at dword boundaries in caii_acstrsp_type
03/07/00 ry Added IS2000 featurization
ry Replaced FEATURE_SILK with FEATURE_MSG_PACK_UNIT_TEST
02/24/00 jrw Fixed access channel bug (layer 2 length field)
02/15/00 jrw Added IS2000 check for new fields in Service Config Rec
02/11/00 jrw Added support for IS2000 Addendum
12/17/99 jrw Added support for IS2000 Phase 1.
10/18/99 kk Added an extra sanity check for Service Redirection message
processing.
08/09/99 ry Initialize pre_proc_done to FALSE in xlate_ext_tc_cfs_req()
and xlate_ext_tc_cfs_ctrl() for action time processing
06/30/99 kmp in the cai_tmo enum correctly made the FEATURE definition
FEATURE_IS95B instead of FEATURE_ACCESS_HO.
06/17/99 kmp Added T72m and N13m to cai_tmo if certain IS-95B features
are defined.
06/02/99 kmp Merged the 2 changes below into the ASW archive.
lh Support release order on access channel, name change
from reserve to auth_mode.
lh Updated for Published version of IS-95B.
05/19/99 doj Consolidated the parsers for HDM, EHDM and GHDM into one
generic handoff message parser. Added macros UNPACKB_PG,
UNPACKW_PG, UNPACKB_PG_DRF, UNPACKW_PG_DRF.
02/13/99 doj Added support for General Handoff Direction Message (GHDM).
Also includes several misc. updates by many people to
support FEATURE_SPECIAL_MDR.
01/18/99 ram Added redirect_type field for SERVICE REDIRECTION Message
as part of IS95B MDR changes.
01/16/99 ram Merged in the changes for IS95B MDR from MDR branch.
01/07/99 lh Not include tmsi.h if FEATURE_TMSI is not defined.
01/06/99 lh Extended Status Response and Status Response now share the
same internal formats.
01/06/99 lh FEATURE_JSTD008 replaced with run-time P_REV and Band
Class checking.
12/23/98 lh Modified ECAM. Now parser will parse the ECAM and pass the
caller a packed internal format.
11/24/98 lh Added comments.
10/29/98 jcw Modify parsing of 95B extended display records to support
new structure fields needed by MC
10/12/98 lh Change soft_slop to soft_slope in ESPM processing.
10/05/98 jcw Parsing of extended display record has been updated to
not treat blank & skip subrecords specially.
09/15/98 lh IS-95B support.
08/12/98 lh IS-95B WLL support added.
01/15/98 lh Added IS-95B Line Control info record parsing.
01/14/98 dna Add support for Korean PCS in Band Class Status Response
04/18/97 dna Changed some #ifdefs to make class 1 IMSI its own feature
12/13/96 jca Processing new fields in Channel Assignment Message
where the ASSIGN_MODE is set to '010'.
09/03/96 dna Fixed unpack of nom_pwr_ext field in access params.
06/28/96 dna Created xlate_ext_tc_hdr and xlate_int_tc_hdr functions.
05/30/96 dna #ifdef JSTD_008 class 1 IMSI packing for access channel.
05/28/96 dna Added Class 1 IMSI support for Access Channel messages.
04/09/96 day Added TMSI addressing modifications. Using T_TMSI ifdef.
03/13/96 day Added J-STD-008 PCS message modifications. Using FEATURE_JSTD008
ifdef.
10/10/95 jca Fixed specific bug where IS95 formatted Analog Handoff
Direction Message was being dropped and in general made
code more robust to future message modifications.
10/03/95 dna Fixed 2 bugs in xlate_ext_ext_ho_dir.
09/18/95 jca Fixed bug in parsing Service Option Control messages.
08/28/95 rdb Fixed processing of type 2 qualification info in
xlate_ext_pc_streq.
08/24/95 rdb Added translation function for information records that
was inadvertently omitted.
08/22/95 gb Fixed NLU message processing.
08/22/95 dna Modified Sync Channel Message unpacking for new field
08/18/95 dna Added assign mode '101' EXT_PAGING_CHAN_ASSIGN
08/10/95 rdb Added translation routines for Status Request and Status
Response Messages, and for new information records
introduced in the IS-95-A TSB.
08/09/95 jca Added General Page Message. Added new Paging and Access
Channel address types including support for IMSI addresses.
08/03/95 dna Added support for message encryption.
07/27/95 gb Fixed a field in Extended Handoff Direction Message.
07/20/95 gb Added Extended Handoff Direction Message.
07/13/95 rdb Added support for service negotiation messages and
for assign mode 4 of chan assign message.
06/25/95 dy Added Data Burst SMS message validation checks.
05/12/94 gb Added F3 screen messages for every TC message.
04/25/94 gb Parameterised all IS95 timeouts in cai_tmo.
04/21/94 jca Fixed spec bug in Parameters Response Message.
12/22/93 jca Switched to IS-95 message formats.
01/23/91 jai Created module.
===========================================================================*/
/* <EJECT> */
/*===========================================================================
INCLUDE FILES FOR MODULE
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -