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
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.
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.
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.
|