Capture Settings, Records

Top  Previous  Next

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

 

cm5-3set-recs

 

Line or Record Start

This option specifies how ComCap detects a new record, which will usually be 'Anything' with any new data after the previous record end being considered the next record. This option is processed after record end is found, causing the specified control character to be removed, or any text before the start tag.

 

This option may help cleanup records with unwanted data separating them. It was primarily designed for capturing alarm printer output, where the record starts with a carriage return, and has no ending so the printer does not roll up paper, until the next line appears.  In this case set both line start and line end to Carriage Return, and set a two second Record End Timeout.

 

Anything

Used for most record capture where it is Line or Record End that really matter, and any new data after the previous end is considered next 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, which is the same as starting the next record.

Line Feed (Unix)

As above, but if only LF separates records.

CR / LF

As above, but both carriage return and line feed.

Special Character

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

Multiple Tags

Allows the start 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.

 

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. This option is very important, ComCap does not display any captured data until the line or record end has been found (or timeout, see later), so ComCap may sit there seemingly doing nothing if waiting for a CR that never arrives, for instance.

 

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 that LF and FF are ignored.

Line Feed (Unix)

This option should be used for files created by UNIX systems, which typically only have LF characters.   FF (form feed) at the end of a page is ignored.

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.

Timeout/Disconnect

Allows end of line or record by Line End Timeout (see below) or disconnection.  The same effect can be achieved by specifying a special character that is never expected.  This is intended for capturing multiple line data such as remote alarm reports, which arrive as a burst of data, separated by a gap from the next report or by serial lines dropping or TCP channel disconnecting

Blank Line

Allows end of line or record by a blank line. Multiple line non-blank records to be captured as a single long line when a blank line is reached. Specifically, Nortel telephone switches generate call data records (CDRs) comprising three lines of call data following by a blank line, and this option allows such records to be captured as a single long line making subsequent processing such as adding to SQL much easier.  Note a blank line is considered as CRLF CRLF.

CR / LF

Allows end of line for PC ASCII files with both CR and LF at the end of a line.  FF (form feed) at the end of a page is ignored. CR/LF is safer than CR alone when capturing packet type data containing non-ASCII values.

 

Note that a line also has a maximum length, as defined below, and will be ‘broken’ when it’s 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.

 

If capturing Json or XML data formats, set Multiple Tags with the tag for Json generally being '}/n' and for XML '</lasttag>', assuming that the Json record is followed by a newline, and the XML tag name is that of the opening tag.

 

Max Line Length

The Maximum Line Length may be specified up to 20,000 characters, with a default length of 2,000 characters. If the maximum is reached, the captured line is broken and wrapped to the next line.  Validate Line Length below may be used to ignore captured lines that are shorter or longer than specified limits without wrapping them.

 

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.

 

Ignore Too Many Lines, Line Time Gap

This option may be used to reduce the amount of data captured from devices sending continuous streams, such as GPS locators or environmental sensors.  A 'Line Time Gap' in fractions of a second (two decimal places) may be specified during which any new data will be ignored.  If the gap is set to 0.50 second, then only a maximum of two lines per second will be captured, or it may be one line every few seconds. The number of lines ignored are still counted and reported.  This feature may be used to slow down database updates by ignoring data arriving too fast. Note that due to Windows multi-tasking, the intervals may not be precise.

 

Ignore Duplicate Lines, Max Lines to Ignore

This option provides a means to remove excessive captured data by ignoring duplicate lines, up to a specified maximum, defaulting to 1 (max 9,999).  During capture, ComCap checks if a newly captured record or line is the same as the previous line and then ignores it, unless the maximum lines to ignore is exceeded, when the line is captured and the counter reset.  Duplicate checking is before any line processing, added text, etc.  The total number of ignored lines is totalled and appears on the status bar and Information Log, similarly to other methods for ignoring lines.  This is designed for instruments such as weigh scales or flow meters that output a continuous stream of data every second or so, even when idle.

 

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.