Skip to content

Commit

Permalink
fix(modem): Fixup the docs
Browse files Browse the repository at this point in the history
  • Loading branch information
david-cermak committed Nov 7, 2024
1 parent 3a2acb4 commit 0519885
Show file tree
Hide file tree
Showing 20 changed files with 45 additions and 410 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/modem__build-host-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -108,11 +108,13 @@ jobs:
steps:
- name: Checkout esp-protocols
uses: actions/checkout@v4
- name: Compat check
shell: bash
run: |
apt-get update -y
apt-get install -y astyle
sudo apt-get update -y
sudo apt-get install -y astyle
cd components/esp_modem
find examples/ -type f -regex '.*/generate/.*\.\(hpp\|cpp\)' -exec ./scripts/generate.sh {} \;
./scripts/generate.sh
git diff --name-only
git diff --quiet
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
#include "cxx_include/esp_modem_dce_module.hpp"
#include "cxx_include/esp_modem_types.hpp"

// --- ESP-MODEM command module starts here ---
namespace esp_modem {
namespace dce_commands {

Expand Down Expand Up @@ -40,37 +39,6 @@ command_result generic_command(CommandableIf *t, const std::string &command,
*/


//
//#define INT_IN(name) int name
//#ifdef __cplusplus
//#define STRING_IN(name) const std::string& name
//#define STRING_OUT(name) std::string& name
//#define BOOL_IN(name) const bool name
//#define BOOL_OUT(name) bool& name
//#define INT_OUT(name) int& name
//#define INTEGER_LIST_IN(name) const int* name
//#define STRUCT_OUT(struct_name, name) struct_name& name
//#else
//#define STRING_IN(name) const char* name
//#define STRING_OUT(name) char* name
//#define BOOL_IN(name) const bool name
//#define BOOL_OUT(name) bool* name
//#define INT_OUT(name) int* name
//#define INTEGER_LIST_IN(name) const int* name
//#define STRUCT_OUT(struct_name, name) esp_modem_ ## struct_name ## _t* name
//#endif
//
//#define FORWARD_INT_IN(name) name
//#define FORWARD_STRING_IN(name) name
//#define FORWARD_STRING_OUT(name) name
//#define FORWARD_BOOL_IN(name) name
//#define FORWARD_BOOL_OUT(name) name
//#define FORWARD_INT_OUT(name) name
//#define FORWARD_INTEGER_LIST_IN(name) name
//#define FORWARD_STRUCT_OUT(struct_name, name) name

// Utility to count arguments (works for up to two parameters here)



/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@

#pragma once

// --- ESP-MODEM command module starts here ---
namespace esp_modem {

/**
Expand All @@ -33,37 +32,6 @@ class DCE : public DCE_T<GenericModule> {
using DCE_T<GenericModule>::DCE_T;


//
//#define INT_IN(name) int name
//#ifdef __cplusplus
//#define STRING_IN(name) const std::string& name
//#define STRING_OUT(name) std::string& name
//#define BOOL_IN(name) const bool name
//#define BOOL_OUT(name) bool& name
//#define INT_OUT(name) int& name
//#define INTEGER_LIST_IN(name) const int* name
//#define STRUCT_OUT(struct_name, name) struct_name& name
//#else
//#define STRING_IN(name) const char* name
//#define STRING_OUT(name) char* name
//#define BOOL_IN(name) const bool name
//#define BOOL_OUT(name) bool* name
//#define INT_OUT(name) int* name
//#define INTEGER_LIST_IN(name) const int* name
//#define STRUCT_OUT(struct_name, name) esp_modem_ ## struct_name ## _t* name
//#endif
//
//#define FORWARD_INT_IN(name) name
//#define FORWARD_STRING_IN(name) name
//#define FORWARD_STRING_OUT(name) name
//#define FORWARD_BOOL_IN(name) name
//#define FORWARD_BOOL_OUT(name) name
//#define FORWARD_INT_OUT(name) name
//#define FORWARD_INTEGER_LIST_IN(name) name
//#define FORWARD_STRUCT_OUT(struct_name, name) name

// Utility to count arguments (works for up to two parameters here)




Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
#include "esp_modem_dce_config.h"


// --- ESP-MODEM command module starts here ---
namespace esp_modem {

/**
Expand Down Expand Up @@ -114,37 +113,6 @@ class GenericModule: public ModuleIf {
*/


//
//#define INT_IN(name) int name
//#ifdef __cplusplus
//#define STRING_IN(name) const std::string& name
//#define STRING_OUT(name) std::string& name
//#define BOOL_IN(name) const bool name
//#define BOOL_OUT(name) bool& name
//#define INT_OUT(name) int& name
//#define INTEGER_LIST_IN(name) const int* name
//#define STRUCT_OUT(struct_name, name) struct_name& name
//#else
//#define STRING_IN(name) const char* name
//#define STRING_OUT(name) char* name
//#define BOOL_IN(name) const bool name
//#define BOOL_OUT(name) bool* name
//#define INT_OUT(name) int* name
//#define INTEGER_LIST_IN(name) const int* name
//#define STRUCT_OUT(struct_name, name) esp_modem_ ## struct_name ## _t* name
//#endif
//
//#define FORWARD_INT_IN(name) name
//#define FORWARD_STRING_IN(name) name
//#define FORWARD_STRING_OUT(name) name
//#define FORWARD_BOOL_IN(name) name
//#define FORWARD_BOOL_OUT(name) name
//#define FORWARD_INT_OUT(name) name
//#define FORWARD_INTEGER_LIST_IN(name) name
//#define FORWARD_STRUCT_OUT(struct_name, name) name

// Utility to count arguments (works for up to two parameters here)




Expand Down
39 changes: 0 additions & 39 deletions components/esp_modem/command/include/esp_modem_api.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,45 +14,6 @@
extern "C" {
#endif

// --- ESP-MODEM command module starts here ---

//
//#define INT_IN(name) int name
//#ifdef __cplusplus
//#define STRING_IN(name) const std::string& name
//#define STRING_OUT(name) std::string& name
//#define BOOL_IN(name) const bool name
//#define BOOL_OUT(name) bool& name
//#define INT_OUT(name) int& name
//#define INTEGER_LIST_IN(name) const int* name
//#define STRUCT_OUT(struct_name, name) struct_name& name
//#else
//#define STRING_IN(name) const char* name
//#define STRING_OUT(name) char* name
//#define BOOL_IN(name) const bool name
//#define BOOL_OUT(name) bool* name
//#define INT_OUT(name) int* name
//#define INTEGER_LIST_IN(name) const int* name
//#define STRUCT_OUT(struct_name, name) esp_modem_ ## struct_name ## _t* name
//#endif
//
//#define FORWARD_INT_IN(name) name
//#define FORWARD_STRING_IN(name) name
//#define FORWARD_STRING_OUT(name) name
//#define FORWARD_BOOL_IN(name) name
//#define FORWARD_BOOL_OUT(name) name
//#define FORWARD_INT_OUT(name) name
//#define FORWARD_INTEGER_LIST_IN(name) name
//#define FORWARD_STRUCT_OUT(struct_name, name) name

// Utility to count arguments (works for up to two parameters here)
//#define STRING_IN(name) const char* name
//#define STRING_OUT(name) char* name
//#define BOOL_IN(name) const bool name
//#define BOOL_OUT(name) bool* name
//#define INT_OUT(name) int* name
//#define INTEGER_LIST_IN(name) const int* name
//#define STRUCT_OUT(struct_name, name) esp_modem_ ## struct_name ## _t* name



Expand Down
32 changes: 0 additions & 32 deletions components/esp_modem/command/src/esp_modem_modules.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
#include "cxx_include/esp_modem_dce_module.hpp"
#include "cxx_include/esp_modem_dte.hpp"

// --- ESP-MODEM command module starts here ---
namespace esp_modem {

GenericModule::GenericModule(std::shared_ptr<DTE> dte, const dce_config *config) :
Expand All @@ -17,37 +16,6 @@ GenericModule::GenericModule(std::shared_ptr<DTE> dte, const dce_config *config)



//
//#define INT_IN(name) int name
//#ifdef __cplusplus
//#define STRING_IN(name) const std::string& name
//#define STRING_OUT(name) std::string& name
//#define BOOL_IN(name) const bool name
//#define BOOL_OUT(name) bool& name
//#define INT_OUT(name) int& name
//#define INTEGER_LIST_IN(name) const int* name
//#define STRUCT_OUT(struct_name, name) struct_name& name
//#else
//#define STRING_IN(name) const char* name
//#define STRING_OUT(name) char* name
//#define BOOL_IN(name) const bool name
//#define BOOL_OUT(name) bool* name
//#define INT_OUT(name) int* name
//#define INTEGER_LIST_IN(name) const int* name
//#define STRUCT_OUT(struct_name, name) esp_modem_ ## struct_name ## _t* name
//#endif
//
//#define FORWARD_INT_IN(name) name
//#define FORWARD_STRING_IN(name) name
//#define FORWARD_STRING_OUT(name) name
//#define FORWARD_BOOL_IN(name) name
//#define FORWARD_BOOL_OUT(name) name
//#define FORWARD_INT_OUT(name) name
//#define FORWARD_INTEGER_LIST_IN(name) name
//#define FORWARD_STRUCT_OUT(struct_name, name) name

// Utility to count arguments (works for up to two parameters here)




Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
//#include "generate/esp_modem_command_declare.inc"
#include "my_module_dce.hpp"

// --- ESP-MODEM command module starts here ---
using namespace esp_modem;

//
Expand All @@ -33,37 +32,6 @@ using namespace esp_modem;
//


//
//#define INT_IN(name) int name
//#ifdef __cplusplus
//#define STRING_IN(name) const std::string& name
//#define STRING_OUT(name) std::string& name
//#define BOOL_IN(name) const bool name
//#define BOOL_OUT(name) bool& name
//#define INT_OUT(name) int& name
//#define INTEGER_LIST_IN(name) const int* name
//#define STRUCT_OUT(struct_name, name) struct_name& name
//#else
//#define STRING_IN(name) const char* name
//#define STRING_OUT(name) char* name
//#define BOOL_IN(name) const bool name
//#define BOOL_OUT(name) bool* name
//#define INT_OUT(name) int* name
//#define INTEGER_LIST_IN(name) const int* name
//#define STRUCT_OUT(struct_name, name) esp_modem_ ## struct_name ## _t* name
//#endif
//
//#define FORWARD_INT_IN(name) name
//#define FORWARD_STRING_IN(name) name
//#define FORWARD_STRING_OUT(name) name
//#define FORWARD_BOOL_IN(name) name
//#define FORWARD_BOOL_OUT(name) name
//#define FORWARD_INT_OUT(name) name
//#define FORWARD_INTEGER_LIST_IN(name) name
//#define FORWARD_STRUCT_OUT(struct_name, name) name

// Utility to count arguments (works for up to two parameters here)



//DECLARE_ALL_COMMAND_APIS(return_type name(...) )
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
#include "cxx_include/esp_modem_dce_factory.hpp"
#include "cxx_include/esp_modem_dce_module.hpp"

// --- ESP-MODEM command module starts here ---
/**
* @brief Definition of a custom DCE uses GenericModule and all its methods
* but could override command processing. Here, for demonstration purposes only,
Expand Down Expand Up @@ -54,37 +53,6 @@ class DCE : public esp_modem::DCE_T<GenericModule>, public CommandableIf {



//
//#define INT_IN(name) int name
//#ifdef __cplusplus
//#define STRING_IN(name) const std::string& name
//#define STRING_OUT(name) std::string& name
//#define BOOL_IN(name) const bool name
//#define BOOL_OUT(name) bool& name
//#define INT_OUT(name) int& name
//#define INTEGER_LIST_IN(name) const int* name
//#define STRUCT_OUT(struct_name, name) struct_name& name
//#else
//#define STRING_IN(name) const char* name
//#define STRING_OUT(name) char* name
//#define BOOL_IN(name) const bool name
//#define BOOL_OUT(name) bool* name
//#define INT_OUT(name) int* name
//#define INTEGER_LIST_IN(name) const int* name
//#define STRUCT_OUT(struct_name, name) esp_modem_ ## struct_name ## _t* name
//#endif
//
//#define FORWARD_INT_IN(name) name
//#define FORWARD_STRING_IN(name) name
//#define FORWARD_STRING_OUT(name) name
//#define FORWARD_BOOL_IN(name) name
//#define FORWARD_BOOL_OUT(name) name
//#define FORWARD_INT_OUT(name) name
//#define FORWARD_INTEGER_LIST_IN(name) name
//#define FORWARD_STRUCT_OUT(struct_name, name) name

// Utility to count arguments (works for up to two parameters here)



// DECLARE_ALL_COMMAND_APIS(forwards name(...))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,38 +13,6 @@

namespace sock_commands {

// --- ESP-MODEM command module starts here ---

//
//#define INT_IN(name) int name
//#ifdef __cplusplus
//#define STRING_IN(name) const std::string& name
//#define STRING_OUT(name) std::string& name
//#define BOOL_IN(name) const bool name
//#define BOOL_OUT(name) bool& name
//#define INT_OUT(name) int& name
//#define INTEGER_LIST_IN(name) const int* name
//#define STRUCT_OUT(struct_name, name) struct_name& name
//#else
//#define STRING_IN(name) const char* name
//#define STRING_OUT(name) char* name
//#define BOOL_IN(name) const bool name
//#define BOOL_OUT(name) bool* name
//#define INT_OUT(name) int* name
//#define INTEGER_LIST_IN(name) const int* name
//#define STRUCT_OUT(struct_name, name) esp_modem_ ## struct_name ## _t* name
//#endif
//
//#define FORWARD_INT_IN(name) name
//#define FORWARD_STRING_IN(name) name
//#define FORWARD_STRING_OUT(name) name
//#define FORWARD_BOOL_IN(name) name
//#define FORWARD_BOOL_OUT(name) name
//#define FORWARD_INT_OUT(name) name
//#define FORWARD_INTEGER_LIST_IN(name) name
//#define FORWARD_STRUCT_OUT(struct_name, name) name

// Utility to count arguments (works for up to two parameters here)



Expand Down
Loading

0 comments on commit 0519885

Please sign in to comment.