Capture Settings, Records

Top  Previous  Next

Capture Settings are set-up separately for each capture channels.  Once these settings have been specified, OK or Apply should be clicked.  This tab specifies General capture information.

 

cm4-set-record6

 

Line or Record End

This option specified how ComCap checks for the end off each captured line or record, so it can be displayed and captured. Identifying records is important for database capture, since one line is assumed to contain only one record.

 

Carriage Return

This is the normal line ending for PC ASCII files which normally have both CR and LF at the end of a line and CR and FF (form feed) at the end of a page.  Note the LF and FF are ignored by ComCap

Line Feed (Unix)

This option should be used for files created by UNIX systems, which typically only have LF characters

Special Character

Allows any line ending character to be specified in hex, may be used for special protocols

Packet (UDP/TCP)

This is the default for the UDP protocol where one line is sent per datagram or packet usually without any CR or LF.  Note that CR or LF in the packet will be ignored using this option.  Beware that the TCP protocol allows packets to be split or combined by routers and firewalls, so received packets may not always be identical content to those sent. 

Multiple Tags

Allows the end of a line or record to be determined by one or more short words or tags, instead of by CR or LF.  This is primarily designed to ease parsing for database capture, so that multi line data can be processed, and also for multiple records to be sent without line endings.

 

Note that a line also has a maximum length, as defined below, and will be broken when its reached if no line end character is found first.  If the display shows lines combined together, this usually means the wrong Line End is selected.  A line is also 'ended'  when a TCP session closes or capture is stopped, which may result in a partial record or line. 

 

Max Line Length

The Maximum Line Length may be specified up to 2,048 characters.  It was fixed at 255 characters in ComCap v3.  If the maximum is reached, the captured line is broken.  Validate Line Length below may be used to ignore captured lines that are shorted or longer than specified limits.

 

Line End Timeout

A Line End Timeout may now be specified in seconds, where zero means no timeout, up to 300 seconds. When the timeout expires, an incomplete captured line will be processed, saved and displayed.  This is usually only necessary when non-ASCII data is being captured where there are no carriage returns or line feeds, but may also be useful when setting up ComCap to capture from a serial port with unknown speed, since it can be used to cause display of the 'corrupted' data caused by speed mismatch which will be missing line ends.

 

Special Line Ending (hex)

If Line or Record Ending is specified as Special Character, this field specifies that character in hexadecimal notion.

 

Validate Line Length

If ticked, a minimum and maximum line lengths may be specified in characters, allowing shorter or longer lines to be ignored.  This check is done after leading and/or trailing space is removed, but before escaped text is added. It may be useful where data or transmission becomes corrupted combining two or more lines, or truncating a line, and specifically for database capture where a records of a certain length are expected.

 

Record End Tags

If Line or Record Ending is specified as Multiple Tags, one or more short words or tags may be specified in a list, one line per tag. If these records have

unwanted preceding or following tags, these may also be set as record endings and then filtered by phrases or minimum line length.  For instance, the following data was sent by ComGen without any line endings:

 

<TEST>

<xml XML Packet from ComGen Id 8 on PC09 at 2009/10/14-00:15:54:334 />

<xml XML Packet from ComGen Id 8 on PC09 at 2009/10/14-00:16:24:334 />

<xml XML Packet from ComGen Id 8 on PC09 at 2009/10/14-00:16:54:334 />

 

so setting the Record End Tags as <TEST> and /> causes ComCap to break the records so they may be filtered or captured to a database sensibly, in this case with the minimum line length validated to remove the device id on the first line. 

 

Record End Tags may include escaped characters similarly to 'Add Escaped Text', specifically \n new line, \c CR, \l LF, \\ backslash and \s space, so text only at the end of a line can be specified as a tag.