//---------------------------------------------------------------------- private void LogEvent(EMQLogID aIndex, string aStr) { if (logging != EMQLog.None) { logger.Log((int)aIndex, aStr); } }
//---------------------------------------------------------------------- private void LogPacket(EMQLogID aIndex, int aCount) { byte[] thePacket; if (logging == EMQLog.All) { if (aIndex == EMQLogID.Send) { thePacket = sPacket.Bytes; } else { thePacket = rPacket.Bytes; } str = ""; for (int i = 0; i < aCount; i++) { str += string.Format("{0:X02} ", thePacket[i]); } LogEvent(aIndex, str); } }