Cleanup device role names. (#1820)

This commit is contained in:
Jonathan Hui
2017-05-25 15:36:43 -07:00
committed by GitHub
parent ded892f8c6
commit 427ef53900
26 changed files with 278 additions and 323 deletions
+5 -9
View File
@@ -2412,29 +2412,25 @@ void Interpreter::ProcessState(int argc, char *argv[])
{
switch (otThreadGetDeviceRole(mInstance))
{
case kDeviceRoleOffline:
sServer->OutputFormat("offline\r\n");
break;
case kDeviceRoleDisabled:
case OT_DEVICE_ROLE_DISABLED:
sServer->OutputFormat("disabled\r\n");
break;
case kDeviceRoleDetached:
case OT_DEVICE_ROLE_DETACHED:
sServer->OutputFormat("detached\r\n");
break;
case kDeviceRoleChild:
case OT_DEVICE_ROLE_CHILD:
sServer->OutputFormat("child\r\n");
break;
#if OPENTHREAD_FTD
case kDeviceRoleRouter:
case OT_DEVICE_ROLE_ROUTER:
sServer->OutputFormat("router\r\n");
break;
case kDeviceRoleLeader:
case OT_DEVICE_ROLE_LEADER:
sServer->OutputFormat("leader\r\n");
break;
#endif // OPENTHREAD_FTD