Rick McConney
/
StarterKit
GSMA version
Fork of AvnetATT_shape_hackathon by
Wnc.h
- Committer:
- elmkom
- Date:
- 2017-01-09
- Revision:
- 46:733edf15f9e8
- Parent:
- 45:fe90f1fcb4e0
File content as of revision 46:733edf15f9e8:
#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