SUPPRES_DETAIL Syntax

A SUPPRESS_DETAIL keyword is used in place of the label.

By combining these two keywords on the same field, we can decode it without displaying the results and without moving the pointer. We can then use the value in the field to determine whether to label it a Command or a Response and display the proper string from the Commands table.

When we decode an already decoded field in a new way, we are obliged to give it a new name, command, or response in this case.

Here's how it looks:

FIELD command_or_response (Fixed 1 Byte) (Hex) SUPPRESS_DETAIL NO_MOVE

FIELD command (Fixed 1 Byte) IF (FieldIsBetween 0x00 0x02 command_or_response) (TABLE tableCommands) IN_SUMMARY "Command/Response" 0 "Command"

GROUP response_group IF (FieldIsBetween 0x80 0x82 command_or_response)

{

FIELD response (Fixed 1) (TABLE tableCommands) IN_SUMMARY "Command/Response" 0 "Response"

FIELD response_count (Fixed 1) (Decimal) "Data byte count" VERIFY (FieldIsBetween 1 3)

}

BRANCH (FromTable tableCommands command_or_response)

FIELD checksum (Fixed 1 Byte) (Hex) IN_SUMMARY "C'sum" 40 "Checksum" VERIFY (FPChecksum)

END_MAIN_PATH

Responses have the additional response_count field giving the number of data bytes in the response. We created a response_group to join together the response and response_count fields and put the conditional on the group.