⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ma_acc.h

📁 gsm map协议源代码
💻 H
📖 第 1 页 / 共 5 页
字号:
/********************************************************************16**

                         (c) COPYRIGHT 1989-2005 by 
                         Continuous Computing Corporation.
                         All rights reserved.

     This software is confidential and proprietary to Continuous Computing 
     Corporation (CCPU).  No part of this software may be reproduced,
     stored, transmitted, disclosed or used in any form or by any means
     other than as expressly provided by the written Software License 
     Agreement between CCPU and its licensee.

     CCPU warrants that for a period, as provided by the written
     Software License Agreement between CCPU and its licensee, this
     software will perform substantially to CCPU specifications as
     published at the time of shipment, exclusive of any updates or 
     upgrades, and the media used for delivery of this software will be 
     free from defects in materials and workmanship.  CCPU also warrants 
     that has the corporate authority to enter into and perform under the   
     Software License Agreement and it is the copyright owner of the software 
     as originally delivered to its licensee.

     CCPU MAKES NO OTHER WARRANTIES, EXPRESS OR IMPLIED, INCLUDING
     WITHOUT LIMITATION WARRANTIES OF MERCHANTABILITY OR FITNESS FOR
     A PARTICULAR PURPOSE WITH REGARD TO THIS SOFTWARE, SERVICE OR ANY RELATED
     MATERIALS.

     IN NO EVENT SHALL CCPU BE LIABLE FOR ANY INDIRECT, SPECIAL,
     CONSEQUENTIAL DAMAGES, OR PUNITIVE DAMAGES IN CONNECTION WITH OR ARISING
     OUT OF THE USE OF, OR INABILITY TO USE, THIS SOFTWARE, WHETHER BASED
     ON BREACH OF CONTRACT, TORT (INCLUDING NEGLIGENCE), PRODUCT
     LIABILITY, OR OTHERWISE, AND WHETHER OR NOT IT HAS BEEN ADVISED
     OF THE POSSIBILITY OF SUCH DAMAGE.

                       Restricted Rights Legend

     This software and all related materials licensed hereby are
     classified as "restricted computer software" as defined in clause
     52.227-19 of the Federal Acquisition Regulation ("FAR") and were
     developed entirely at private expense for nongovernmental purposes,
     are commercial in nature and have been regularly used for
     nongovernmental purposes, and, to the extent not published and
     copyrighted, are trade secrets and confidential and are provided
     with all rights reserved under the copyright laws of the United
     States.  The government's rights to the software and related
     materials are limited and restricted as provided in clause
     52.227-19 of the FAR.

                    IMPORTANT LIMITATION(S) ON USE

     The use of this software is limited to the use set
     forth in the written Software License Agreement between CCPU and
     its Licensee. Among other things, the use of this software
     may be limited to a particular type of Designated Equipment, as 
     defined in such Software License Agreement.
     Before any installation, use or transfer of this software, please
     consult the written Software License Agreement or contact CCPU at
     the location set forth below in order to confirm that you are
     engaging in a permissible use of the software.

                    Continuous Computing Corporation
                    9380, Carroll Park Drive
                    San Diego, CA-92121, USA

                    Tel: +1 (858) 882 8800
                    Fax: +1 (858) 777 3388

                    Email: support@trillium.com
                    Web: http://www.ccpu.com

*********************************************************************17*/

/********************************************************************20**
  
     Name:     MAP
  
     Type:     C include file
  
     Desc:     Defines required by MAP Acceptance Test.
 
     File:     ma_acc.h

     Sid:      ma_acc.h@@/main/9 - Fri Sep 16 02:36:17 2005

     Prg:      ssk

*********************************************************************21*/

#ifndef __MAACCH__
#define __MAACCH__








/* ma002.203 : Addition. Addnl support to aid in internal testing */
#ifdef SS_MULTIPLE_PROCS
#define TSTPROCID0   0
#endif



/* Acceptance Test Error Log */

