/* * Dial.h * * Created on: 2023年6月13日 * Author: chaos */ #ifndef DIAL5G_DIAL_H_ #define DIAL5G_DIAL_H_ #include #include "../common/SH_global.h" using namespace std; class Dial { public: Dial(); virtual ~Dial(); //枚举所有状态 enum State { CPIN = 0, QCFGNET, QICSGPAPN, QCFGSMS, QENG, QNETDEVCTL, QNETDEVSTATUS, QDCHPC, NORMAL }; //枚举所有事件 enum Event { Event_CPIN = 0, Event_QCFGNET, Event_QICSGPAPN, Event_QCFGSMS, Event_QENG, Event_QNETDEVCTL, Event_QNETDEVSTATUS, Event_OK, Event_ERROR, Event_TEMP }; State m_curState; int m_fd; int m_dial; int m_APN; int openPort(const char* pPort); int closePort(); int recvData(); int queryPin(); int configNet(); int configApn(); int getCsq(); int getTemp(); int conncectUSB(); int dial5G(); int configims(); int configdhcp(); int parseData(Event event,const char* pData); int setState(); }; #endif /* DIAL5G_DIAL_H_ */