diff --git a/参考文档(21-30)/LocReport/SIM7000.h b/参考文档(21-30)/LocReport/SIM7000.h index 70e02b3..8f28abf 100644 --- a/参考文档(21-30)/LocReport/SIM7000.h +++ b/参考文档(21-30)/LocReport/SIM7000.h @@ -9,9 +9,16 @@ class SIM7000 { public: + //初始化 bool begin(Stream &port); + + //向sim7000模块发送命令 void sendCmd(const char* cmd); + + //读收到的信息 int readBuffer(char *buffer, int count, unsigned int timeout = DEFAULT_TIMEOUT, unsigned int chartimeout = DEFAULT_INTERCHAR_TIMEOUT); + + //发送命令,并接收返回,判断返回内容是否包含字符串resp bool check_send_cmd(const char* cmd, const char* resp, unsigned int timeout = DEFAULT_TIMEOUT, unsigned int chartimeout = DEFAULT_INTERCHAR_TIMEOUT); private: SoftwareSerial* mySerial;