#define AULOGERROR(errCls, errCode, errVal, errDesc)                    \
    SLogError(maAccCb.init.ent, maAccCb.init.inst, maAccCb.init.procId, \
              __FILE__, __LINE__, errCls, errCode, errVal, errDesc)

#define L4LOGERROR(errCls, errCode, errVal, errDesc)                    \
    SLogError(maAccCb.init.ent, maAccCb.init.inst, maAccCb.init.procId, \
              __FILE__, __LINE__, errCls, errCode, errVal, errDesc)


#define EAU100             100
#define EAU101             101

#ifndef MA_PERIOD
#define MA_PERIOD          1     /* timer resolution */
#endif

/* local defines */

#if (MAP_SEC && LMAV2)
#define MA_ACC_MAX_PLMN        6
#define MA_ACC_MAP_PLMNA       0
#define MA_ACC_MAP_PLMNB       1
#define MA_ACC_MAP_PLMNC       2

#define MA_ACC_MAX_SA_PLMNS    1
#define MA_ACC_SA_PLMNA        0
#define MA_ACC_SA_PLMNB        1
#define MA_ACC_SA_PLMNC        2

#define MA_ACC_PG1             1
#define MA_ACC_PG5             5
#define MA_ACC_PG6             6
#define MA_ACC_PG7             7
#define MA_ACC_NMB_PGTUPLE     20

#define MA_ACC_TVP_PRD         1
#define MA_ACC_TVP_WINSZ       10

#define MA_ACC_MEKLEN          4
#define MA_ACC_MIKLEN          4

#define MA_ACC_NMB_OPCMP       20

#define MA_ACC_MAX_PP          16
#define MA_ACC_PP_F            6
#define MA_ACC_PP_G            7

#define LMA_REASON_PLMN_EXISTS   0xA3

#define MA_ACC_PLMN_MCC_A      0xf359
#define MA_ACC_PLMN_MNC_A      0xff60
#define MA_ACC_PLMN_MCC_B      0xf360
#define MA_ACC_PLMN_MNC_B      0xf561
#define MA_ACC_PLMN_MCC_C      0xf361
#define MA_ACC_PLMN_MNC_C      0xff62
#define MA_ACC_PLMN_MCC_D      0xf460
#define MA_ACC_PLMN_MNC_D      0xf963
#define MA_ACC_PLMN_MCC_E      0xf461
#define MA_ACC_PLMN_MNC_E      0xff64
#define MA_ACC_PLMN_MCC_F      0xf462
#define MA_ACC_PLMN_MNC_F      0xff65

#define MA_ACC_PLMN_CC_A       0xfff1
#define MA_ACC_PLMN_NDC_A      0xfff54321
#define MA_ACC_PLMN_CC_B       0xff23
#define MA_ACC_PLMN_NDC_B      0xffff6789
#define MA_ACC_PLMN_CC_C       0xf456
#define MA_ACC_PLMN_NDC_C      0xfffff012
#define MA_ACC_PLMN_CC_D       0xf789
#define MA_ACC_PLMN_NDC_D      0xfff12345
#define MA_ACC_PLMN_CC_E       0xff56
#define MA_ACC_PLMN_NDC_E      0xfff65432
#define MA_ACC_PLMN_CC_F       0xf456
#define MA_ACC_PLMN_NDC_F      0xfffffff7
#endif

#if (MAP_SEC && MAP_REL4 && MAP_REL99)
#define MA_ACC_CHK_AC_NOT_SUPP(_res, _refRes)               \
{                                                              \
   if ((_refRes).pres == TRUE)                                 \
   {                                                           \
      if ((_refRes).val == MAT_ACN_NOT_SUPPORTED)           \
          _res = RFAILED;                                      \
   }                                                           \
   else                                                        \
      _res = ROK;                                              \
}

