Sming Framework API
Sming - Open Source framework for high efficiency WiFi SoC ESP8266 native development with C++ language.
|
Class that facilitates the communication with an AT device. More...
#include <AtClient.h>
Public Member Functions | |
AtClient (HardwareSerial *stream) | |
void | send (const String &text, const String &altResponse=nullptr, uint32_t timeoutMs=AT_TIMEOUT, unsigned retries=0) |
Sends AT command. More... | |
void | send (const String &text, AtReceiveCallback onReceive, uint32_t timeoutMs=AT_TIMEOUT, unsigned retries=0) |
Sends AT command. More... | |
void | send (const String &text, AtCompleteCallback onComplete, uint32_t timeoutMs=AT_TIMEOUT, unsigned retries=0) |
Sends AT command. More... | |
void | send (AtCommand command) |
Adds a command to the queue. If you need all the flexibility then use that command and manually set your AtCommand arguments. More... | |
void | sendDirect (AtCommand command) |
Executes directly (does not queue it) a command. More... | |
AtState | getState () |
Returns the current state. More... | |
void | resend () |
void | next () |
Public Attributes | |
AtCommand | currentCommand |
The current command. More... | |
Protected Member Functions | |
virtual void | processor (Stream &source, char arrivedChar, uint16_t availableCharsCount) |
Processes response data. More... | |
Class that facilitates the communication with an AT device.
|
inline |
Returns the current state.
|
protectedvirtual |
Processes response data.
void AtClient::send | ( | const String & | text, |
AtReceiveCallback | onReceive, | ||
uint32_t | timeoutMs = AT_TIMEOUT , |
||
unsigned | retries = 0 |
||
) |
Sends AT command.
text | String The actual AT command text. For example AT+CAMSTOP |
AtReceiveCallback | onReceive |
timeoutMs | uint32_t Time in milliseconds to wait for response |
retries | int Retries on error |
void AtClient::send | ( | const String & | text, |
AtCompleteCallback | onComplete, | ||
uint32_t | timeoutMs = AT_TIMEOUT , |
||
unsigned | retries = 0 |
||
) |
Sends AT command.
text | String The actual AT command text. For example AT+CAMSTOP |
AtCompleteCallback | onComplete |
timeoutMs | uint32_t Time in milliseconds to wait for response |
retries | int Retries on error |
void AtClient::send | ( | AtCommand | command | ) |
void AtClient::sendDirect | ( | AtCommand | command | ) |
Executes directly (does not queue it) a command.
command | AtCommand |
AtCommand AtClient::currentCommand |
The current command.