Skip to content

Expose CoAP processing functions#56

Open
mzella-ll wants to merge 1 commit into
CiscoDevNet:mainfrom
mzella-ll:refactor/expose-coap-processing-functions
Open

Expose CoAP processing functions#56
mzella-ll wants to merge 1 commit into
CiscoDevNet:mainfrom
mzella-ll:refactor/expose-coap-processing-functions

Conversation

@mzella-ll
Copy link
Copy Markdown

Summary

This PR renames and exposes the CoAP client/server processing functions.

The generic internal function names are replaced with module-specific names and declarations are added to the corresponding CoAP headers.

Changes

  • Rename process_response() to coapclient_process_response().
  • Rename process_datagram() to coapserver_process_datagram().
  • Update the internal client/server receive loops to call the renamed functions.
  • Add declarations and documentation comments to:
    • src/coap/coapclient.h
    • src/coap/coapserver.h

Motivation

The previous function names were generic and not clearly associated with the CoAP client or server module.

Using module-specific names makes the global symbols clearer and avoids ambiguity. Exposing the functions in the headers also allows other code, such as tests or platform-specific integration code, to reuse the existing CoAP response/datagram processing logic.

Expected behavior

This change should not alter runtime behavior.

The same processing logic is used as before, but the functions are now named more explicitly and declared in the corresponding public headers.

Related issue

Fixes #55

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Expose CoAP processing functions

1 participant