[core] pass/locate otInstance to all OpenThread classes

This commit changes the model for OpenThread classes so that all
classes track/locate their owning/parent `otInstance` object (i.e.,
the owning `otInstance` object reference is expected to be passed  as
an input argument in the object constructor). This replaces and
simplifies current model where some of classes track/locate the parent
`ThreadNetif`, `MeshForwarder`, or `Ip6` object references instead.
This helps harmonize the model across OpenThread source and also
simplify the `Locator` class implementation.
This commit is contained in:
Abtin Keshavarzian
2017-10-14 02:57:33 -07:00
committed by Jonathan Hui
parent 7b084eca71
commit 4cb17495b2
87 changed files with 358 additions and 501 deletions
+1 -1
View File
@@ -87,7 +87,7 @@ otInstance::otInstance(void) :
mTimerMicroScheduler(*this),
#endif
mIp6(*this),
mThreadNetif(mIp6),
mThreadNetif(*this),
#if OPENTHREAD_ENABLE_RAW_LINK_API
mLinkRaw(*this),
#endif // OPENTHREAD_ENABLE_RAW_LINK_API