private void ProcessRxProc()
{
byte type = 0;
ushort opCode = 0xFFFF;
ushort eventOpCode = 0xFFFF;
byte length = 0;
byte[] data = null;
SharedObjects.Log.Write(Logging.MsgType.Debug, "ProcessRxProc", "Starting Thread");
while (!formClosing)
{
if (commParser.GetDataSize() == 0)
Thread.Sleep(10);
if (!commParser.ParseData(ref type, ref opCode, ref eventOpCode, ref length, ref data))
continue;
if (formClosing)
break;
threadMgr.rxDataIn.DataQueue.AddQTail(
new RxDataIn()
{
RxType = type,
CmdOpcode = opCode,
EventOpcode = eventOpCode,
Length = length,
Data = data
});
type = 0;
opCode = 0xFFFF;
eventOpCode = 0xFFFF;
length = 0;
data = null;
}
SharedObjects.Log.Write(Logging.MsgType.Debug, "ProcessRxProc", "Exiting Thread");
}