#define MA_ACC_CHK_TRNS_PROT_NOT_ADQT(_res, _refRes)           \
{                                                              \
   if ((_refRes).pres == TRUE)                                 \
   {                                                           \
      if ((_refRes).val == MAT_TRANS_PROTE_NOT_ADEQ)           \
          _res = RFAILED;                                      \
   }                                                           \
   else                                                        \
      _res = ROK;                                              \
}

#define MA_ACC_CHK_SEC_TRANS_NOT_POSSIBLE(_res, _refRes)       \
{                                                              \
   if ((_refRes).pres == TRUE)                                 \
   {                                                           \
      if ((_refRes).val == MAT_SEC_TRANS_NOT_PBLE)             \
          _res = RFAILED;                                      \
   }                                                           \
   else                                                        \
      _res = ROK;                                              \
}


#define MA_ACC_CHK_POT_VER_INCOMP(_res, _refRes)               \
{                                                              \
   if ((_refRes).pres == TRUE)                                 \
   {                                                           \
      if ((_refRes).val == MAT_POT_VER_INCOMP)                 \
          _res = RFAILED;                                      \
   }                                                           \
   else                                                        \
      _res = ROK;                                              \
}

#define MA_ACC_CHK_NODE_NOT_REACH(_res, _refRes)               \
{                                                              \
   if ((_refRes).pres == TRUE)                                 \
   {                                                           \
      if ((_refRes).val == MAT_NODE_NOT_REACHABLE)             \
          _res = RFAILED;                                      \
   }                                                           \
   else                                                        \
      _res = ROK;                                              \
}
#endif

#define TSTREG      OWNREGION       /* memory region id */
#define TSTINST_0           0       /* instance */
#define TSTINST_1           1       /* instance */
#ifndef STMA
#define TSTPOOL             0       /* pool value */
#endif
#define MA_TSTPRIOR         0       /* Priority */
#define MA_SEL_LC           0       /* selector 0 (loosely-coupled) */
#define MA_SEL_TC           1       /* selector 1 (tightly-coupled) */
#define MA_ACC_INIT_WAIT    100     /* Wait time to initialize the test cases */

#define MA_ACC_INVKID_1   1         /* Invoke Id 1 */
#define MA_ACC_INVKID_2   2         /* Invoke Id 2 */
#define MA_ACC_ST_OPCODE  99        /* Operation code */
#define MA_ACC_MSGLEN_2   2         /* Message Length */
#define MA_ACC_MSGLEN_6   6         /* Message Length */
#define MA_ACC_MSGLEN_7   7         /* Message Length */

/* Sap Ids */
#define MA_ACC_SAP_0    0
#define MA_ACC_SAP_1    1
#define MA_ACC_SAP_2    2
#define MA_ACC_SAP_3    3
#define MA_ACC_SAP_4    4
#define MA_ACC_SAP_5    5
#define MA_ACC_SAP_6    6
#define MA_ACC_SAP_7    7

/* Resources configured in the MAP Layer */
#define MA_ACC_MAX_SAPS             8   /* Maximum number of Saps */
#define MA_ACC_MAX_DLGS           50   /* Maximum number of dialogues */
#define MA_ACC_MAX_OPRS           52   /* Maximum number of operations */
#define MA_ACC_SAP_DLGS           50   /* Max. number of dialogues on a Sap */
#define MA_ACC_SAP_OPR            50   /* Max. number of operations on a Sap */
#define MA_ACC_MAX_SEQ_DLGS       50   /* Max.number of seq. dialogues */
#define MA_ACC_MAX_SEQ_OPRS       50   /* Max. nmb. of seq. operations */
#define MA_ACC_MSG_QSIZE          10    /* Queue Size */
#ifdef ZJ
#define MA_ACC_MAX_TESTS          1500   /* Maximum number of test cases */
#else
#define MA_ACC_MAX_TESTS          750   /* Maximum number of test cases */
#endif
#define MA_ACC_MAX_BADPARAM_TSTS    7   /* Max. nmb of tests for bad params*/

#define MA_ACC_GRDTMR              50   /* Guard  Timer */

/* Timer values - for integrated testing */
#define MA_ACC_ST_T1            10        /* Invoke Timer */
#define MA_ACC_ST_T2             0        /* Reject Timer */

#define IS_VER_EQUAL(pSwtch,ver) \
            ( ( (pSwtch == LMA_VER1) && (IS_EQUAL_VER1(ver))) ||\
              ( (pSwtch == LMA_VER2) && (IS_EQUAL_VER2(ver))) ||\
              ( (pSwtch == LMA_VER2P) && (IS_EQUAL_VER2P(ver))) ||\
              ( (pSwtch == LMA_VER4) && (IS_EQUAL_VER4(ver))))
 
/* dialogue Ids */
#define MA_ACC_START_DLGID   1     /* start of the dialogue Ids */
#define MA_ACC_DLGID_RANGE   200   /* start of the dialogue Ids */

/* Event types */
#define MA_ACC_EVT_OPEN_IND      MAT_EVTOPENIND   /* Open Indication from MAP Layer */
#define MA_ACC_EVT_OPEN_CFM      MAT_EVTOPENCFM   /* Open Confirm from MAP Layer */
#define MA_ACC_EVT_DLG_CFM       MAT_EVTDLGCFM   /* Dialogue Confirm from MAP Layer */
#define MA_ACC_EVT_DELIM_IND     MAT_EVTDELIMIND   /* Delimiter Indication from MAP Layer */
#define MA_ACC_EVT_CLOSE_IND     MAT_EVTCLOSEIND   /* Close Indication from MAP Layer */
#define MA_ACC_EVT_ABT_IND       MAT_EVTABRTIND   /* Abort Indication from MAP Layer */
#define MA_ACC_EVT_NOT_IND       MAT_EVTNOTICEIND   /* Notice Indication from MAP Layer */
#define MA_ACC_EVT_STE_IND       MAT_EVTSTEIND   /* State Indication from MAP Layer */
#define MA_ACC_EVT_STE_CFM       MAT_EVTSTECFM   /* State Confirm from MAP Layer */
#define MA_ACC_EVT_HOMGMT_IND    MAT_EVTHOMGMTIND /* Operation Indication from MAP Layer */
#define MA_ACC_EVT_HOMGMT_CFM    MAT_EVTHOMGMTCFM /* Operation Confirm from MAP Layer */
#define MA_ACC_EVT_AUTHMGMT_IND  MAT_EVTAUTHMGMTIND /* Operation Indication from MAP Layer */
#define MA_ACC_EVT_AUTHMGMT_CFM  MAT_EVTAUTHMGMTCFM /* Operation Confirm from MAP Layer */
#define MA_ACC_EVT_IMEIMGMT_IND  MAT_EVTIMEIMGMTIND /* Operation Indication from MAP Layer */
#define MA_ACC_EVT_IMEIMGMT_CFM  MAT_EVTIMEIMGMTCFM /* Operation Confirm from MAP Layer */
#define MA_ACC_EVT_SUBMGMT_IND   MAT_EVTSUBMGMTIND /* Operation Indication from MAP Layer */
#define MA_ACC_EVT_SUBMGMT_CFM   MAT_EVTSUBMGMTCFM /* Operation Confirm from MAP Layer */
#define MA_ACC_EVT_FRMGMT_IND    MAT_EVTFRMGMTIND /* Operation Indication from MAP Layer */
#define MA_ACC_EVT_FRMGMT_CFM    MAT_EVTFRMGMTCFM /* Operation Confirm from MAP Layer */
#define MA_ACC_EVT_OAMMGMT_IND   MAT_EVTOAMMGMTIND /* Operation Indication from MAP Layer */
#define MA_ACC_EVT_OAMMGMT_CFM   MAT_EVTOAMMGMTCFM /* Operation Confirm from MAP Layer */
#define MA_ACC_EVT_CALLMGMT_IND  MAT_EVTCALLMGMTIND /* Operation Indication from MAP Layer */
#define MA_ACC_EVT_CALLMGMT_CFM  MAT_EVTCALLMGMTCFM /* Operation Confirm from MAP Layer */
#define MA_ACC_EVT_SSMGMT_IND    MAT_EVTSSMGMTIND /* Operation Indication from MAP Layer */
#define MA_ACC_EVT_SSMGMT_CFM    MAT_EVTSSMGMTCFM /* Operation Confirm from MAP Layer */
#define MA_ACC_EVT_SMMGMT_IND    MAT_EVTSMMGMTIND /* Operation Indication from MAP Layer */
#define MA_ACC_EVT_SMMGMT_CFM    MAT_EVTSMMGMTCFM /* Operation Confirm from MAP Layer */
#define MA_ACC_EVT_PDPACTV_IND   MAT_EVTPDPACTVIND /* Operation Indication from MAP Layer */
#define MA_ACC_EVT_PDPACTV_CFM   MAT_EVTPDPACTVCFM /* Operation Confirm from MAP Layer */
#define MA_ACC_EVT_LOCMGMT_IND   MAT_EVTLOCMGMTIND /* Operation Indication from MAP Layer */
#define MA_ACC_EVT_LOCMGMT_CFM   MAT_EVTLOCMGMTCFM /* Operation Confirm from MAP Layer */
#define MA_ACC_EVT_STAT_IND      MAT_EVTSTATIND /* Operation Confirm from MAP Layer */
#define MA_ACC_EVT_BND_CFM  MAT_EVTBNDCFM   /* Bind Confirm from MAP Layer */

