AtClient Class Reference
Class that facilitates the communication with an AT device. More...
#include <AtClient.h>
Collaboration diagram for AtClient:
Public Member Functions | |
| AtClient (HardwareSerial *stream) | |
| virtual | ~AtClient () |
| 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... | |
Detailed Description
Class that facilitates the communication with an AT device.
Constructor & Destructor Documentation
◆ AtClient()
| AtClient::AtClient | ( | HardwareSerial * | stream | ) |
◆ ~AtClient()
|
inlinevirtual |
Member Function Documentation
◆ getState()
|
inline |
Returns the current state.
- Return values
-
AtState
◆ next()
| void AtClient::next | ( | ) |
◆ processor()
|
protectedvirtual |
Processes response data.
◆ resend()
| void AtClient::resend | ( | ) |
◆ send() [1/4]
| void AtClient::send | ( | const String & | text, |
| const String & | altResponse = nullptr, |
||
| uint32_t | timeoutMs = AT_TIMEOUT, |
||
| unsigned | retries = 0 |
||
| ) |
Sends AT command.
- Parameters
-
text The actual AT command text. For example AT+CAMSTOP altResponse Expected response on success in addition to the default one which is OK timeoutMs Time in milliseconds to wait for response retries Retries on error
◆ send() [2/4]
| void AtClient::send | ( | const String & | text, |
| AtReceiveCallback | onReceive, | ||
| uint32_t | timeoutMs = AT_TIMEOUT, |
||
| unsigned | retries = 0 |
||
| ) |
Sends AT command.
- Parameters
-
text The actual AT command text. For example AT+CAMSTOP onReceive timeoutMs Time in milliseconds to wait for response retries Retries on error
◆ send() [3/4]
| void AtClient::send | ( | const String & | text, |
| AtCompleteCallback | onComplete, | ||
| uint32_t | timeoutMs = AT_TIMEOUT, |
||
| unsigned | retries = 0 |
||
| ) |
Sends AT command.
- Parameters
-
text String The actual AT command text. For example AT+CAMSTOP onComplete timeoutMs Time in milliseconds to wait for response retries Retries on error
◆ send() [4/4]
| void AtClient::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.
- Parameters
-
command
◆ sendDirect()
| void AtClient::sendDirect | ( | AtCommand | command | ) |
Executes directly (does not queue it) a command.
- Parameters
-
command
Member Data Documentation
◆ currentCommand
| AtCommand AtClient::currentCommand |
The current command.
The documentation for this class was generated from the following file:
1.8.13