📄 layerapp.c
字号:
/********************************************************************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: application
Type: C Source file
Desc: This file contains the C source code for MAP upper user
File: layerapp.c
Sid: layerapp.c@@/main/11 - Fri Sep 16 02:41:41 2005
Prg: ssk
*********************************************************************21*/
/* header include files (.h) */
#include "envopt.h" /* environment options */
#include "envdep.h" /* environment dependent */
#include "envind.h" /* environment independent */
#include "gen.h" /* general layer */
#include "ssi.h" /* system services */
#include "lma.h" /* layer management, MAP */
#include "cm_err.h" /* common error */
#include "stu.h" /* tcap layer */
#include "mat.h" /* map layer */
#ifdef MA_FTHA
#include "sht.h"
#endif /* MA_FTHA */
#include "cm5.h"
#include "ma.h" /* map */
#include "ma_mf.h"
#include "ma_acc.h"
#include "ma_err.h" /* map error */
#ifdef ZJ
#include "cm_ftha.h" /* Common FTHA */
#include "cm_pftha.h" /* Common PSF defines */
#include "cm_psfft.h"
#include "cm_tupsf.h" /* Common TCAP user PSF */
#include "zj_acc.h"
#endif /* ZJ */
/* header/extern include files (.x) */
#include "gen.x" /* general layer */
#include "ssi.x" /* system services */
#include "cm5.x"
#include "cm_lib.x" /* common Library */
#include "cm_ss7.x" /* common */
#include "stu.x" /* tcap layer */
#include "lma.x" /* layer management, TCAP */
#include "mat.x" /* map layer */
#ifdef MA_FTHA
#include "sht.x"
#endif /* MA_FTHA */
#ifdef ZJ
#include "cm_ftha.x" /* Common FTHA */
#include "cm_pftha.x" /* Common PSF defines */
#include "cm_psfft.x"
#include "cm_tupsf.x" /* Common TCAP user PSF */
#endif
#include "ma.x" /* map */
#include "ma_acc.x" /* map */
/* Local defines if any */
/* Local typedefs */
/* Local externs */
TskInit auInit;
PUBLIC U32 auMemAlloc = 0;
PUBLIC U32 auMemFree = 0;
PUBLIC MaAccMsgQElm qElm; /* Global queue element */
#define MAACC_INVOKE_TEST \
/* if the selector is tightly coupled then call the test function */\
if (pst->selector == MA_SEL_TC)\
{\
/* call permanent task */\
maPermTsk(pst, (Buffer *)NULLP);\
}
#ifdef __cplusplus
extern "C" {
#endif
#ifdef __cplusplus
}
#endif
/*
*
* Fun: AuLiMatOpenInd
*
* Desc: This function packs
*
* Ret: ROK
*
* Notes: None
*
* File: layerapp.c
*
*/
#ifdef ANSI
PUBLIC S16 AuLiMatOpenInd
(
Pst *pst,
SuId suId,
MaDlgId suDlgId,
MaDlgId spDlgId,
MaOpenEv *openEv
)
#else
PUBLIC S16 AuLiMatOpenInd (pst,suId, suDlgId, spDlgId, openEv)
Pst *pst;
SuId suId;
MaDlgId suDlgId;
MaDlgId spDlgId;
MaOpenEv *openEv;
#endif
{
Txt prntBuf[MA_PRNTBUF_SIZE];
U8 ver;
TRC2(AuLiMatOpenInd)
if (openEv->apn.pres == TRUE)
ver = LMA_VER2;
else
ver = LMA_VER1;
sprintf(prntBuf, "MAP Open Ind. suId %d - SuDlgId %3ld MAP Version %d \n",
suId, suDlgId, ver);
SPrint(prntBuf);
qElm.evtType = MAT_EVTOPENIND;
qElm.suId = suId;
qElm.suDlgId = suDlgId;
qElm.spDlgId = spDlgId;
cmCpy(openEv, &qElm.s.openEv, sizeof(MaOpenEv));
maAccPushMsgQ(&qElm);
MAACC_INVOKE_TEST
RETVALUE(ROK);
} /* AuLiMatOpenInd */
/*
*
* Fun: IuLiIatBndCfm
*
* Desc: This routine confirms a bind
*
* Ret: ROK
*
* Notes: None
*
* File: layerapp.c
*
*/
#ifdef ANSI
PUBLIC S16 AuLiMatBndCfm
(
Pst *pst,
SuId suId,
U8 status
)
#else
PUBLIC S16 AuLiMatBndCfm (pst,suId, status)
Pst *pst;
SuId suId;
U8 status;
#endif
{
Txt prntBuf[MA_PRNTBUF_SIZE];
TRC3(AuLiMatSteCfm)
sprintf(prntBuf, "MAP Bnd Cfm. suId %d - Status %d \n", suId, status);
SPrint(prntBuf);
qElm.evtType = MAT_EVTBNDCFM;
qElm.suId = suId; /* service user id */
qElm.status = status; /* status */
/* queue this element on the queue */
maAccPushMsgQ(&qElm);
MAACC_INVOKE_TEST
RETVALUE(ROK);
} /* AuLiMatBndCfm */
/*
*
* Fun: AuLiMatOpenCfm
*
* Desc: This function packs
*
* Ret: ROK
*
* Notes: None
*
* File: layerapp.c
*
*/
#ifdef ANSI
PUBLIC S16 AuLiMatOpenCfm
(
Pst *pst,
SuId suId,
MaDlgId suDlgId,
MaDlgId spDlgId,
MaOpenEv *openEv
)
#else
PUBLIC S16 AuLiMatOpenCfm (pst,suId,suDlgId,spDlgId,openEv)
Pst *pst;
SuId suId;
MaDlgId suDlgId;
MaDlgId spDlgId;
MaOpenEv *openEv;
#endif
{
Txt prntBuf[MA_PRNTBUF_SIZE];
sprintf(prntBuf, "MAP Open Confirm suId %d - SuDlgId %3ld SpDlgId %3ld \n",
suId, suDlgId, spDlgId);
SPrint(prntBuf);
qElm.evtType = MAT_EVTOPENCFM;
qElm.suId = suId;
qElm.suDlgId = suDlgId;
qElm.spDlgId = spDlgId;
cmCpy(openEv, &qElm.s.openEv, sizeof(MaOpenEv));
maAccPushMsgQ(&qElm);
MAACC_INVOKE_TEST
RETVALUE(ROK);
} /* AuLiMatOpenCfm */
/*
*
* Fun: AuLiMatCloseInd
*
* Desc: This function packs
*
* Ret: ROK
*
* Notes: None
*
* File: layerapp.c
*
*/
#ifdef ANSI
PUBLIC S16 AuLiMatCloseInd
(
Pst *pst,
SuId suId,
MaDlgId suDlgId,
MaDlgId spDlgId,
MaCloseEv *closeEv
)
#else
PUBLIC S16 AuLiMatCloseInd (pst,suId,suDlgId,spDlgId, closeEv)
Pst *pst;
SuId suId;
MaDlgId suDlgId;
MaDlgId spDlgId;
MaCloseEv *closeEv;
#endif
{
Txt prntBuf[MA_PRNTBUF_SIZE];
TRC2(AuLiMatCloseInd)
sprintf(prntBuf, "MAP Close Ind. suId %d - SuDlgId %3ld SpDlgId %3ld \n",
suId, suDlgId, spDlgId);
SPrint(prntBuf);
qElm.evtType = MAT_EVTCLOSEIND;
qElm.suDlgId = suDlgId;
qElm.spDlgId = spDlgId;
qElm.suId = suId;
cmCpy(closeEv, &qElm.s.closeEv, sizeof(MaCloseEv));
maAccPushMsgQ(&qElm);
MAACC_INVOKE_TEST
RETVALUE(ROK);
} /* AuLiMatCloseInd */
/*
*
* Fun: AuLiMatAbrtInd
*
* Desc: This function packs
*
* Ret: ROK
*
* Notes: None
*
* File: layerapp.c
*
*/
#ifdef ANSI
PUBLIC S16 AuLiMatAbrtInd
(
Pst *pst,
SuId suId,
MaDlgId suDlgId,
MaDlgId spDlgId,
MaAbrtEv *abrtEv
)
#else
PUBLIC S16 AuLiMatAbrtInd (pst,suId,suDlgId,spDlgId,abrtEv)
Pst *pst;
SuId suId;
MaDlgId suDlgId;
MaDlgId spDlgId;
MaAbrtEv *abrtEv;
#endif
{
Txt prntBuf[MA_PRNTBUF_SIZE];
TRC2(AuLiMatAbrtInd)
sprintf(prntBuf, "MAP Abort Ind. suId %d - SuDlgId %3ld SpDlgId %3ld \n",
suId, suDlgId, spDlgId);
SPrint(prntBuf);
qElm.evtType = MAT_EVTABRTIND;
qElm.suDlgId = suDlgId;
qElm.spDlgId = spDlgId;
qElm.suId = suId;
cmCpy(abrtEv, &qElm.s.abrtEv, sizeof(MaAbrtEv));
maAccPushMsgQ(&qElm);
MAACC_INVOKE_TEST
RETVALUE(ROK);
} /* AuLiMatAbrtInd */
/*
*
* Fun: AuLiMatNotInd
*
* Desc: This function packs
*
* Ret: ROK
*
* Notes: None
*
* File: layerapp.c
*
*/
#ifdef ANSI
PUBLIC S16 AuLiMatNotInd
(
Pst *pst,
SuId suId,
MaDlgId suDlgId,
MaDlgId spDlgId,
RCause cause
)
#else
PUBLIC S16 AuLiMatNotInd (pst,suId,suDlgId,spDlgId,cause)
Pst *pst;
SuId suId;
MaDlgId suDlgId;
MaDlgId spDlgId;
RCause cause;
#endif
{
Txt prntBuf[MA_PRNTBUF_SIZE];
TRC2(AuLiMatNotInd)
sprintf(prntBuf, "MAP Not Ind. suId %d - SuDlgId %3ld SpDlgId %3ld %d\n",
suId, suDlgId, spDlgId, cause);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -