📄 mobilemodule.h
字号:
// MobileModule.h: interface for the CMobileModule class.
//
//////////////////////////////////////////////////////////////////////
#if !defined(AFX_MOBILEMODULE_H__F078B76B_8DE3_42C2_97FD_29495D8B4ED1__INCLUDED_)
#define AFX_MOBILEMODULE_H__F078B76B_8DE3_42C2_97FD_29495D8B4ED1__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include "OperateSerial.h"
#include <Afxtempl.h>
#define GSM_7BIT 0
#define GSM_8BIT 4
#define GSM_UCS2 8
typedef struct SM_PARAM
{
char SCA[16]; // 短消息服务中心号码(SMSC地址)
char TPA[16]; // 目标号码或回复号码(TP-DA或TP-RA)
char TP_PID; // 用户信息协议标识(TP-PID)
char TP_DCS; // 用户信息编码方式(TP-DCS)
char TP_SCTS[16]; // 服务时间戳字符串(TP_SCTS), 接收时用到
char TP_UD[161]; // 原始用户信息(编码前或解码后的TP-UD)
char index; // 短消息序号,在读取时用到
} SM_PARAM;
class CMobileModule
{
public:
COperateSerial OpeSerial;
public:
CMobileModule();
virtual ~CMobileModule();
public:
void PullDownRTD();
void PullUpRTD();
void CPMSCommand();
void PowerUpModule();
void PowerDownModule();
void VTSCommand(CString Index);
// void AnalyseAtCommand() ;
void InitModule() ;
void CIMICommand() ;
void CPBSCommand() ;
void CCFCCommand(int Value) ;
void CCFCCommand() ;
void CCFCCommand(int Index,CString PhoneNum) ;
void CSDTCommand(int Value);
void CSCLKCommand(int Value);
void CHFACommand(int Value);
void CSMINSCommand(int value);
void CEXTBUTCommand(int mode);
void CEXTHSCommand(int mode);
void AlarmCommand(int state,CString time,int repeat,int power);
void CMICCommand(int channel,int gainlevel);
void CPOWDCommand();
void CSSNCommand(int Value1,int Value2);
void CBCCommand();
void CCWECommand(int Value);
void MUTCommand(int Value);
void CLVLCommand(int Value);
void CRSLCommand(int level);
void CALMCommand(int Value);
void CCLKCommand(CString time_str);
void CCLKCommand();
void CFUNCommand(int value);
void CFUNCommand();
void CSQCommand();
void CRCCommand(int mode);
void CPWDCommand(CString fac,CString oldpw,CString newpw);
void CPWDCommand(CString fac,CString newpw);
void CPINSetCommand(CString pin ,CString newpin);
void CPINGetCommand();
void CACMCommand(CString acmmax ,CString password);
void CPASCommand();
void COPSCommand();
void COLPCommand(int value);
void CLIPCommand(int Value);
void CLCKCommand(CString fac,int mode,CString password,int class_mode);
void CLCCCommand();
void CHLDCommand(int Index);
void CSCSCommand(CString chse);
CString IntegerToHex(int Ivalue);
int HexToInteger(CString str);
void SmsToText(CString RetInfo, char* SendNum, char* SendTime, char* SmsContent);
void CPBFCommand(CString FindText);
void CPBRCommand(int Index);
void CPBWCommand(int Index, CString PhoneNumber, CString RecordName);
void GetPhoneBookRecordNumber();
void CPBSCommand(CString Storage);
void CSCAGetCommand();
void CSCASetCommand(char* CenterNumber);
void CNMICommand(int mode, int mt, int bm, int ds, int bfr);
// void CMGSCommand(CString SmsCenter, CString DesAddress, CString SmsContent);
void CMGSCommand(char *SmsCenter, char *DesAddress, char *SmsContent) ;
void CMGRCommand(int value);
void CMGLCommand(int value);
void CMGFCommand(CString Index);
void CMGDCommand(int Index);
void IPRCommand(int value);
void GSNCommand();
void ATWCommand();
void ATFCommand();
void ATXCommand(int value);
void ATVCommand(int value);
void ATTCommand();
void ATSCommand(int value ,int n);
void ATMCommand(int value);
void ATLCommand(int value);
void ATECommand(int value);
void HandUp();
void ReCall();
void Call(CString PhoneNumber);
void Answer();
void AtCommand();
void CloseComm();
BOOL OpenComm(TCHAR *, int baudrate);
// PDU change
int gsmEncode7bit(const char* pSrc, unsigned char* pDst, int nSrcLength);
int gsmDecode7bit(const unsigned char* pSrc, char* pDst, int nSrcLength);
int gsmEncode8bit(const char* pSrc, unsigned char* pDst, int nSrcLength);
int gsmDecode8bit(const unsigned char* pSrc, char* pDst, int nSrcLength);
int gsmString2Bytes(const char* pSrc, unsigned char* pDst, int nSrcLength);
int gsmBytes2String(const unsigned char* pSrc, char* pDst, int nSrcLength);
int gsmInvertNumbers(const char* pSrc, char* pDst, int nSrcLength);
int gsmSerializeNumbers(const char* pSrc, char* pDst, int nSrcLength);
int gsmEncodePdu(const SM_PARAM* pSrc, char* pDst);
int gsmDecodePdu(const char* pSrc,
char * SCA,
char * TPA,
char * TP_SCTS,
char * TP_UD);
int gsmEncodeUcs2(const char* pSrc, unsigned char* pDst, int nSrcLength);
int gsmDecodeUcs2(const unsigned char* pSrc, char* pDst, int nSrcLength);
int TextToSms(char* csca,
char* ToNum,
char* smsnr,
int flashit,
int reportit,
int* sms_len,
char* sms);
};
#endif // !defined(AFX_MOBILEMODULE_H__F078B76B_8DE3_42C2_97FD_29495D8B4ED1__INCLUDED_)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -