conventCategory method

McuMgrLogCategory conventCategory(
  1. ProtoLogMessage_LogCategory category
)

Implementation

McuMgrLogCategory conventCategory(ProtoLogMessage_LogCategory category) {
  switch (category) {
    case ProtoLogMessage_LogCategory.TRANSPORT:
      return McuMgrLogCategory.transport;
    case ProtoLogMessage_LogCategory.CONFIG:
      return McuMgrLogCategory.config;
    case ProtoLogMessage_LogCategory.CRASH:
      return McuMgrLogCategory.crash;
    case ProtoLogMessage_LogCategory.DEFAULT:
      return McuMgrLogCategory.defaultLevel;
    case ProtoLogMessage_LogCategory.FS:
      return McuMgrLogCategory.fs;
    case ProtoLogMessage_LogCategory.IMAGE:
      return McuMgrLogCategory.image;
    case ProtoLogMessage_LogCategory.LOG:
      return McuMgrLogCategory.log;
    case ProtoLogMessage_LogCategory.RUN_TEST:
      return McuMgrLogCategory.runTest;
    case ProtoLogMessage_LogCategory.STATS:
      return McuMgrLogCategory.stats;
    case ProtoLogMessage_LogCategory.DFU:
      return McuMgrLogCategory.dfu;
    default:
      throw 'Unsupported Category';
  }
}