Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

C++ example please (IDFGH-12752) #564

Closed
3 tasks done
dannybackx opened this issue May 2, 2024 · 3 comments
Closed
3 tasks done

C++ example please (IDFGH-12752) #564

dannybackx opened this issue May 2, 2024 · 3 comments

Comments

@dannybackx
Copy link

Answers checklist.

  • I have read the documentation for esp-protocols components and the issue is not addressed there.
  • I have updated my esp-protocols branch (master or release) to the latest version and checked that the issue is present there.
  • I have searched the issue tracker for a similar issue and not found a similar issue.

General issue report

The docs speak about C++ but there isn't a single C++ example.
Yes I also looked at IDFGH-8031, this is also a mixture between C and C++.

Could someone post a small full C++ sample please ?

@github-actions github-actions bot changed the title C++ example please C++ example please (IDFGH-12752) May 2, 2024
@david-cermak
Copy link
Collaborator

I think most of our examples use the esp_modem's C++ API. They still use the plain C API of other components (esp_event, mqtt, esp_netif, ota and others) in order to simplify things and demonstrate mainly the modem library.

What exactly do you mean by the small full C++ sample ? using C++ wrapper around general IDF components? Using Espressif C++ component from https://github.com/espressif/esp-idf-cxx? Using exceptions for error handling?

You can also check some of our test apps, which use RAII wrappers around events, mqtt and OTA: https://github.com/espressif/esp-protocols/tree/master/components/esp_modem/test/target_ota

@dannybackx
Copy link
Author

dannybackx commented May 7, 2024

Yeah, you're right, I think I messed up with my question.
I must have looked in all the wrong places for a while and probably copied both from C++ and C examples into my own source.

The ppp_connect_esp_modem.c was probably one of the culprits (in esp-protocols/examples/esp_netif/multiple_netifs) .

@david-cermak
Copy link
Collaborator

Closing as most of the esp_modem examples in C++

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants