MAXREFDES143#: DeepCover Embedded Security in IoT Authenticated Sensing & Notification

Dependencies:   MaximInterface mbed

Embed: (wiki syntax)

« Back to documentation index

ESP8266::CmdBuilder Class Reference

ESP8266::CmdBuilder Class Reference

Builds command strings for the ESP8266 with proper formatting. More...

#include <ESP8266.hpp>

Public Member Functions

 CmdBuilder (const std::string &cmd="")
void clear (const std::string &cmd)
 Clear all arguments.
template<typename T >
void addRawArgument (const T &arg)
 Append an argument using the default string conversion for that type.
void addStringArgument (const std::string &arg)
 Append a string argument with proper quoting.
std::string str () const
 Create a string suitable for use with sendCommand().

Detailed Description

Builds command strings for the ESP8266 with proper formatting.

Definition at line 65 of file ESP8266.hpp.


Constructor & Destructor Documentation

CmdBuilder ( const std::string &  cmd = "" )
Parameters:
cmdCommand of the format "AT+[cmd]".

Definition at line 371 of file ESP8266.cpp.


Member Function Documentation

void addRawArgument ( const T &  arg )

Append an argument using the default string conversion for that type.

Parameters:
argArgument to append to the command.

Definition at line 76 of file ESP8266.hpp.

void addStringArgument ( const std::string &  arg )

Append a string argument with proper quoting.

Parameters:
argArgument to append to the command.

Definition at line 382 of file ESP8266.cpp.

void clear ( const std::string &  cmd )

Clear all arguments.

Parameters:
cmdCommand of the format "AT+[cmd]".

Definition at line 373 of file ESP8266.cpp.

std::string str (  ) const

Create a string suitable for use with sendCommand().

Returns:
The formatted command string.

Definition at line 388 of file ESP8266.cpp.