equal
deleted
inserted
replaced
489 err = TCAPI_ERR_NONE; |
489 err = TCAPI_ERR_NONE; |
490 #ifdef _DEBUG |
490 #ifdef _DEBUG |
491 COMMLOGOPEN(); |
491 COMMLOGOPEN(); |
492 COMMLOGS("CRealSerialComm::SendDataToPort WriteFile successful\n"); |
492 COMMLOGS("CRealSerialComm::SendDataToPort WriteFile successful\n"); |
493 BYTE* ptr = (BYTE*)inData; |
493 BYTE* ptr = (BYTE*)inData; |
494 long numBytes = (inSize > 20) ? 20 : inSize; |
494 long numBytes = (inSize > 80) ? 80 : inSize; |
495 char msg[200]; |
495 char msg[200]; |
496 sprintf(msg, "CRealSerialComm::SendDataToPort = "); |
496 sprintf(msg, "CRealSerialComm::SendDataToPort = "); |
497 for (int i = 0; i < numBytes; i++) |
497 for (int i = 0; i < numBytes; i++) |
498 { |
498 { |
499 sprintf(msg, "%s %02.2x", msg, ptr[i]); |
499 sprintf(msg, "%s %02.2x", msg, ptr[i]); |
776 if (bytesRemaining < protocolHeaderLength) |
776 if (bytesRemaining < protocolHeaderLength) |
777 done = true; |
777 done = true; |
778 } |
778 } |
779 else |
779 else |
780 { |
780 { |
781 done = true; |
781 numberProcessed++; |
|
782 usedLen += fullMessageLength; |
|
783 bytesRemaining -= fullMessageLength; |
|
784 ptr += fullMessageLength; |
|
785 if (bytesRemaining < protocolHeaderLength) |
|
786 done = true; |
782 } |
787 } |
783 } |
788 } |
784 DeleteMsg(usedLen); |
789 DeleteMsg(usedLen); |
785 } |
790 } |
786 } |
791 } |