mirror of
https://github.com/espressif/openthread.git
synced 2026-07-08 13:20:25 +00:00
[coaps] CoAP Secure Client/Server accessible through OT API (#2716)
This commit is contained in:
committed by
Jonathan Hui
parent
5fe9038e33
commit
2ce47a8e9c
@@ -80,6 +80,10 @@
|
||||
#include "cli_coap.hpp"
|
||||
#endif
|
||||
|
||||
#if OPENTHREAD_ENABLE_APPLICATION_COAP_SECURE
|
||||
#include "cli_coap_secure.hpp"
|
||||
#endif
|
||||
|
||||
#if (OPENTHREAD_CONFIG_LOG_OUTPUT == OPENTHREAD_CONFIG_LOG_OUTPUT_DEBUG_UART) && OPENTHREAD_POSIX
|
||||
#include <openthread/platform/debug_uart.h>
|
||||
#endif
|
||||
@@ -106,6 +110,9 @@ const struct Command Interpreter::sCommands[] = {
|
||||
#if OPENTHREAD_ENABLE_APPLICATION_COAP
|
||||
{"coap", &Interpreter::ProcessCoap},
|
||||
#endif
|
||||
#if OPENTHREAD_ENABLE_APPLICATION_COAP_SECURE
|
||||
{"coaps", &Interpreter::ProcessCoapSecure},
|
||||
#endif
|
||||
#if OPENTHREAD_ENABLE_COMMISSIONER && OPENTHREAD_FTD
|
||||
{"commissioner", &Interpreter::ProcessCommissioner},
|
||||
#endif
|
||||
@@ -287,6 +294,9 @@ Interpreter::Interpreter(Instance *aInstance)
|
||||
#if OPENTHREAD_ENABLE_APPLICATION_COAP
|
||||
, mCoap(*this)
|
||||
#endif
|
||||
#if OPENTHREAD_ENABLE_APPLICATION_COAP_SECURE
|
||||
, mCoapSecure(*this)
|
||||
#endif
|
||||
{
|
||||
#ifdef OTDLL
|
||||
assert(mApiInstance);
|
||||
@@ -649,6 +659,17 @@ void Interpreter::ProcessCoap(int argc, char *argv[])
|
||||
|
||||
#endif // OPENTHREAD_ENABLE_APPLICATION_COAP
|
||||
|
||||
#if OPENTHREAD_ENABLE_APPLICATION_COAP_SECURE
|
||||
|
||||
void Interpreter::ProcessCoapSecure(int argc, char *argv[])
|
||||
{
|
||||
otError error;
|
||||
error = mCoapSecure.Process(argc, argv);
|
||||
AppendResult(error);
|
||||
}
|
||||
|
||||
#endif // OPENTHREAD_ENABLE_APPLICATION_COAP_SECURE
|
||||
|
||||
#if OPENTHREAD_FTD
|
||||
void Interpreter::ProcessContextIdReuseDelay(int argc, char *argv[])
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user