Return Values

The SIGNAL_CHANGE, TIMER and EACH_BYTE code blocks must return one of the following values. Other blocks do not return anything. In the following descriptions, SOF means Start-Of-Frame and EOF means End-Of-Frame.

Return Values

eBrokenFrame

Frame is broken (usually means the end of the frame didn't appear when we expected it to). A broken frame marker is inserted into the capture following the current event.

eContinue

No change. (No SOF or EOF is inserted into the capture for the current event.)

eInsertEofAfter

Insert EOF after this event.

eInsertOtherSideEofBefore

Insert EOF into other stream before this event.

eInsertSofBefore

Insert SOF before this event.

eInsertSofAfter

Insert SOF after this event.

eInsertThisSideEofBefore

Insert EOF before this event.

eNewFrameEndOtherSide

Insert EOF for the other side and SOF for the current side.

eNewFrameEndThisSide

Insert EOF and SOF for this side before this event.

eSingleByteFrame

Insert SOF for this side before this event and EOF for this side after this event. Used for frames that consist of a single byte.

These values are defined as an enumeration called eRecognizerResult. Thus, should you want to declare a local variable to hold the result your code is going to return, you would do so with a statement such as:

eRecognizerResult eResult = eContinue;

Some of the most common return types have been enumerated for you. If you need to return something not in the list above, see Appendix 4 for information on how to create a custom return value.

You might wonder about the significance of the "before" in eInsertOtherSideEofBefore. If the EOF is being inserted for the other stream why would it matter if it comes before or after the current event? The answer is that, in situations where this code is used, frames alternate (which is why an event on one side can imply an EOF on the other) and putting the EOF before the current event serves to group it with the frame data from that other side and make for a more appropriate ordering as seen in the Event Pane.