?? gprs.h
字號(hào):
#ifndef GPRS_H
#define GPRS_H
#include "phys.h"
#define GPRSDIAG 0
struct TGPRSConfig
{
char ServerIp[16];
int ServerPort;
char UserName[17];
char Pwd[17];
char Apn[17];
};
class GPRS:public PhysicalLayer
{
private:
EscInt fdPower;
EscInt fdCom;
EscInt sendATCommand(EscChar *pAtCmd,EscByte secondsToTimeOut=1);
void sendATRecvCommand(EscInt length);
EscInt requestToWrite(EscWord length);
EscInt readLine(EscChar* buf,EscInt &length,EscByte secondsToTimeOut=1);
void setMode();
void reset();
public:
EscBool bPowerOn;
bool bHardwareError;
int ReadTimeoutTimes;
TGPRSConfig ChannelConfig;
bool bProfileCreated;
public:
GPRS(EscInt poolSize);
~GPRS();
EscInt getServiceState();
EscInt getSignalQuality();
EscBool send(EscChar *buf,EscInt length);
EscInt recv(EscChar *buf,EscInt length,EscInt maxTimeOut,EscBool *timeoutOccur);
EscBool openChannel();
void closeChannel();
void initChannel(TGPRSConfig *pChnlCfg);
void powerOn();
void powerOff();
void createConnectProfile(EscChar *user,EscChar *pwd,EscChar *apn);
void createServiceProfile(EscChar *ip,EscWord port);
};
#endif
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -