G
Guest
I am monitoring some electronic equipment. Every few seconds i poll for
equipment status. The results are returned in 6 groups - like 0A 40 08 00 00
00. Currently only the first 3 bytes contain meaningful info
each bit reports either normal operation (a 0) or an error condition (a 1)
for a component of the equipment.
I set up <flag> Enum for each byte (just the first 3 bytes for now)
Enum Byte1
None=0
component1=1
component2 =2
component3 = 4
.... to 128
end enum
Enum Byte2
None=0
component1=1
component2 =2
component3 = 4
.... to 128
end enum
i need a routine that will quickly anaylyze and let me test the status of
each flag.
Thanks.
equipment status. The results are returned in 6 groups - like 0A 40 08 00 00
00. Currently only the first 3 bytes contain meaningful info
each bit reports either normal operation (a 0) or an error condition (a 1)
for a component of the equipment.
I set up <flag> Enum for each byte (just the first 3 bytes for now)
Enum Byte1
None=0
component1=1
component2 =2
component3 = 4
.... to 128
end enum
Enum Byte2
None=0
component1=1
component2 =2
component3 = 4
.... to 128
end enum
i need a routine that will quickly anaylyze and let me test the status of
each flag.
Thanks.