Skip to content

gcoap: API revamp - Abstracting nanocoap #16855

@miri64

Description

@miri64

During the summit we discussed a general API overhaul for our CoAP infrastructure. While the overall goal is a complete redesign of the gCoAP API that would for now fork from the original gCoAP, there is also work to be done for good old gCoAP:

  • Compatibly (with deprecations over release cycles) get rid of direct member access in nanocoap (using static inline accessors instead).

This issue serves as a tracking issue towards this goal and how I imagine the road forward there:

  • Provide gcoap-based getter/setter functions for nanocoap data types.
  • Replace direct access to members of those nanocoap data types getter/setter functions.
  • Deprecate direct assess to members of nanocoap data types
  • Move gcoap-specific members of nanocoap data types to new gcoap types that inherit from the original nanocoap types. In an in-between step this will most likely require a lot of casting, since the gcoap functions, for now, should keep their (nanocoap-based) parameter types.
  • Provide new gcoap functions and types that use the new gcoap types, provide wrappers for old nanocoap-types-based functions and types.
  • Deprecate nanocoap-types-based wrappers

Metadata

Metadata

Labels

Area: CoAPArea: Constrained Application Protocol implementationsDiscussion: RFCThe issue/PR is used as a discussion starting point about the item of the issue/PRType: cleanupThe issue proposes a clean-up / The PR cleans-up parts of the codebase / documentationType: trackingThe issue tracks and organizes the sub-tasks of a larger effort

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions