15 #define BayTCP_BUFFER 138
18 #define BayTCP_CONFIG_SERVER 0
19 #define BayTCP_CONFIG_PORT 1
20 #define BayTCP_CONFIG_PATH 2
21 #define BayTCP_CONFIG_USER 3
22 #define BayTCP_CONFIG_PASSWORD 4
23 #define BayTCP_CONFIG_SENDER 5
24 #define BayTCP_CONFIG_APN 6
25 #define BayTCP_CONFIG_PROVPW 7
26 #define BayTCP_CONFIG_PROVUSER 8
27 #define BayTCP_CONFIG_PIN 9
28 #define BayTCP_CONFIG_MAC 6
29 #define BayTCP_CONFIG_IP 7
30 #define BayTCP_CONFIG_MASK 8
31 #define BayTCP_CONFIG_DEFAULT_GW 9
33 #define BayTCP_CONFIG_SIZE 140
34 #define BayTCP_EEPROM_OFFSET 400
36 #define BayTCP_DEBUG_OUTPUT 0
37 #define BayTCP_DEBUG_INPUT 0
39 #define BayTCP_DEBUG_INTERFACE Serial
41 #define printP(x) printPGM(PSTR(x))
42 #define printlnP(x) printlnPGM(PSTR(x))
43 #define wait_for(x,y) wait_forPGM(PSTR(x),y)
44 #define SerialprintP(x) serialprintPGM(PSTR(x))
45 #define SerialprintlnP(x) serialprintlnPGM(PSTR(x))
53 #include "../BayEOSBuffer/BayEOSBuffer.h"
59 virtual int i_available() = 0;
97 uint8_t sendMultiFromBufferWithAckPayload(uint16_t maxsize=5000);
102 void setConfig(
const char *str,uint8_t index);
126 const uint8_t* parseMAC(
const char* str);
127 const uint8_t* parseIP(
const char* str);
128 uint8_t hex2int(
const char c);
141 virtual void flushMTU(
void)=0;
142 virtual void finishTransmissionMode(
void)=0;
143 void printPostHeader(uint16_t size);
144 void setConfigPointers(
void);
145 uint8_t addToConfigBuffer(uint8_t offset,
const char* str);
147 void skipChars(
void);
148 uint8_t wait_forOK(uint16_t timeout);
149 uint8_t wait_forPGM(
const char* str, uint16_t timeout,uint8_t bytes=0,
char* buffer=NULL);
150 uint8_t wait_for_available(uint16_t* timeout,
int bytes=1);
151 void printPGM(
const char *str);
152 void printlnPGM(
const char *str);
153 void serialprintPGM(
const char *str);
154 void serialprintlnPGM(
const char *str);
157 char _config_buffer[BayTCP_CONFIG_SIZE];
169 char _base64buffer[BayTCP_BUFFER];
170 uint8_t _tx_error_count;
172 void urlDecode(
char *str);
173 int strlenURLencoded(
const char *str);
174 void printURLencoded(
const char *str);
175 static const char*
const _urlencodedChars;
void readConfigFromStringPGM(const char *string)
Definition: BayTCP.cpp:448
uint8_t sendPayload(void)
Definition: BayTCP.cpp:393
boolean _urlencode
Definition: BayTCP.h:139
void readConfigFromEEPROM(int eeoffset=BayTCP_EEPROM_OFFSET)
Definition: BayTCP.cpp:467
void setConfig(const char *str, uint8_t index)
Definition: BayTCP.cpp:539
const char * getConfig(void)
Definition: BayTCP.cpp:484
char ** getConfigPointer(uint8_t index)
Definition: BayTCP.cpp:488
uint8_t sendMultiFromBuffer(uint16_t maxsize=5000)
Definition: BayTCP.cpp:195
void writeConfigToEEPROM(int eeoffset=BayTCP_EEPROM_OFFSET)
Definition: BayTCP.cpp:478
virtual void disconnect(void)=0
virtual uint8_t connect(void)=0