mirror of
https://github.com/espressif/openthread.git
synced 2026-08-02 00:57:47 +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
@@ -77,7 +77,7 @@ void testPlatResetToDefaults(void)
|
||||
g_testPlatRadioGetTransmitBuffer = NULL;
|
||||
}
|
||||
|
||||
otInstance *testInitInstance(void)
|
||||
ot::Instance *testInitInstance(void)
|
||||
{
|
||||
otInstance *instance = NULL;
|
||||
|
||||
@@ -99,7 +99,7 @@ otInstance *testInitInstance(void)
|
||||
instance = otInstanceInitSingle();
|
||||
#endif
|
||||
|
||||
return instance;
|
||||
return static_cast<ot::Instance *>(instance);
|
||||
}
|
||||
|
||||
void testFreeInstance(otInstance *aInstance)
|
||||
|
||||
Reference in New Issue
Block a user