[instance-locator] use instance reference instead of pointer (#2007)

This commit changes the `InstanceLocator` class to keep track of a
reference to `otInstance` (instead of a pointer) to make it behave
similar to other `ObjectLocator` classes. The method `GetInstance()`
in all locator objects is updated to provide a reference (instead
of a pointer) to `otInstance`.

The logging macros are updated such that a reference to `otInstance`
is passed as the first argument (with the exception of
`otLog<Level>Plat()` macros which are used by platform code in C
domain). The documentation for log macros are also updated.
This commit is contained in:
Abtin Keshavarzian
2017-07-25 15:06:14 -07:00
committed by Jonathan Hui
parent ea73c92151
commit fc72e4e719
36 changed files with 657 additions and 563 deletions
+1 -1
View File
@@ -244,7 +244,7 @@ Interpreter::Interpreter(otInstance *aInstance):
mLength(8),
mCount(1),
mInterval(1000),
mPingTimer(aInstance, &Interpreter::s_HandlePingTimer, this),
mPingTimer(*aInstance, &Interpreter::s_HandlePingTimer, this),
#if OPENTHREAD_ENABLE_DNS_CLIENT
mResolvingInProgress(0),
#endif