[coap] misc enhancements (#5482)

This commit contains a group of smaller changes/renames in `Coap`
modules:
- Add enumeration (c++ style) constants for CoAP `Type` and `Code`
  and `OptionType`.
- Add helpers `Message::Is{Method}Request()` e.g., `IsPostRequest()`
- Define Thread URI Paths (in `uri_paths.hpp/cpp`) as char array.
- Add helper method in `Coap::Message` for common initializations
  e.g., `InitAsConfirmablePost()`.
- Add helper methods for common `Coap:Message` type and code checks
  e.g., `IsConfirmablePost()`.
- Re-define `OT_COAP_TYPE` values to use 2-bit unsigned int values
  (per RFC-7252).
This commit is contained in:
Abtin Keshavarzian
2020-09-02 19:47:50 -07:00
committed by GitHub
parent 7b6c41d329
commit ece6ac61e6
40 changed files with 752 additions and 682 deletions
+1
View File
@@ -275,6 +275,7 @@ LOCAL_SRC_FILES := \
src/core/thread/thread_netif.cpp \
src/core/thread/tmf.cpp \
src/core/thread/topology.cpp \
src/core/thread/uri_paths.cpp \
src/core/utils/channel_manager.cpp \
src/core/utils/channel_monitor.cpp \
src/core/utils/child_supervision.cpp \