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

📄 psa_sat.h

📁 是一个手机功能的模拟程序
💻 H
📖 第 1 页 / 共 2 页
字号:
/* 
+----------------------------------------------------------------------------- 
|  Project :  GSM-PS (6147)
|  Modul   :  PSA_SAT
+----------------------------------------------------------------------------- 
|  Copyright 2002 Texas Instruments Berlin, AG 
|                 All rights reserved. 
| 
|                 This file is confidential and a trade secret of Texas 
|                 Instruments Berlin, AG 
|                 The receipt of or possession of this file does not convey 
|                 any rights to reproduce or disclose its contents or to 
|                 manufacture, use, or sell anything it may describe, in 
|                 whole, or in part, without the specific written consent of 
|                 Texas Instruments Berlin, AG. 
+----------------------------------------------------------------------------- 
|  Purpose :  Definitions for the protocol stack adapter
|             SIM application toolkit ( SAT )
+----------------------------------------------------------------------------- 
*/ 

#ifndef PSA_SAT_H
#define PSA_SAT_H

/*==== CONSTANTS ==================================================*/
#define MAX_SAT_CHANNEL    1    /* maximum number of channels available */

#define TPL_NONE           0    /* no transport layer */
#define TPL_DONT_CARE   0xFF   

#define TIME_STAMP_LENGTH 7

typedef struct            /* data buffer for unstructured SS data */
{
  UBYTE *ussd_str;
  UBYTE c_ussd_str;
  UBYTE dcs;
} T_sat_ussd;

typedef enum
{
  NO_CC_ACT = 0,                /* no call control action */
  CC_ACT_CAL,                   /* call control of setup parms */
  CC_ACT_SS,                    /* call control of SS string */
  CC_ACT_USSD,                  /* call control of USSD string */
  SMC_ACT_MO                    /* MO Short Message control by SIM */
} T_CC_ACT;

typedef enum
{
  NO_USR_NTF = 0,               /* no user notification */
  USR_NTF_CC_SIM,               /* call control by SIM notification */
  USR_NTF_SETUP_CAL,            /* call setup notification */
  USR_NTF_SEND_SS,              /* send SS notification */
  USR_NTF_SEND_USSD,            /* send USSD notification */
  USR_NTF_TRM_RSP               /* terminal response notification */
} T_USR_NTF;

typedef enum
{
  NO_VALID_SRQ = 0,             /* not a valid SAT request id */
  SRQ_ACI,                      /* SAT request by ACI */
  SRQ_MMI                       /* SAT request by MMI */
} T_SAT_RQ_ID;

typedef enum
{
  NO_VALID_CTX = 0,             /* not a valid cap context */
  CTX_CC_RESULT,                /* cap context CC result */
  CTX_SAT_SETUP                 /* cap context SAT call setup */
} T_SAT_CAP_CTX;

#define MAX_FU_OPS 8            /* maximum FILE UPDATE operations */

enum
{
  SAT_FU_START = 0,
  SAT_FU_SMS,
  SAT_FU_PHB,
  SAT_FU_MMI,
  SAT_FU_STOP
};

typedef enum
{
  OPCH_IDLE = 0,                /* open channel status idle */
  OPCH_CCSIM_REQ,               /* open channel status CC by SIM request */
  OPCH_WAIT_CNF,                /* open channel status wait for confirmation */
  OPCH_ON_DMND,                 /* open channel status on demand */
  OPCH_EST_REQ,                 /* open channel establishment request */
  OPCH_CLS_REQ,                 /* channel close request */
  OPCH_EST,                     /* channel established */
  OPCH_SUSP,                    /* channel suspended */
  OPCH_NONE
} T_SAT_OPCH_STAT;

typedef enum
{
  SIM_NO_LINK = 0,              /* no link established */
  SIM_LINK_OPEN,                /* link opened */
  SIM_LINK_CNCT,                /* link connected */
  SIM_LINK_DROP                 /* link dropped */
} T_SAT_SIM_LNK_STAT;

/*==== TYPES ======================================================*/

typedef struct
{
  UBYTE     stkCmdLen;              /* length of STK command */
  UBYTE   * stkCmd;                 /* STK command */
} T_SAT_SET_PRM;

typedef struct
{
  UBYTE cmdNr;                      /* command number */
  UBYTE cmdType;                    /* command type */
  UBYTE cmdQlf;                     /* command qualifier */
} T_SAT_CMD_DET;

typedef struct
{
  BOOL     busy;                    /* CC busy flag */
  UBYTE    owner;                   /* CC owner */
  SHORT    cId;                     /* related call id */
  UBYTE    ccAct;                   /* CC action */
} T_SAT_CC_PRM;

typedef struct
{
  SHORT    cId;                     /* related call id */
  UBYTE    cntxt;                   /* cap context */
  UBYTE    CCres;                   /* previous CC result */
} T_SAT_CAP_PRM;

