Пример #1
0
JoinerRouter::JoinerRouter(Instance &aInstance)
    : InstanceLocator(aInstance)
    , mSocket(aInstance.GetThreadNetif().GetIp6().GetUdp())
    , mRelayTransmit(OT_URI_PATH_RELAY_TX, &JoinerRouter::HandleRelayTransmit, this)
    , mTimer(aInstance, &JoinerRouter::HandleTimer, this)
    , mNotifierCallback(&JoinerRouter::HandleStateChanged, this)
    , mJoinerUdpPort(0)
    , mIsJoinerPortConfigured(false)
    , mExpectJoinEntRsp(false)
{
    GetNetif().GetCoap().AddResource(mRelayTransmit);
    aInstance.GetNotifier().RegisterCallback(mNotifierCallback);
}
Пример #2
0
EnergyScanServer::EnergyScanServer(Instance &aInstance)
    : InstanceLocator(aInstance)
    , mChannelMask(0)
    , mChannelMaskCurrent(0)
    , mPeriod(0)
    , mScanDuration(0)
    , mCount(0)
    , mActive(false)
    , mScanResultsLength(0)
    , mTimer(aInstance, &EnergyScanServer::HandleTimer, this)
    , mNotifierCallback(&EnergyScanServer::HandleStateChanged, this)
    , mEnergyScan(OT_URI_PATH_ENERGY_SCAN, &EnergyScanServer::HandleRequest, this)
{
    aInstance.GetNotifier().RegisterCallback(mNotifierCallback);
    GetNetif().GetCoap().AddResource(mEnergyScan);
}
Пример #3
0
JamDetector::JamDetector(Instance &aInstance)
    : InstanceLocator(aInstance)
    , mHandler(NULL)
    , mContext(NULL)
    , mNotifierCallback(HandleStateChanged, this)
    , mTimer(aInstance, &JamDetector::HandleTimer, this)
    , mHistoryBitmap(0)
    , mCurSecondStartTime(0)
    , mSampleInterval(0)
    , mWindow(kMaxWindow)
    , mBusyPeriod(kMaxWindow)
    , mEnabled(false)
    , mAlwaysAboveThreshold(false)
    , mJamState(false)
    , mRssiThreshold(kDefaultRssiThreshold)
{
    aInstance.GetNotifier().RegisterCallback(mNotifierCallback);
}