Rick McConney
/
stripReader
Proximity strip reader
Fork of StarterKit by
Diff: Wnc.h
- Revision:
- 46:69966d555de7
- Parent:
- 45:fe90f1fcb4e0
--- a/Wnc.h Wed Nov 30 14:50:16 2016 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,51 +0,0 @@ - -#ifndef Wnc_ -#define Wnc_ - -#define WNC_WAIT_TIME_MS 500 - - -extern void SetLedColor(unsigned char ucColor); - - -class Wnc { -public: - Wnc(void); - bool init(void); - bool isModemResponding(); - - char* read(int timeout_ms); - char* send(const char *cmd, int timeout_ms); - - - void setPowerSave(bool on,int t3412,int t3324); - void resumePowerSave(); - bool isPowerSaveOn(); - int gett3412Timer(); - int gett3324Timer(); - void wakeFromPowerSave(); - - char* getIccid(); - bool startInternet(); - bool connect(char* ip, int port); - void disconnect(); - bool writeSocket(const char * s); - char* readSocket(); - char* ping(char* ip); - void setIn(); - void passthrough(); - void checkPassthrough(); - void toggleWake(); - char* resolveDn(const char* name); - bool cmdFailed(char* reply,char* msg); - -private: - int secToTau(int time); - int secToActivity(int time); - int hex_to_int(char c); - int hex_to_ascii(char h, char l); - int indexOf(char* str, char c); - char* encode(int value, char* result, int base); -}; - -#endif \ No newline at end of file