/* Test Results */
#define MA_TST_OK            1   /* Test Passed */
#define MA_TST_FAILED        2   /* Test has failed */

#define MAACC_TRANSID1       1     /* Transaction Id */
#define MAACC_TRANSID2       2     /* Transaction Id */
#define MAACC_TRANSID3       3     /* Transaction Id */
#define MAACC_TRANSID4       4     /* Transaction Id */
#define MAACC_TRANSID5       5     /* Transaction Id */

#define MAND_EXIT             if(maAccMandExit == TRUE) RETVALUE(ROK);
#define OPT_EXIT              if(maAccOptExit == TRUE)  RETVALUE(ROK);
#define MAACC_FILL_ALL        maAccMandExit=FALSE; maAccOptExit=FALSE;
#define MAACC_FILL_OPT        maAccMandExit=FALSE; maAccOptExit=TRUE;
#define MAACC_FILL_MANDATORY  maAccMandExit=TRUE; 

/* Test Case Ids */
#define MA_TSTID_0      0
#define MA_TSTID_1      1
#define MA_TSTID_2      2
#define MA_TSTID_3      3
#define MA_TSTID_4      4
#define MA_TSTID_5      5
#define MA_TSTID_6      6
#define MA_TSTID_7      7
#define MA_TSTID_8      8
#define MA_TSTID_9      9
#define MA_TSTID_10     10
#define MA_TSTID_11     11
#define MA_TSTID_12     12
#define MA_TSTID_13     13
#define MA_TSTID_14     14
#define MA_TSTID_15     15
#define MA_TSTID_16     16
#define MA_TSTID_17     17
#define MA_TSTID_18     18
#define MA_TSTID_19     19
#define MA_TSTID_20     20
#define MA_TSTID_21     21
#define MA_TSTID_22     22
#define MA_TSTID_23     23
#define MA_TSTID_24     24
#define MA_TSTID_25     25
#define MA_TSTID_26     26
#define MA_TSTID_27     27
#define MA_TSTID_28     28
#define MA_TSTID_29     29
#define MA_TSTID_30     30
#define MA_TSTID_31     31
#define MA_TSTID_32     32
#define MA_TSTID_33     33
#define MA_TSTID_34     34
#define MA_TSTID_35     35
#define MA_TSTID_36     36
#define MA_TSTID_37     37
#define MA_TSTID_38     38
#define MA_TSTID_39     39

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -