Configurable Filters: Prefix data

 Prefix data is generated and placed at the beginning of the data read from COM port. Prefix data filter can contain static text or some of dynamically created values, such as {YEAR}, {MONTH}, {DAY}, {HOUR}, {MINUTE}, {SECOND}.


To activate this filter for all COM ports (global filter),
Select Prefix Data … menufrom Filtering Menu in CPS Terminal window. Filter cofiguration dialog will popup.

 

 
   
Image: Filter cofiguration dialog
 Image: Filter cofiguration dialog

   

Prefix data can be specified and will be automatically pre-appended to each row of data received from the communication port.
 
When specifying a single keyboard character, type that character directly into the Prefix data text box. For example, to enter the letter a as a prefix, type an "a" (without quotes) into the prefix data text box. To specify multiple characters, type the characters as a string directly into the prefix data text box.
 
For example, to enter the letters a, b, and c, as a prefix type “abc” (without quotes) into the prefix data  text box.
 
List of pre-defined Functions: (available in all log modes)       
{YEAR}, {MONTH}, {DAY}, {HOUR}, {MINUTE}, {SECOND}, {AM_PM}, {WEEKDAY}, {YEARDAY}, {DAYNAME}, {WEEK}
{HEX_DAY} {HEX_MONTH} {HEX_YEAR} {HEX_YR} {HEX_HOUR} {HEX_HOUR12} {HEX_MINUTE} {HEX_SECOND}
{ASCII_DAY} {ASCII_MONTH} {ASCII_YEAR} {ASCII_YR} {ASCII_HOUR} {ASCII_HOUR12} {ASCII_MINUTE} {ASCII_SECOND}
 
New: 
{MILSEC} // time in Milliseconds
{PCOUNTER} // port counter, increased on current port read
{SCOUNTER} // session counter, increased on any port read
 
 
List of pre-defined Keys: (valid only in keyboard logging mode)
{ENTER}{ESC}{UP}{DOWN}{LEFT}{RIGHT}
{BACKSPACE}or{BS}{HOME}{END}{PGUP}{PGDN}{TAB}{DEL}or{DELETE}
{INS}or{INSERT}{WIN}{PRTSC}(CAPSLOCK}{NUMLOCK}{SCROLLLOCK}{HELP}
{F1}-{F16}   
 
To specify commands or keys combined with any combination of the Shift, Control and Alt keys, precede the regular character with one or more of the following codes:
 
Key
Code
Shift
+
Control
^
Alt
%
 
 
Examples:
> ^%({DEL}{DEL}) would be Ctrl-Alt-Del twice
> To send these special characters {+^%~( as plain characters enclose them in braces example: {{} would just send {
> To send a key multiple times, enclose it in braces with a number like {h 3} or {DEL 12} - this would send the DELETE key 12 times
 
 
To enter the current time followed by ENTER use {HOUR}:{MINUTE}:{SECOND}{ENTER}
To enter the equivalent of the F12 key, enter {F12}
 
IMPORTANT: Pre-defined Keys and pre-defined Functions must be enclosed inside curly brackets and must be typed in upper case.
 
 

It is possible to insert any character(s) by entering the relevant ASCII code inside curly brackets.

Example:

Character A can be entered as the character “A” or as the ASCII code enclosed inside curly brackets {65}.

Horisontal tabulator can be added as the ASCII code enclosed inside curly brackets {9}.

Link: ASCII Table - Standard and Extended ASCII Table