Method Input Definitions

#define abFieldHasData(field) is a macro that indicates whether or not the data for the given field is present in the ai64Field array. It is implemented as a macro for convenience but may be treated as if it were defined as a Boolean array (as implied by its Hungarian prefix).


const UCHAR * const abytLayer is a byte array that holds the undecoded data for the current layer. Thus abytLayer[0] is the first byte of the layer and so on.


const Aint64& ai64Field is an array of field values for the current layer. This allows you to read the value for a given field if you know that field's index and provided, of course, that that field has already been decoded. For a field with index i, if abFieldHasData[i] holds true then ai64Field[i] holds the value for the field; otherwise the value is wider than 64 bits and must be extracted directly from abytLayer. Note that the only reliable way to get a field's index is to pass the field in as a parameter.


const Aint& aisizbitField is an array that holds the size of each decoded field in the current layer. As always this is the size in bits. It is indexed in the same way as ai64Field.


const bool bCurrentFieldHasData holds true if the value of the current field is contained in the i64CurrentField and false otherwise. As noted elsewhere, the value of a field is extracted into i64CurrentField only when its size is 64 bits or less; if it is wider than 64 bits then any method that needs the value must retrieve it from abytLayer. bCurrentFieldHasData is the same as (isizbitCurrentField <=64), but it's better to use bCurrentFieldHasData because the definition of whether the current field has data may change in future versions.


const bool bHostDataOrder contains true if the bytes of the current field are designated as being in host data- order and false if they are in network data-order. Note that this value is relevant only to multi-byte fields in the abytLayer array; any value in i64CurrentField and ai64Field has already been normalized.


const bool bIsSummary is available only to Format Methods. It holds true if the method is being called to produce output for the Summary Pane and false for the Decode Pane.


const bool bNot is available only to Verify Methods. It holds true if and only if there is a "NOT" in the verify clause. (You may wonder why bNot does not apply to Boolean Methods as well since any call to a Boolean Method can be prefixed by a NOT. The answer is that a NOT in the Boolean context is handled behind the scenes; in other words, the protocol analyzer internally complements the output of a Boolean Method when that is appropriate. A Verify Method, by contrast, needs to know if a NOT is present because, when the test fails, it is supposed to generate a string for display in the Decode Pane noting what the result should have been.)


const int64 i64CurrentField holds the value retrieved for the current field if that value is 64 bits or less in size. The boolean bCurrentFieldHasData can be used to check whether i64CurrentField contains the field value or not. If it does not then any method that needs the value must extract it from the abytLayer array.


int64 i64FieldValue holds the value that is propagated through a series of Retrieval Methods. It is both an input and an output. The iFieldSize value indicates its size.


const int iDrf contains meta-information about the frame that was not transmitted but collected by Frontline hardware and firmware. The meaning of these bits varies by analyzer and is subject to change. Consult with Teledyne technical support.


int iFieldSize holds the size of i64FieldValue as it is propagated through a series of Retrieval Methods. It is both an input and an output.


const int ifrmofsbitLayerEnd contains the offset within the frame of the last bit of the current layer. This offset does not take account of any truncation (see Truncated Frame).


const int ifrmofsbitLayerStart holds the bit offset of the current layer within the frame. Since every layer is constrained to starting on a byte boundary, the value in ifrmofsbitLayerStart always equals (ifrmofsbytLayerStart * 8).


const int ifrmofsbytLayerStart holds the byte offset of the current layer within the frame.


const int iofsbitCurrentPosition is the bit offset of the working position in the layer. This offset corresponds to "the pointer" that we described in the chapter on DecoderScript. (We do not call it a pointer here because it is not a pointer in the sense of C but it does effectively point to the current bit.) This value differs from iofsbitCurrentField in certain subtle but important ways. At times their values are the same but at the end of the processing of a FIELD statement, for example, iofsbitCurrentPosition is updated according to the size of the field and the presence or absence of a NO_MOVE.


This value is used mostly in StartBit Methods, the output of which serve directly to update iofsbitCurrentPosition.


const int iofsbitCurrentField holds the bit offset of the start of the current field.


#define iofsbitFieldStart() provides the bit offset of each decoded field. You might expect this to be an integer array but it is actually implemented as a macro for internal convenience. You can use iofsbitFieldStart much like an array with a field index; just remember to use round instead of square brackets.


const int iofsbytCurrentPosition holds the offset of the byte corresponding to iofsbitCurrentPosition.


const int inbytAvailableLayer contains the number of data bytes that have been stored for the current layer. For a more thorough explanation, see Truncated Frame.


const int inbytFullLayer holds the original full length, in bytes, of the current protocol layer. This may differ from the available length as explained in Truncated Frame.


const int inbytLeftInAvailableLayer holds the number of bytes stored for the current layer from the current position. If the current field starts on a byte boundary then the count includes that byte; otherwise it starts at the next byte. inbytLeftInAvailableLayer may differ from inbytLeftInFullLayer for reasons explained in Truncated Frame.


const int inbytLeftInFullLayer holds the number of bytes in the current layer from the current position. If the current field starts on a byte boundary then the count includes that byte; otherwise it starts at the next byte. For reasons explained in Truncated Frame. inbytLeftInFullLayer may differ from inbytLeftInAvailableLayer.


const int inbytTruncated holds the number of bytes truncated in the current layer. Most often this is zero but see the discussion under Truncated Frame.


const int isizbitCurrentField contains the size of the current field, that is the value returned by the Size Method for the field. As ever, this is the size in bits.


const int iStream holds the index of the current data stream. The first stream is numbered 0, the second 1, and so on. The protocol analyzer has the potential to support multiple streams.

As of this writing, streams have the following values:

  • Bluetooth® BR/EDR: 0 = Peripheral and 1 = Central

  • Serial: 0 = DTE and 1 = DCE

  • Industrial protocols: Single Stream (0)

  • Ethernet: Single Stream (0)

  • USB: Outframe = 0 (host→ device) and Inframe = 1 (device → host)


const int64 evnFrameNumber holds the frame number of the frame currently being decoded.