private void ParseCommandType(UInt16 cmdTypeRaw, out RRACCommand cmdType, out string cmdTypeStr) { if (knownCommands.ContainsKey(cmdTypeRaw)) { cmdType = knownCommands[cmdTypeRaw]; cmdTypeStr = String.Format("RRAC {0}", cmdType.ToString(), cmdTypeRaw); } else { cmdType = RRACCommand.UNKNOWN; cmdTypeStr = String.Format("RRAC UNKNOWN{0}", cmdTypeRaw); } }