📄 au_dlg.h
字号:
MaDlgId suDlgId,
MaDlgId spDlgId,
MaInvokeId *invkId,
MaOprType oprType,
MaUsrErr *usrErr,
MaSubEv *subEv));
#endif /* MAP_VLR || MAP_HLR || MAP_GSN || MAP_MLC */
#if (MAP_VLR || MAP_HLR || MAP_GSN)
/* Fault and Revovery Management Indication and Response */
EXTERN S16 AuLiMatFRMgmtInd ARGS((Pst *pst,
SuId suId,
MaDlgId suDlgId,
MaDlgId spDlgId,
MaInvokeId *invkId,
MaOprType oprType,
MaFREv *frEv));
EXTERN S16 AuLiMatFRMgmtRsp ARGS((Pst *pst,
SpId spId,
MaDlgId suDlgId,
MaDlgId spDlgId,
MaInvokeId *invkId,
MaOprType oprType,
MaUsrErr *usrErr,
MaFREv *frEv));
#endif /* MAP_VLR || MAP_HLR || MAP_GSN */
#if (MAP_MSC || MAP_VLR || MAP_HLR || MAP_GSN)
/* OAM Indication and Response */
EXTERN S16 AuLiMatOAMInd ARGS((Pst *pst,
SuId suId,
MaDlgId suDlgId,
MaDlgId spDlgId,
MaInvokeId *invkId,
MaOprType oprType,
MaOAMEv *oamEv));
EXTERN S16 AuLiMatOAMRsp ARGS((Pst *pst,
SpId spId,
MaDlgId suDlgId,
MaDlgId spDlgId,
MaInvokeId *invkId,
MaOprType oprType,
MaUsrErr *usrErr,
MaOAMEv *oamEv));
#endif /* MAP_MSC || MAP_VLR || MAP_HLR || MAP_GSN */
#if (MAP_MSC || MAP_HLR || MAP_MLC || (MAP_REL99 && MAP_REL4 && MAP_GSN))
EXTERN S16 AuLiMatLocServInd ARGS((Pst *pst,
SuId suId,
MaDlgId suDlgId,
MaDlgId spDlgId,
MaInvokeId *invkId,
MaOprType oprType,
MaLocServEv *locServEv));
EXTERN S16 AuLiMatLocServRsp ARGS((Pst *pst,
SpId spId,
MaDlgId suDlgId,
MaDlgId spDlgId,
MaInvokeId *invkId,
MaOprType oprType,
MaUsrErr *usrErr,
MaLocServEv *locServEv));
#endif /* MAP_HLR || MAP_MSC */
#if (MAP_VLR || MAP_HLR)
EXTERN S16 AuLiMatSSInd ARGS((Pst *pst,
SuId suId,
MaDlgId suDlgId,
MaDlgId spDlgId,
MaInvokeId *invkId,
MaOprType oprType,
MaInvokeId *lnkId,
MaSSEv *ssEv));
EXTERN S16 AuLiMatSSRsp ARGS((Pst *pst,
SpId spId,
MaDlgId suDlgId,
MaDlgId spDlgId,
MaInvokeId *invkId,
MaOprType oprType,
MaUsrErr *usrErr,
MaSSEv *ssEv));
#endif /* MAP_HLR */
/*-------------------------------------------------------------------*/
/* test statisticus structure */
typedef struct auSts
{
long lAuOpenReq; /* number of MAP reqs. sent. */
long lAuOpenInd;
long lAuOpenRsp;
long lAuOpenCfm;
long lAuCloseReq;
long lAuCloseInd;
long lAuTimeout;
long lAuTimeFail;
long lAuTimeSuc;
long lAuOprReq;
long lAuOprInd;
long lAuOprRsp;
long lAuOprCfm;
long lStDatRcvd;
long lStDatSnd;
long lStCompSnd;
long lSpUDatReq;
long lSpUDatInd;
}AuSts;
/* Message Queue Element */
typedef struct maAccMsgQElm
{
U8 evtType; /* Primitive type */
SuId suId; /* Sap Id */
StDlgId suDlgId; /* Service User dialogue Id */
StDlgId spDlgId; /* Service Provider dialogue Id */
U8 status; /* Status */
union
{
MaOpenEv openEv; /* Open Ind. and Cfm. */
MaCloseEv closeEv; /* Close Ind. */
MaAbrtEv abrtEv; /* Abort Ind. */
struct
{
MaInvokeId invId; /* Invoke Id */
U8 primType; /* Primitive Type */
} statEv; /* Notice Indication */
struct
{
RCause cause; /* Return Cause, set by SCCP */
} notEv; /* Notice Indication */
struct
{
MaInvokeId invId; /* Invoke Id */
MaInvokeId lnkId; /* Linked Invoke Id */
MaOprType oprCode; /* Operation Code */
MaUsrErr usrErr; /* Operation Error */
MaPrvErr prvErr; /* Operation Error */
MaAllSSEv oprEv; /* Operation Event */
} operEv;
} s;
} MaAccMsgQElm;
typedef struct _AuAddr_
{
GlbTi srcGt;
U8 srcSsn;
GlbTi dstGt;
U8 dstSsn;
}AuAddr;
#if 0
typedef struct _timeval {
long tv_sec; /* seconds */
long tv_usec; /* and microseconds */
}timeval;
#endif
/*-------------------- Type Define -------------------------------*/
typedef struct auBitMap
{
U16 size; /* number of octets in the map */
U8 *map; /* byte array for the map */
} AuBitMap;
typedef struct _auSendOprPar_
{
int oprType;
int number;
int intvl;
int nsec;
}auSendOprPar;
typedef struct _auCloseDlgPar_
{
int num;
int pos;
}auCloseDlgPar;
typedef struct _dlgId
{
StDlgId suDlgId;
StDlgId spDlgId;
}DlgId;
/* dialog definition */
class Dialog
{
friend class Dialog_Queue;
public:
Dialog(MaDlgId suDlgId, MaDlgId spDlgId);
~Dialog();
protected:
Dialog *prev;
Dialog *next;
public:
inline void setTmrval(U16 tmrVal) { _tmrVal = tmrVal; }
S16 tmrStart(S16 tmrEvnt);
S16 tmrStop(S16 tmrEvnt);
S16 tmrOut();
S16 auLiMatDlgCfmPrs(MaDlgId spDlgId); /* MAP Dialogue Confirm */
S16 auLiMatOpenReqPrs(MaOprType type); /* MAP Open Service Indication */
S16 auLiMatOpenIndPrs(MaAccMsgQElm *msg); /* MAP Open Service Indication */
S16 auLiMatOpenCfmPrs(MaAccMsgQElm *msg); /* MAP Open Service Confirm */
S16 auLiMatDelimIndPrs(MaAccMsgQElm *msg); /* MAP Delimiter Service Indication */
S16 auLiMatCloseIndPrs(MaAccMsgQElm *msg); /* MAP Close Indication */
S16 auLiMatAbrtReqPrs(MaAccMsgQElm *msg); /* MAP Abort Request */
S16 auLiMatAbrtIndPrs(MaAccMsgQElm *msg); /* MAP Abort Indication */
S16 auLiMatNotIndPrs(MaAccMsgQElm *msg);
S16 auLiMatStaIndPrs(MaAccMsgQElm *msg);
S16 auLiMatUpLocIndPrs(MaAccMsgQElm *msg); /* MAP Update Location Indication */
S16 auLiMatUpLocCfmPrs(MaAccMsgQElm *msg); /* MAP Update Location Confirm */
S16 startDlg(MaOprType type); /* Begin a new dialogure */
MaDlgId auDlgIdGet() { return(auDlgId); }
MaDlgId maDlgIdGet() { return(maDlgId); }
Dialog *dlgNext() { return(next); }
Dialog *dlgPrev() { return(prev); }
/* get the spId of the dialogue */
SpId spIdGet() const { return(spId); }
private:
SpId spId;
MaDlgId maDlgId;
MaInvokeId invkId;
U8 dsmState;
MaOpenEv openEv; /* Open Ind and Cfm */
MaCloseEv closeEv; /* Close Ind */
MaAbrtEv abrtEv; /* Abort Ind */
MaOprType oprCode;
#if 0
MaAllSSEv retRslt; /* Return Result Structure */
#endif
MaUsrErr usrErr; /* Return Result Structure */
/*
We define the timeout timers as public elements to speed processing.
*/
public:
U16 _tmrVal;
CmTimer timers[AU_MAX_TMRS];
MaDlgId auDlgId;
static Swtch swtch;
};
class Dialog_Queue
{
friend class Dialog;
friend int getBitMap(CLI_ENV *pCliEnv, int par);
public:
Dialog_Queue();
~Dialog_Queue();
private:
Dialog *auDlgQueue[AU_HASH_SIZE];
MaDlgId auDlgIdPool;
U32 minDlgId;
U32 maxDlgId;
U32 actDlgNum; /* current Activer dialogure number */
U32 maxDlgNum; /* Max dialogure number */
public:
Pst auPst;
AuBitMap auBitMap;
/* Count information for test */
U32 dlgIdGenSucNum; /* Dialogure Id Generate Success Numbers */
U32 dlgIdGenFalNum; /* Dialogure Id Generate Failed Numbers */
U32 dlgGenSucNum; /* Dialog Generate Success Numbers */
U32 dlgGenFalNum; /* Dialog Generate Failed Numbers */
public:
#ifdef _MULTI_THREAD
pthread_mutex_t Lock;
#endif
public:
S16 dlgQueueInit();
S16 bitMapInit(); /* Initial the bit Map */
S16 bitMapFree(); /* Free all the bit Map */
MaDlgId dlgIdGen(); /* Generate the dlg id from bit map */
S16 dlgIdFree(MaDlgId auDlgId); /* Free the current dlg id from the bit map */
Dialog *dlgInsert(MaDlgId suDlgId, MaDlgId spDlgID);
S16 dlgDelete(MaDlgId suDlgId);
Dialog *dlgFind(MaDlgId suDlgId, MaDlgId spDlgId);
void dlgIdGenSuc() { dlgIdGenSucNum++ ;}
void dlgIdGenFal() { dlgIdGenFalNum++ ;}
void dlgGenSuc() { dlgGenSucNum++ ;}
void dlgGenFal() { dlgGenFalNum++ ;}
#if 1
inline MaDlgId dlgIdPoolGet() { return(auDlgIdPool); }
inline MaDlgId dlgIdGenSucGet() { return(dlgIdGenSucNum); }
inline MaDlgId dlgIdGenFalGet() { return(dlgIdGenFalNum); }
inline Dialog *dlgGet(U16 idx) { return(auDlgQueue[idx]); }
inline U32 actDlgNumGet() { return(actDlgNum); }
#endif
};
extern Dialog_Queue *dlgQueue;
EXTERN AuSts smAuSts;
extern AuAddr auAddr;
PUBLIC void accAuStartTmr(S16 tmrEvnt, Dialog *pDialog);
PUBLIC void accAuStopTmr(S16 tmrEvnt, Dialog *pDialog);
#endif //_AU_DLG_H_
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -