| 
									
										
										
										
											2021-03-29 19:34:45 +02:00
										 |  |  | /*
 | 
					
						
							|  |  |  |  * SPDX-FileCopyrightText: 2021-2022 Espressif Systems (Shanghai) CO LTD | 
					
						
							| 
									
										
										
										
											2022-10-11 16:31:57 +02:00
										 |  |  |  * | 
					
						
							| 
									
										
										
										
											2021-03-29 19:34:45 +02:00
										 |  |  |  * SPDX-License-Identifier: Apache-2.0 | 
					
						
							|  |  |  |  */ | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-05-26 15:57:25 +02:00
										 |  |  | #pragma once
 | 
					
						
							| 
									
										
										
										
											2021-03-03 20:35:08 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  | #include <memory>
 | 
					
						
							|  |  |  | #include "cxx_include/esp_modem_dce.hpp"
 | 
					
						
							| 
									
										
										
										
											2021-03-07 19:43:45 +01:00
										 |  |  | #include "cxx_include/esp_modem_dce_module.hpp"
 | 
					
						
							| 
									
										
										
										
											2021-03-03 20:35:08 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-03-08 15:10:15 +01:00
										 |  |  | struct esp_modem_dte_config; | 
					
						
							| 
									
										
										
										
											2021-03-29 19:34:45 +02:00
										 |  |  | struct esp_modem_dce_config; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | namespace esp_modem { | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | class DTE; | 
					
						
							| 
									
										
										
										
											2021-03-03 20:35:08 +01:00
										 |  |  | typedef struct esp_netif_obj esp_netif_t; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-03-29 19:34:45 +02:00
										 |  |  | /**
 | 
					
						
							|  |  |  |  * @defgroup ESP_MODEM_INIT_DTE ESP_MODEM Initialization API for DTE | 
					
						
							|  |  |  |  * @brief Create DTE's | 
					
						
							|  |  |  |  */ | 
					
						
							|  |  |  | /** @addtogroup ESP_MODEM_INIT_DTE
 | 
					
						
							|  |  |  | * @{ | 
					
						
							|  |  |  | */ | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-04-14 17:57:42 +02:00
										 |  |  | using dce_config = ::esp_modem_dce_config; | 
					
						
							|  |  |  | using dte_config = ::esp_modem_dte_config; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-03-29 19:34:45 +02:00
										 |  |  | /**
 | 
					
						
							|  |  |  |  * @brief Create UART DTE | 
					
						
							|  |  |  |  * @param config DTE configuration | 
					
						
							| 
									
										
										
										
											2021-04-19 11:55:42 +02:00
										 |  |  |  * @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 | 
					
						
							| 
									
										
										
										
											2021-03-29 19:34:45 +02:00
										 |  |  |  */ | 
					
						
							|  |  |  | std::shared_ptr<DTE> create_uart_dte(const dte_config *config); | 
					
						
							| 
									
										
										
										
											2021-05-06 18:57:07 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-05-18 19:10:32 +02:00
										 |  |  | /**
 | 
					
						
							|  |  |  |  * @brief Create VFS DTE | 
					
						
							|  |  |  |  * @param config DTE configuration | 
					
						
							|  |  |  |  * @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 | 
					
						
							|  |  |  |  */ | 
					
						
							| 
									
										
										
										
											2021-05-06 18:57:07 +02:00
										 |  |  | std::shared_ptr<DTE> create_vfs_dte(const dte_config *config); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-03-29 19:34:45 +02:00
										 |  |  | /**
 | 
					
						
							|  |  |  |  * @} | 
					
						
							|  |  |  |  */ | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | /**
 | 
					
						
							|  |  |  |  * @defgroup ESP_MODEM_INIT_DCE ESP_MODEM Initialization API for DCE | 
					
						
							| 
									
										
										
										
											2021-04-14 17:57:42 +02:00
										 |  |  |  * @brief ESP_MODEM Initialization API for DCE | 
					
						
							| 
									
										
										
										
											2021-03-29 19:34:45 +02:00
										 |  |  |  */ | 
					
						
							|  |  |  | /** @addtogroup ESP_MODEM_INIT_DCE
 | 
					
						
							|  |  |  | * @{ | 
					
						
							|  |  |  | */ | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | /**
 | 
					
						
							|  |  |  |  * @brief Create DCE based on SIM7600 module | 
					
						
							|  |  |  |  * @param config DCE configuration | 
					
						
							| 
									
										
										
										
											2021-06-17 22:20:21 +08:00
										 |  |  |  * @param dte reference to the communicating DTE | 
					
						
							| 
									
										
										
										
											2021-03-29 19:34:45 +02:00
										 |  |  |  * @param netif reference to the network interface | 
					
						
							|  |  |  |  * | 
					
						
							|  |  |  |  * @return unique ptr to the created DCE on success | 
					
						
							|  |  |  |  *         nullptr on failure | 
					
						
							| 
									
										
										
										
											2021-04-19 11:55:42 +02:00
										 |  |  |  *         if exceptions are disabled the API abort()'s on error | 
					
						
							| 
									
										
										
										
											2021-03-29 19:34:45 +02:00
										 |  |  |  */ | 
					
						
							|  |  |  | std::unique_ptr<DCE> create_SIM7600_dce(const dce_config *config, std::shared_ptr<DTE> dte, esp_netif_t *netif); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-04-13 13:42:57 +02:00
										 |  |  | /**
 | 
					
						
							|  |  |  |  * @brief Create DCE based on SIM7070 module | 
					
						
							|  |  |  |  */ | 
					
						
							|  |  |  | std::unique_ptr<DCE> create_SIM7070_dce(const dce_config *config, std::shared_ptr<DTE> dte, esp_netif_t *netif); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-04-13 15:36:15 +02:00
										 |  |  | /**
 | 
					
						
							|  |  |  |  * @brief Create DCE based on SIM7000 module | 
					
						
							|  |  |  |  */ | 
					
						
							|  |  |  | std::unique_ptr<DCE> create_SIM7000_dce(const dce_config *config, std::shared_ptr<DTE> dte, esp_netif_t *netif); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-03-29 19:34:45 +02:00
										 |  |  | /**
 | 
					
						
							|  |  |  |  * @brief Create DCE based on SIM800 module | 
					
						
							|  |  |  |  */ | 
					
						
							|  |  |  | std::unique_ptr<DCE> create_SIM800_dce(const dce_config *config, std::shared_ptr<DTE> dte, esp_netif_t *netif); | 
					
						
							| 
									
										
										
										
											2021-03-03 20:35:08 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-03-29 19:34:45 +02:00
										 |  |  | /**
 | 
					
						
							|  |  |  |  * @brief Create DCE based on BG96 module | 
					
						
							|  |  |  |  */ | 
					
						
							|  |  |  | std::unique_ptr<DCE> create_BG96_dce(const dce_config *config, std::shared_ptr<DTE> dte, esp_netif_t *netif); | 
					
						
							| 
									
										
										
										
											2021-03-07 19:43:45 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-04-18 19:14:22 +02:00
										 |  |  | /**
 | 
					
						
							|  |  |  |  * @brief Create generic DCE | 
					
						
							|  |  |  |  */ | 
					
						
							|  |  |  | std::unique_ptr<DCE> create_generic_dce(const dce_config *config, std::shared_ptr<DTE> dte, esp_netif_t *netif); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-03-29 19:34:45 +02:00
										 |  |  | /**
 | 
					
						
							|  |  |  |  * @} | 
					
						
							|  |  |  |  */ | 
					
						
							| 
									
										
										
										
											2021-03-07 19:43:45 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-03-29 19:34:45 +02:00
										 |  |  | } // namespace esp_modem
 |