27
27
#define GENERIC_THREAD_STACK_MANAGER_IMPL_OPENTHREAD_IPP
28
28
29
29
#include < cassert>
30
+ #include < limits>
30
31
31
32
#include < openthread/cli.h>
32
33
#include < openthread/dataset.h>
59
60
#include < platform/ThreadStackManager.h>
60
61
#include < platform/internal/CHIPDeviceLayerInternal.h>
61
62
62
- #include < limits>
63
63
extern " C" void otSysProcessDrivers (otInstance * aInstance);
64
64
65
65
#if CHIP_DEVICE_CONFIG_THREAD_ENABLE_CLI
@@ -80,7 +80,7 @@ app::Clusters::NetworkCommissioning::Instance
80
80
sThreadNetworkCommissioningInstance (CHIP_DEVICE_CONFIG_THREAD_NETWORK_ENDPOINT_ID /* Endpoint Id */ , &sGenericThreadDriver );
81
81
#endif
82
82
83
- void initNetworkCommissioningThreadDriver (void )
83
+ void initNetworkCommissioningThreadDriver ()
84
84
{
85
85
#ifndef _NO_GENERIC_THREAD_NETWORK_COMMISSIONING_DRIVER_
86
86
sThreadNetworkCommissioningInstance .Init ();
@@ -143,7 +143,7 @@ void GenericThreadStackManagerImpl_OpenThread<ImplClass>::OnOpenThreadStateChang
143
143
}
144
144
145
145
template <class ImplClass >
146
- void GenericThreadStackManagerImpl_OpenThread<ImplClass>::_ProcessThreadActivity(void )
146
+ void GenericThreadStackManagerImpl_OpenThread<ImplClass>::_ProcessThreadActivity()
147
147
{
148
148
otTaskletsProcess (mOTInst );
149
149
otSysProcessDrivers (mOTInst );
@@ -256,7 +256,7 @@ void GenericThreadStackManagerImpl_OpenThread<ImplClass>::_OnPlatformEvent(const
256
256
}
257
257
258
258
template <class ImplClass >
259
- bool GenericThreadStackManagerImpl_OpenThread<ImplClass>::_IsThreadEnabled(void )
259
+ bool GenericThreadStackManagerImpl_OpenThread<ImplClass>::_IsThreadEnabled()
260
260
{
261
261
VerifyOrReturnValue (mOTInst , false );
262
262
otDeviceRole curRole;
@@ -330,7 +330,7 @@ CHIP_ERROR GenericThreadStackManagerImpl_OpenThread<ImplClass>::_SetThreadProvis
330
330
}
331
331
332
332
template <class ImplClass >
333
- bool GenericThreadStackManagerImpl_OpenThread<ImplClass>::_IsThreadProvisioned(void )
333
+ bool GenericThreadStackManagerImpl_OpenThread<ImplClass>::_IsThreadProvisioned()
334
334
{
335
335
VerifyOrReturnValue (mOTInst , false );
336
336
bool provisioned;
@@ -363,7 +363,7 @@ CHIP_ERROR GenericThreadStackManagerImpl_OpenThread<ImplClass>::_GetThreadProvis
363
363
}
364
364
365
365
template <class ImplClass >
366
- bool GenericThreadStackManagerImpl_OpenThread<ImplClass>::_IsThreadAttached(void )
366
+ bool GenericThreadStackManagerImpl_OpenThread<ImplClass>::_IsThreadAttached()
367
367
{
368
368
VerifyOrReturnValue (mOTInst , false );
369
369
otDeviceRole curRole;
@@ -525,7 +525,7 @@ void GenericThreadStackManagerImpl_OpenThread<ImplClass>::_OnNetworkScanFinished
525
525
}
526
526
527
527
template <class ImplClass >
528
- ConnectivityManager::ThreadDeviceType GenericThreadStackManagerImpl_OpenThread<ImplClass>::_GetThreadDeviceType(void )
528
+ ConnectivityManager::ThreadDeviceType GenericThreadStackManagerImpl_OpenThread<ImplClass>::_GetThreadDeviceType()
529
529
{
530
530
VerifyOrReturnValue (mOTInst , ConnectivityManager::kThreadDeviceType_NotSupported );
531
531
ConnectivityManager::ThreadDeviceType deviceType;
@@ -651,7 +651,7 @@ GenericThreadStackManagerImpl_OpenThread<ImplClass>::_SetThreadDeviceType(Connec
651
651
}
652
652
653
653
template <class ImplClass >
654
- bool GenericThreadStackManagerImpl_OpenThread<ImplClass>::_HaveMeshConnectivity(void )
654
+ bool GenericThreadStackManagerImpl_OpenThread<ImplClass>::_HaveMeshConnectivity()
655
655
{
656
656
VerifyOrReturnValue (mOTInst , false );
657
657
bool res;
@@ -700,7 +700,7 @@ bool GenericThreadStackManagerImpl_OpenThread<ImplClass>::_HaveMeshConnectivity(
700
700
}
701
701
702
702
template <class ImplClass >
703
- CHIP_ERROR GenericThreadStackManagerImpl_OpenThread<ImplClass>::_GetAndLogThreadStatsCounters(void )
703
+ CHIP_ERROR GenericThreadStackManagerImpl_OpenThread<ImplClass>::_GetAndLogThreadStatsCounters()
704
704
{
705
705
VerifyOrReturnError (mOTInst , CHIP_ERROR_INCORRECT_STATE);
706
706
CHIP_ERROR err = CHIP_NO_ERROR;
@@ -795,7 +795,7 @@ CHIP_ERROR GenericThreadStackManagerImpl_OpenThread<ImplClass>::_GetAndLogThread
795
795
}
796
796
797
797
template <class ImplClass >
798
- CHIP_ERROR GenericThreadStackManagerImpl_OpenThread<ImplClass>::_GetAndLogThreadTopologyMinimal(void )
798
+ CHIP_ERROR GenericThreadStackManagerImpl_OpenThread<ImplClass>::_GetAndLogThreadTopologyMinimal()
799
799
{
800
800
VerifyOrReturnError (mOTInst , CHIP_ERROR_INCORRECT_STATE);
801
801
CHIP_ERROR err = CHIP_NO_ERROR;
@@ -1072,7 +1072,14 @@ CHIP_ERROR GenericThreadStackManagerImpl_OpenThread<ImplClass>::_GetExternalIPv6
1072
1072
}
1073
1073
1074
1074
template <class ImplClass >
1075
- void GenericThreadStackManagerImpl_OpenThread<ImplClass>::_ResetThreadNetworkDiagnosticsCounts(void )
1075
+ CHIP_ERROR GenericThreadStackManagerImpl_OpenThread<ImplClass>::_GetThreadVersion(uint16_t & version)
1076
+ {
1077
+ version = otThreadGetVersion ();
1078
+ return CHIP_NO_ERROR;
1079
+ }
1080
+
1081
+ template <class ImplClass >
1082
+ void GenericThreadStackManagerImpl_OpenThread<ImplClass>::_ResetThreadNetworkDiagnosticsCounts()
1076
1083
{
1077
1084
// Based on the spec, only OverrunCount should be resetted.
1078
1085
mOverrunCount = 0 ;
@@ -1175,14 +1182,14 @@ CHIP_ERROR GenericThreadStackManagerImpl_OpenThread<ImplClass>::DoInit(otInstanc
1175
1182
}
1176
1183
1177
1184
template <class ImplClass >
1178
- bool GenericThreadStackManagerImpl_OpenThread<ImplClass>::IsThreadAttachedNoLock(void )
1185
+ bool GenericThreadStackManagerImpl_OpenThread<ImplClass>::IsThreadAttachedNoLock()
1179
1186
{
1180
1187
otDeviceRole curRole = otThreadGetDeviceRole (mOTInst );
1181
1188
return (curRole != OT_DEVICE_ROLE_DISABLED && curRole != OT_DEVICE_ROLE_DETACHED);
1182
1189
}
1183
1190
1184
1191
template <class ImplClass >
1185
- bool GenericThreadStackManagerImpl_OpenThread<ImplClass>::IsThreadInterfaceUpNoLock(void )
1192
+ bool GenericThreadStackManagerImpl_OpenThread<ImplClass>::IsThreadInterfaceUpNoLock()
1186
1193
{
1187
1194
return otIp6IsEnabled (mOTInst );
1188
1195
}
@@ -1242,7 +1249,7 @@ CHIP_ERROR GenericThreadStackManagerImpl_OpenThread<ImplClass>::_SetPollingInter
1242
1249
#endif // CHIP_CONFIG_ENABLE_ICD_SERVER
1243
1250
1244
1251
template <class ImplClass >
1245
- void GenericThreadStackManagerImpl_OpenThread<ImplClass>::_ErasePersistentInfo(void )
1252
+ void GenericThreadStackManagerImpl_OpenThread<ImplClass>::_ErasePersistentInfo()
1246
1253
{
1247
1254
VerifyOrReturn (mOTInst );
1248
1255
ChipLogProgress (DeviceLayer, " Erasing Thread persistent info..." );
0 commit comments