You are here: Elements > Frame Recognizers > Handling Signal-Change Events

Handling Signal-Change Events

The interpretation of signal changes depends totally on the type of communication line that the capture came from. In the case of an RS-232 line, a signal change is inserted to mark each transition of a modem-control signal (DTR, DSR, RTS, CTS, CD, etc.). For Ethernet there are no signal changes. Because they are not universal, no symbols for identifying RS-232 signals are provided.

Parameter 1 is for side A and is an 8 digit hex number. The first 4 digits determine the Start of Frame signal and value. The second 4 digits determine the End of Frame value. The top most bit of each 4 digit number is used to specify the on or off state to watch for. The values for the control signals are as follows:

RTS 0x01
CTS 0x02
DSR 0x04
DTR 0x08
CD 0x10
RI 0x20

Therefore if you want RTS to control side A as on=SOF and off=EOF, parameter

1 should be set to 0x80010001. Following this logic, side B controlled by DSR would require parameter 2 to be set to 0x80080008 yielding the following statement in your decoder:

RECOGNIZER (SignalChange 0x80010001 0x80040004) Note that one could combine the above signal values. For example to watch for either RTS or CTS use the value of 3 as follows:

(SignalChange 0x80030003,...) Notice that the binary 0x01 and 0x02 have been OR'ed. (0001 OR 0010 = 0011 = 0x03.)

Because the encodings can change, the only way to be really sure what the encoding currently is for a signal change event is to start the protocol analyzer, open the Set I/O Configuration window and click the Names button. The signal changes will be listed in this window in order, where the top item is the low bit. For example, the signal changes in the Names window are listed in the same order as the list above.

Here is an example:

@SIGNAL_CHANGE

if (iNdrf & 0x01) // Is the first signal on?

{

iState = STATE_NOT_IN_FRAME;

return eInsertThisSideEofBefore;