Skip to content

Conversation

@david-cermak
Copy link
Collaborator

@david-cermak david-cermak commented Sep 4, 2025

New URC "observer" that controls:

  • what's been consumed (fully, partially, not-at-all)
  • where we're in the buffer processing (start, offset, end)

TODO

  • Cleanup git history
  • Remove AI guided files

@david-cermak david-cermak self-assigned this Sep 4, 2025
@david-cermak david-cermak marked this pull request as ready for review September 4, 2025 09:32

void set_enhanced_urc(esp_modem::DTE::enhanced_urc_cb enhanced_cb)
{
dte->set_enhanced_urc_cb(enhanced_cb);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need to check for valid callback?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need IMO, I use nullptr value for clearing the cb

std::string_view buffer((const char*)info.buffer_start, info.buffer_total_size);

// First, check if we have the completion message anywhere in the buffer
if (buffer.find("Transfer completed") != std::string_view::npos) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You could use contains

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not unless we move to C++23, esp-modem is still C++17.

@@ -0,0 +1,314 @@
# ESP Modem Enhanced URC Documentation Plan
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we keep this?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I'll remove this before merge, it's mentioned above in the TODO list:

Remove AI guided files

@@ -0,0 +1,439 @@
# ESP Modem Enhanced URC Interface Test Plan
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we keep?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants