Frame Recognizers Included with Protocol Analyzer
Frame Recognizers are not exactly methods, but they are necessary components for some decoders. The protocol analyzer includes some standard frame recognizers that may serve your needs. To invoke a frame recognizer for a protocol, put the following statement in the Reference section of your decoder (the section after the decoder ID and before the DECODE keyword):
RECOGNIZER (Recognizer Name)
Following are some recognizers included with the protocol analyzer and how they determine the beginning and end of frames.
In the Signal Change recognizer, which signal to look for and whether to look for it going on or off is encoded in 16 bits. The highest bit determines whether to look for the signal going on or off. 1=on, 0=off. The bits for the signals are:
RTS | 0x01 |
CTS | 0x02 |
DSR | 0x04 |
DTR | 0x08 |
CD | 0x10 |
RI | 0x20 |
You can set the recognizer to look for more than one signal, though all signals to watch for must go either on or off. In other words, you can't look for RTS going high and CTS going low as the start of a frame.
For example, to start a frame when RTS goes on and end it when CTS and DSR go off, use the following:
RECOGNIZER (SignalChange 0x80010006 0x80010006
1000 | (SOF when the following goes high) |
0001 | (RTS is the only signal to pay attention to) |
0000 | (EOF when the following goes low) |
0110 | (pay attention to CTS and DSR). |
You have to give the number twice because the first number is for channel A and the second for channel B, where the channels are often DTE and DCE in an asynchronous circuit..