?? com_intercommunion.h
字號:
/*
Created by CJ 2007-9-26 for implemt the com access
*/
#ifdef _cplusplus
extern "C"
{
#endif
#ifndef _COM_INTER_H_
#define _COM_INTER_H_
#define GSM_7BIT 0
#define GSM_8BIT 4
#define GSM_UCS2 8
// response state
#define GSM_WAIT 0 /* wait */
#define GSM_OK 1 // OK
#define GSM_ERR -1 // ERROR
#define GSM_CALL_OK 0
#define GSM_CALL_CONNECT 1
#define GSM_CALL_BUSY 2
#define GSM_CALL_NO_ANSWER 3
#define GSM_CALL_NO_CARRIER 4
#define GSM_CALL_WAIT 5
#define MAX_SM_SEND 128 // send queue length
// read response buffer
typedef struct {
int len;
char data[128];
} SM_BUFF;
typedef enum Parity_
{
None=0, Odd, Even, Mark, Space
}ENU_PARITY;
typedef enum Send_Msg_And_Make_Dial_Result
{
SND_OK=0, /*send msg successful */
SND_ERROR , /*send msg error*/
SND_UNKNOW_ERROR,
MAKE_DIAL_OK, /* make dial successful*/
MAKE_DIAL_CONNECT, /* call succeed */
MAKE_DIAL_BUSY, /*if the called party in communication*/
MAKE_DIAL_NO_ANSWER , /*if no hang up is deteced after a fixed network timeout*/
MAKE_DIAL_NO_CARRIER, /*call setup failed or remote user release*/
MAKE_DIAL_NO_UNKNOW_ERROR
}SENDMSG_AND_MAKEDIAL_RESULT;
typedef enum Stopbit_
{
Onestopbit=0, One5stopbits, Twostopbits
}ENU_STPBIT;
// short message info
typedef struct {
char SCA[16]; // SMSC number
char TPA[16]; // dest number (TP-DA or TP-RA)
char TP_PID; // SMS service flag(TP-PID)
char TP_DCS; // user data encode flag (TP-DCS)
char TP_SCTS[16];
char TP_UD[160]; // user data
short index; // message sequece number
} SM_PARAM;
typedef struct{
SENDMSG_AND_MAKEDIAL_RESULT response;
HANDLE handle;
}RESPONSE;
#if 0
#ifndef COM_ASYN
#define COM_ASYN
#endif
#endif
#define BOOL int
#define FALSE 0
#define TRUE 1
#define NULL 0
#define INPUTBUF 512
#define OUTPUTBUF 512
BOOL OpenCOM( const char *pcomname , unsigned int btl, int databits, ENU_PARITY parity, ENU_STPBIT stopbit );
BOOL InitModemDrive( char *pportname, char *pSMSC);
SENDMSG_AND_MAKEDIAL_RESULT MakeDial( char* ptelnumber);
SENDMSG_AND_MAKEDIAL_RESULT SendShortMsg(char *pstrcenternum, char *pstrdesnum, char *pstrcontent );
#endif
#ifdef _cplusplus
}
#endif
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -