C++ API Documentation¶
Similar to the C API Documentation, the basic application workflow consist of
Create DTE and DCE¶
- group ESP_MODEM_INIT_DTE
Create DTE’s.
Functions
-
std::shared_ptr<DTE> create_uart_dte(const dte_config *config)¶
Create UART DTE.
- return:
shared ptr to DTE on success nullptr on failure (either due to insufficient memory or wrong dte configuration) if exceptions are disabled the API abort()’s on error
- Parameters:
config – DTE configuration
-
std::shared_ptr<DTE> create_vfs_dte(const dte_config *config)¶
Create VFS DTE.
- return:
shared ptr to DTE on success nullptr on failure (either due to insufficient memory or wrong dte configuration) if exceptions are disabled the API abort()’s on error
- Parameters:
config – DTE configuration
-
std::shared_ptr<DTE> create_uart_dte(const dte_config *config)¶
- group ESP_MODEM_INIT_DCE
ESP_MODEM Initialization API for DCE.
Mode switching commands¶
-
template<class SpecificModule>
class esp_modem::DCE_T¶ General DCE class templated on a specific module. It is responsible for all the necessary transactions related to switching modes and consequent synergy with aggregated objects of DTE, Netif and a specific Module.
Public Functions
-
inline void set_data()¶
Set data mode!
-
inline void set_data()¶
Modem commands¶
Destroy the DCE¶
The DCE object is created as std::unique_ptr by default and as such doesn’t have to be explicitly destroyed.
It simply gets destroyed and cleaned-up automatically if the object goes out of the block scope.