Value, in hexa, for LRC of init.message, (type message I), is 5E ?
Thanks,
Value, in hexa, for LRC of init.message, (type message I), is 5E ?
Thanks,
Would like to know how this value has been arrived. The LRC value for "I" message( without images ) calculated as per ADVIA 2120 Tech Spec( manual ) gives a different value. Please provide the exact algorithm in arriving at the value 5E.
LRC est la verification
convertez tout le message sauf STX et ETX et LRC en binaire
chaque partie sur un byte
fait le XOR
si le resulta different de 03h ne fait rien sinon changez vers 7ah
Its just Xoring.
public static int calculateCheckSumFromAllBytes(byte[] byteArray) {
int calculatedByXOR = 0;
for (int i = 0; i
calculatedByXOR ^= c;
}
if (calculatedByXOR == ASCII.ETX) {
calculatedByXOR = 0x7F; //127
}
return calculatedByXOR;
}