RS-232C
RJ-45
CheckSum RS232C
Code
commande
préfixe #0
Définir
0xCC
alimentation
Nous pouvons calculer le CheckSum avec l'entête (5 octets) et les instructions (4 octets).
Par exemple :
(0xCC) XOR (0x33) XOR (0x01 = Set ID) XOR (0x00) XOR (0x04) XOR (0x10) XOR (0x01 =
ON) XOR (0x00) XOR (0x00) = 0xEB
* Liste complète de commandes RS-232C / RJ-45 disponible sur
demande.
QuadHD84-P
020-000847-01 Rev. 1 (01-2016)
Contrôler plusieurs produits
Entête (5 octets)
Définir
Code
Type
préfixe #1
ID
d'instruction
0x33
0
(Code préfixe#0) XOR (Code préfixe#1) XOR (Définir ID) XOR (Type de commande) XOR
(# d'octets d'instructions) XOR (Commande) XOR (donnée #0) XOR (donnée #1) XOR
(donnée#2) = CheckSum
Instructions (4 octets)
# d'octets
Commande donnée #0 donnée #1 donnée #2
d'instructions
0x10
"0 : Éteint 1 :
4
A2
réservé
réservé
(0x00)
(0x00)
Allumé"
Checksum
(1 octet)
CS #0
Instruction
XOR entête