typedef struct
{
  T_ENV_CMD    env;                 /* envelope of queued event */
  T_OWN        owner;               /* owner of corresponding event */
} T_SAT_QUEUE;

#define MAX_EVENT_QUEUED (4)

typedef struct
{
  ULONG        temp_list;          /* buffer to save list waiting result from MMI */
                                   /* highest bit flags if a setup list is in process */
  ULONG        list;               /* contain list of events to be monitored */
  UBYTE        c_queued;           /* count of queued events */
  T_SAT_QUEUE  queued[MAX_EVENT_QUEUED]; /* list of queued events MAX 4 (may more be needed ??)*/
} T_SAT_EVENT;

typedef BOOL (* T_SAT_FU_FUNC)(int, T_SIM_FILE_UPDATE_IND *);

typedef struct
{
  UBYTE chnUsdFlg;                 /* flags a used channel */
  SHORT chnRefId;                  /* refers to call id for CSD, or CID for GPRS */
  UBYTE chnType;                   /* channel type (CSD/GPRS) */
  UBYTE chnTPL;                    /* channel transport layer */
  UBYTE lnkStat;                   /* sim link status */
} T_SAT_CHN_NTRY;

typedef struct SATShrdParm
{
  UBYTE         owner;                  /* identifies the used set */
  UBYTE         ntfy;                   /* user notification */
  T_SAT_SET_PRM setPrm[OWN_MAX];        /* possible sets */
  T_SAT_CC_PRM  SIMCCParm;              /* call control by SIM parameter */
  T_SAT_CAP_PRM capParm;                /* cap request parameter */
  T_SAT_CMD_DET cmdDet;                 /* command details */
  LONG          dur;                    /* redial duration */
  UBYTE        *stkCmd;                 /* points to STK command */
  USHORT        stkCmdLen;              /* length of STK command */
  USHORT        fu_rsc;                 /* result code of FILE UPDATE */
  BUF_cmd_prms  stkCmdPrm;              /* proactive SIM command parameter */
  T_SIM_TOOLKIT_CNF *stkCnfPrim;        /* pending result primitive */
  T_SIM_FILE_UPDATE_IND *fu_ind;        /* actual FILE UPDATE primitive */
  T_SAT_FU_FUNC fu_func[MAX_FU_OPS];    /* registered FILE UPDATE handlers */
  T_SAT_FU_FUNC fu_func_notif;          /* registered FILE UPDATE NOTIFY handler */
  T_SAT_EVENT   event;                  /* flags events to be monitored for SAT */
//  CHAR          ToBeSentDTMF[MAX_DIAL_LEN]; /* buffers DTMF string to be sent */
//  BYTE          DTMFidx;                /* index of Send DTMF string */
  SHORT         SentUSSDid;             /* ssId of USSD sent */
  BOOL          USSDterm;               /* flags if user is aiming at terminating ussd */
  UBYTE         run_at_id;              /* srce id of source where run at cmd is processed */
  USHORT        stkError;               /* error code from SAT application */
  UBYTE         opchStat;               /* open channel status */
  UBYTE         opchType;               /* open channel type */
  void         *opchPrm;                /* points to open channel parameters */
  UBYTE         opchPrmMdf;             /* flags bearer parameter modification */
  UBYTE         opchAcptSrc;            /* open channel source identifier */
  UBYTE         opchCCMdfy;             /* flags open channel call control modification */
  UBYTE         gprsNtwCs;              /* gprs network cause */
  T_SAT_CHN_NTRY chnTb;                 /* channel table, must be an array if more than one channel will be supported */
  SHORT          sId_pwd_requested;     /* needed when sat starts a SS transaction which requires a password */
} T_SAT_SHRD_PRM;

typedef struct
{
  UBYTE     addLen;
  UBYTE     *add;
  UBYTE     add_content; /* when addLen = 1 */
  UBYTE     *resCC;
  T_text    *text;
  UBYTE     *at_resp;
  USHORT    at_resp_count;
  UBYTE     chnStat;
  UBYTE     bearDesc;
  UBYTE     bufSize;
  UBYTE     dtt_buf[TIME_STAMP_LENGTH];
} T_ACI_SAT_TERM_RESP;

typedef struct
{
  UBYTE            def_bear_prm;  /* true or false for default parameters */
  T_csd_bear_prm   csd_bear_prm;  /* if no def. parms. use CSD parms.*/
  UBYTE            v_dur;         /* duration 1 avail.*/
  T_dur            dur;           /* duration 1 */
  UBYTE            v_dur2;        /* duration 2 avail.*/
  T_dur2           dur2;          /* duration 2 */
  UBYTE            v_other_addr;  /* other addr. avail.*/

⌨️ 快捷键说明

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