1234567891011121314151617181920212223242526272829303132333435363738394041 |
- //
- // Created by robin on 5/5/16.
- //
-
- #ifndef DIGICODE_HOSTCOMMUNICATION_H
- #define DIGICODE_HOSTCOMMUNICATION_H
-
- #include <WString.h>
-
- #include "config.h"
-
- struct HostCommunicationResult
- {
- char* data;
- int length;
- bool isSuccess;
- };
-
- class HostCommunication
- {
- public:
- HostCommunication();
-
- void init();
-
- void debug(String str);
- void selfTest();
- void login(String uid, String password);
-
- HostCommunicationResult read(int timeout);
-
- protected:
-
- void send(SERIAL_PACKET_TYPE type);
- void send(SERIAL_PACKET_TYPE type, String str);
-
- bool waitData(int timeout, int length);
- };
-
-
- #endif //DIGICODE_HOSTCOMMUNICATION_H
|