mirror of
https://github.com/espressif/openthread.git
synced 2026-07-08 13:20:25 +00:00
[instance] define ot::Instance class (#2307)
This commit makes the following changes: It defines the public `otInstance` as an empty opaque structure which is used by all public C OpenThread APIs. It defines a new class `ot::Instance` (inheriting from `otInstance) which is then used in core source files. The functionality related to the instance is also moved/added into the newly added `Instance` class (as class/static or member methods).
This commit is contained in:
committed by
Jonathan Hui
parent
a394155372
commit
02c876ef62
+1
-2
@@ -66,7 +66,6 @@
|
||||
#include <openthread/icmp6.h>
|
||||
#include <openthread/platform/uart.h>
|
||||
|
||||
#include "openthread-instance.h"
|
||||
#include "common/new.hpp"
|
||||
#include "net/ip6.hpp"
|
||||
#endif
|
||||
@@ -252,7 +251,7 @@ typedef otPtr<const otNetifAddress> otNetifAddressPtr;
|
||||
typedef otPtr<const uint8_t> otBufferPtr;
|
||||
typedef otPtr<const char> otStringPtr;
|
||||
|
||||
Interpreter::Interpreter(otInstance *aInstance):
|
||||
Interpreter::Interpreter(Instance *aInstance):
|
||||
#if OPENTHREAD_ENABLE_APPLICATION_COAP
|
||||
mCoap(*this),
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user