BayEOS-Arduino
1.8.0_0.0.4
|
Public Member Functions | |
uint8_t | sendPayload (void) |
virtual uint8_t | connect (void)=0 |
virtual void | disconnect (void)=0 |
uint8_t | sendMultiFromBuffer (uint16_t maxsize=5000) |
void | setConfig (const char *str, uint8_t index) |
void | readConfigFromStringPGM (const char *string) |
void | readConfigFromFile (const char *file) |
void | readConfigFromEEPROM (int eeoffset=BayTCP_EEPROM_OFFSET) |
void | writeConfigToEEPROM (int eeoffset=BayTCP_EEPROM_OFFSET) |
const char * | getConfig (void) |
const uint8_t * | parseMAC (const char *str) |
const uint8_t * | parseIP (const char *str) |
uint8_t | hex2int (const char c) |
char ** | getConfigPointer (uint8_t index) |
Public Member Functions inherited from BayEOS | |
BayEOS (void) | |
virtual uint8_t | readIntoPayload (int timeout=5000) |
virtual int | available (void) |
uint8_t | sendError (const String &s) |
uint8_t | sendMessage (const String &s) |
void | startFrame (uint8_t type) |
void | startOriginFrame (const String &o, uint8_t routed=0) |
void | startDataFrame (uint8_t subtype=BayEOS_Float32le, uint8_t checksum=0) |
void | startDataFrameWithOrigin (uint8_t subtype, const String &o, uint8_t checksum=0, uint8_t routed=0) |
uint8_t | addChannelValue (float v, uint8_t channel_number=0) |
uint8_t | addChannelValue (double v, uint8_t channel_number=0) |
uint8_t | addChannelValue (long v, uint8_t channel_number=0) |
uint8_t | addChannelValue (unsigned long v, uint8_t channel_number=0) |
uint8_t | addChannelValue (int v, uint8_t channel_number=0) |
uint8_t | addChannelValue (unsigned int v, uint8_t channel_number=0) |
uint8_t | addChannelValue (int8_t v, uint8_t channel_number=0) |
uint8_t | addChannelValue (uint8_t v, uint8_t channel_number=0) |
uint8_t | addChannelValue (float v, const char *channel_label) |
uint8_t | addChannelValue (double v, const char *channel_label) |
uint8_t | addChannelValue (long v, const char *channel_label) |
uint8_t | addChannelValue (unsigned long v, const char *channel_label) |
uint8_t | addChannelValue (int v, const char *channel_label) |
uint8_t | addChannelValue (unsigned int v, const char *channel_label) |
uint8_t | addChannelValue (int8_t v, const char *channel_label) |
uint8_t | addChannelValue (uint8_t v, const char *channel_label) |
uint8_t | addChecksum (void) |
uint8_t | validateChecksum (void) |
void | startRoutedFrame (uint16_t sourceMyID, uint16_t sourcePANID, uint8_t rssi=0) |
void | startDelayedFrame (unsigned long delay) |
void | startTimestampFrame (unsigned long timestamp) |
void | startCommand (uint8_t cmd_api) |
void | startCommandResponse (uint8_t cmd_api) |
uint8_t | addToPayload (uint8_t b) |
uint8_t | addToPayload (const void *p, uint8_t length) |
uint8_t | addToPayload (const uint8_t *c) |
uint8_t | addToPayload (const String &s) |
uint8_t | addToPayload (float f) |
uint8_t | addToPayload (unsigned long l) |
uint8_t | addToPayload (long l) |
uint8_t | addToPayload (int w) |
uint8_t | addToPayload (uint16_t w) |
uint8_t | getPayloadBytesLeft (void) const |
uint8_t | getPayloadLength (void) const |
uint8_t | getPacketLength (void) const |
const uint8_t * | getPayload (void) const |
uint8_t | getPayload (uint8_t index) const |
uint8_t | sendOrBuffer (void) |
uint8_t | sendFromBuffer (void) |
uint8_t | writeToBuffer (void) |
uint8_t | readFromBuffer (void) |
uint8_t | readBinaryFromBuffer (unsigned long pos) |
uint8_t | readBinaryFromBuffer (unsigned long pos, unsigned long end, unsigned long vpos) |
void | setBuffer (BayEOSBuffer &buffer, uint16_t max_skip=0) |
Public Attributes | |
boolean | _urlencode |
Public Attributes inherited from BayEOS | |
uint8_t | _payload [BayEOS_MAX_PAYLOAD] |
uint8_t | _next |
uint8_t | _success |
uint8_t | _failure_counter |
uint16_t | _max_skip |
uint16_t | _skip_counter |
BayEOSBuffer * | _buffer |
Static Protected Attributes | |
static const char *const | _urlencodedChars ="$&+,/:;=?@ <>#%{}|~[]`" |
|
pure virtual |
Connect to the web through apn 0 == OK 1 == Network TIMEOUT 2 == Device TIMEOUT 3 and more == specific result codes of implementation
Implemented in BayGPRSInterface, BayESP8266Interface, and BayEth.
|
pure virtual |
Disconnect from the web
Implemented in BayGPRSInterface, BayESP8266Interface, and BayEth.
const char * BayTCPInterface::getConfig | ( | void | ) |
get pointer to config buffer server\0port\0path\0user\0\0password\0sender\0apn\0apn_pw\0apn_user\0\0
Definition at line 344 of file BayTCP.cpp.
char ** BayTCPInterface::getConfigPointer | ( | uint8_t | index | ) |
get a pointer to a specific config buffer entry e.g Serial.print(*getConfigPointer(APN));
Definition at line 348 of file BayTCP.cpp.
void BayTCPInterface::readConfigFromEEPROM | ( | int | eeoffset = BayTCP_EEPROM_OFFSET | ) |
read config from EEPROM
Definition at line 327 of file BayTCP.cpp.
void BayTCPInterface::readConfigFromFile | ( | const char * | file | ) |
read config from file (uses SdFat library!) same format like for readConfigFromStringPGM
Definition at line 297 of file BayTCP.cpp.
void BayTCPInterface::readConfigFromStringPGM | ( | const char * | string | ) |
read config from string - use | as field delimiter 132.180.112.x|80|path|user|password|Sender|APN|APN-PW|APN-USER|PIN|
Definition at line 312 of file BayTCP.cpp.
uint8_t BayTCPInterface::sendMultiFromBuffer | ( | uint16_t | maxsize = 5000 | ) |
Send several frames in one post request returns 0 for success 1 == no success 2 == timeout 3 and more == result code of connect()+2
Definition at line 153 of file BayTCP.cpp.
|
virtual |
Send the BayEOS payload as base64 encoded string returns 0 for success 1 == no success 2 == timeout 3 and more == result code of connect()+2
Implements BayEOS.
Definition at line 243 of file BayTCP.cpp.
void BayTCPInterface::setConfig | ( | const char * | str, |
uint8_t | index | ||
) |
set as config value in config buffer
Definition at line 398 of file BayTCP.cpp.
void BayTCPInterface::writeConfigToEEPROM | ( | int | eeoffset = BayTCP_EEPROM_OFFSET | ) |
write config to EEPROM
Definition at line 338 of file BayTCP.cpp.
boolean BayTCPInterface::_urlencode |