AIDA MsgID Component

The MsgID component extracts the source id from the telegram data or copies it into the telegram data respectively.

Several parameters marked with an unique number ('XXX') together form a filter rule. The parameters used to specify a filter code or filter mask are split into a low and a high part, since IDs are 64 bit wide.
Events meeting the following condition are considered as matching a filter rule:

  (FilterCode & FilterMask) == (<special telegram part> & FilterMask)

For all received messages matching a filter rule, the message id is extracted from the telegram data (AIDA_tstEvent.unEventData.stData.pvData) and saved in AIDA_tstEvent.unEventData.stData.stSrcID and flag AIDA_nSrcIDValid is set.

For all transmitted messages matching a filter rule, which have the AIDA_nSrcIDValid flag set, the message id is copied from AIDA_tstEvent.unEventData.stData.stSrcID into the telegram data (AIDA_tstEvent.unEventData.stData.pvData) .

E.g. to process/treat all messages with service identifier (SI) $80 in the 2nd byte and the message id (MsgID) in the 3rd byte, use the following settings:

  MsgIDPos = 3, MsgIDWidth = 1,
  FilterPos = 2, FilterWidth = 2, FilterCodeLow000 = $00008000, FilterMaskLow000 = $0000FF00

  (FilterCode & FilterMask) == (<special telegram part> & FilterMask)
  ( $00008000 &  $0000FF00) == (         $xxXX          &  $0000FF00)

A common stack configuration using the MsgID component (for usage with AIDA Communicator or Tracer) looks like this:

  Level    Stack Component
    1         Filter
    2         MsgID
    3         Checksum
    4         Packer
    5         COM

Parameters

Timeout
Specifies how long the component waits for the component below to finish the transmission. Units used are ms.
FilterPos
Position of the special telegram part the filter code(s) should be compared with.
Numbering starts with 1; value = 0 means, that there is no message id information in the telegram.
FilterWidth
Length (in bytes) of the special telegram part the filter code(s) should be compared with.
MsgIDPos
Position of the message id information in the telegram.
Numbering starts with 1.
Usually it is valid that (MsgIDPos > FilterPos) && (MsgIDPos + MsgIDWidth <= FilterPos + FilterWidth).
MsgIDWidth
Length (in bytes) of the message id information in the telegram.
Usually it is valid that (MsgIDPos > FilterPos) && (MsgIDPos + MsgIDWidth <= FilterPos + FilterWidth).
MaxRuleSets (read-only)
The maximum number of filter rules this component can handle.
For the current version only 1 rule set is supported.
FilterCodeLowXXX
The lower 32 bits of the filter code the special telegram part should be compared with.
FilterMaskLowXXX
The lower 32 bits of the filter mask. The bitmask specifies which parts of the special telegram part to compare with the filter code.
FilterCodeHighXXX
The higher 32 bits of the filter code the special telegram part should be compared with.
FilterMaskHighXXX
The higher 32 bits of the filter mask. The bitmask specifies which parts of the special telegram part to compare with the filter code.

See Also

AIDA Overview, list of AIDA components