ACS-11-MF
User’s Manual (Ver.1.0, Apr./2016) ------------- 37
Minute: 0x24 (36)
Second: 0x30 (48)
Response: Success
Function Code Data Length
Result
CRCH
CRCL
0xAF
0x01
0x01
4.2.11 Check Door Position
Function Code
Data Length
Reserve
CRCH
CRCL
0x50
0x02
0x52 0x54
Response
Function Code Data Length
Status
CRCH
CRCL
0xAF
0x01
Status: 1=>Close, 2=>Open
4.3 CRC Calculation (CCITT-16)
(C# Example)
public static byte[] HexStringToByteArray(string hexString)
{
if (hexString.Length != 4) hexString = "0" + hexString;
byte[] HexAsBytes = new byte[hexString.Length / 2];
for (int index = 0; index < HexAsBytes.Length; index++)
{
string byteValue = hexString.Substring(index * 2, 2);
HexAsBytes[index] = byte.Parse(byteValue, NumberStyles.HexNumber,
CultureInfo.InvariantCulture);
}
return HexAsBytes;
}