Patrotest Wiki

Trace:

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
reporting_engine:reporting_engine_customizable_table_for_user_data_input [2019/02/22 14:49]
admin [Number formatting]
reporting_engine:reporting_engine_customizable_table_for_user_data_input [2019/03/05 06:45] (current)
yasko [Endnotes]
Line 1: Line 1:
 =====Customizable Table===== =====Customizable Table=====
  
-The Customizable Table allows ​the user to configure the fields required for the protocol. For example, to describe a DUT or a customer. ​It is often necessary to add new fields to the software without recompiling.\\+The Customizable Table allows ​users to configure the fields required for the protocol, for example, to describe a DUT or a customer. ​Also, it is often necessary to add new fields to the software without recompiling. 
 +\\ 
 {{:​reporting_engine:​dut_info_page.png}} {{:​reporting_engine:​dut_info_page.png}}
 +\\
  
-The Customizable Table supports various types of data: numberdatestringlistbox, boolean. +\\ 
-You can edit the table using the built-in text editor.\\+ 
 +The Customizable Table supports various types of data: numbersdatesstringslist boxes, boolean ​values, etc. You can edit the table using the built-in text editor. 
 +\\
 {{:​reporting_engine:​dut_info_settings_editor.png?​1000}} {{:​reporting_engine:​dut_info_settings_editor.png?​1000}}
 +\\
  
-====Syntax of the Customizable Table configuration file====+\\
  
-The table configuration is specified in text file.  +====Syntax of the Customizable Table Configuration File==== 
-Each New Line in the file represents a new entry in the table. + 
-Each line should contain four columns: +The table configuration is specified in the corresponding ​text file. Each new line in the file represents a new entry in the table. Each line should contain ​the following ​four columns: 
-  * Name - The name is used to refer to the user interface +  * Name - The name is used to refer to the user interface 
-  * Alias - Alias is used to import data to the report +  * Alias - Alias is used to import data into the report 
-  * Type - Indicates the type of data. Available data types: ​stringnumber, list box, checkbox+  * Type - Indicates the type of data. Available data types: ​stringsnumbers, list boxes, checkbox, etc.;
   * Format - Defines the format of the value.   * Format - Defines the format of the value.
  
 +\\
 An individual field must be enclosed in quotes ("). Each field is delimited by a semicolon ";"​. \\  An individual field must be enclosed in quotes ("). Each field is delimited by a semicolon ";"​. \\ 
-If you need to use the semicolon in the field, ​precede it with a backslash "​\;"​\\ +If you need to use the semicolon in the field, ​put a backslash ​before it "​\;"​\\ 
-# - denotes ​comments.+"#" ​is used for making ​comments. 
 +\\
  
-====Config File example====+====Config File Example====
  
 <​code>​ <​code>​
Line 48: Line 56:
 </​code>​ </​code>​
  
-==== Number ​formatting ​====+==== Number ​Formatting ​====
  
-Number formats can be classified ​into two categories:​\\  +Number formats can be divided ​into two categories:​\\  
-  * Standard formats - common formats which have short codes for easier use\\  +  * Standard formats - common formats which have short codes for easier use;\\  
-  * Custom formats - codes which allow for greater customizability, including custom suffixes, format widths, etc.+  * Custom formats - codes that ca be customized, including custom suffixes, format widths, etc.
  
-Even with formatting, ​the numbers ​need not be entered in that particular format - they will automatically ​be converted to the appropriate format.+Even with formatting, numbers ​do not need to be entered in that particular format - they will be automatically ​converted to the appropriate format. 
 +\\
  
-=== Standard ​formats ​===+=== Standard ​Formats ​===
  
-These are taken from formatting strings for .NET platform. They always follow the format of one letter (specifying the format), followed by 0-2 decimal digits specifying the width. If no width is specified, ​default is used. +These are taken from the formatting strings for .NET platform. They always follow the format of one letter (specifying the format), followed by 0-2 decimal digits specifying the width. If no width is specified, ​the default ​one is used. 
  
 ^Specifier Character ^Name ^Description ^ ^Specifier Character ^Name ^Description ^
Line 64: Line 73:
 |“F” or “f”|Fixed point|Result:​ Integral and decimal digits with optional negative sign.\\ Width specifier: Number of decimal digits.\\ Default width specifier: Locale-specific| |“F” or “f”|Fixed point|Result:​ Integral and decimal digits with optional negative sign.\\ Width specifier: Number of decimal digits.\\ Default width specifier: Locale-specific|
 |“N” or “n”|Numeric|Result:​ Integral and decimal digits, group separators, and a decimal separator with optional negative sign\\ Width specifier: Desired number of decimal places\\ Default width specifier: Locale-specific| |“N” or “n”|Numeric|Result:​ Integral and decimal digits, group separators, and a decimal separator with optional negative sign\\ Width specifier: Desired number of decimal places\\ Default width specifier: Locale-specific|
 +\\
  
 == The Exponential ("​E"​) Format Specifier == == The Exponential ("​E"​) Format Specifier ==
Line 72: Line 82:
 The following properties depend on the culture / locale of the machine:\\ The following properties depend on the culture / locale of the machine:\\
   * Decimal separator   * Decimal separator
 +\\
  
 Examples of formatting the value using the “en-US” locale:\\ Examples of formatting the value using the “en-US” locale:\\
-  * 15.0127 using “E” format → 1.501270E+001\\ +  * 15.0127 using “E” format → 1.501270E+001; 
-  * 15.0127 using “E4” format → 1.5013E+001\\ +  * 15.0127 using “E4” format → 1.5013E+001; 
-  * 15.0127 using “e10” format → 1.5012700000e+001\\ +  * 15.0127 using “e10” format → 1.5012700000e+001; 
-  * 15.0127 using “E” format (“fr-FR” locale) → 1,​501270E+001\\+  * 15.0127 using “E” format (“fr-FR” locale) → 1,​501270E+001
 +\\
  
 == The Fixed Point ("​F"​) Format Specifier == == The Fixed Point ("​F"​) Format Specifier ==
Line 86: Line 98:
  
 The following properties depend on the culture / locale of the machine:\\ The following properties depend on the culture / locale of the machine:\\
-  * Decimal separator\\ +  * Decimal separator; 
-  * Number of decimal digits (if not explicitly stated in the format)\\+  * Number of decimal digits (if not explicitly stated in the format)
 +\\
  
 Examples of formatting the value, using the “en-US” locale:\\ Examples of formatting the value, using the “en-US” locale:\\
-  * 15.0127 using “F” format → 15.01\\ +  * 15.0127 using “F” format → 15.01; 
-  * 15.0127 using “F3” format → 15.013\\ +  * 15.0127 using “F3” format → 15.013; 
-  * 15.0127 using “F6” format → 15.012700\\ +  * 15.0127 using “F6” format → 15.012700; 
-  * 15.0127 using “F0” format → 15\\ +  * 15.0127 using “F0” format → 15; 
-  * 15.0127 using “F” format (“fr-FR” locale) → 15,01\\+  * 15.0127 using “F” format (“fr-FR” locale) → 15,01
 +\\
  
 == The Numeric ("​N"​) Format Specifier == == The Numeric ("​N"​) Format Specifier ==
Line 101: Line 115:
  
 The following properties depend on the culture / locale of the machine:\\ The following properties depend on the culture / locale of the machine:\\
-  * Decimal separator\\ +  * Decimal separator; 
-  * Group separator\\ +  * Group separator; 
-  * Number of digits per group\\ +  * Number of digits per group; 
-  * Number of decimal digits (if not explicitly stated in the format)\\+  * Number of decimal digits (if not explicitly stated in the format)
 +\\
  
 Examples of formatting the value, by default using the en-US locale:\\ Examples of formatting the value, by default using the en-US locale:\\
-  * 15617.0127 using “N” format → 15,617.01\\ +  * 15617.0127 using “N” format → 15,617.01; 
-  * 15617.0127 using “N3” format → 15,617.013\\ +  * 15617.0127 using “N3” format → 15,617.013; 
-  * 15617.0127 using “N6” format → 15,​617.012700\\ +  * 15617.0127 using “N6” format → 15,​617.012700; 
-  * 15617.0127 using “N0” format → 15,617\\ +  * 15617.0127 using “N0” format → 15,617; 
-  * 15617.0127 using “N” format (“sv-SE” locale) → 15 617,01\\+  * 15617.0127 using “N” format (“sv-SE” locale) → 15 617,01
 +\\
  
 === Custom formats === === Custom formats ===
Line 117: Line 133:
 Custom formats can be used if additional customization is necessary. A custom format consists of the numeric part, which specifies how the number itself is formatted, and the optional prefix and suffix, which specify the text to precede or follow the number. The numeric part consists of:\\  Custom formats can be used if additional customization is necessary. A custom format consists of the numeric part, which specifies how the number itself is formatted, and the optional prefix and suffix, which specify the text to precede or follow the number. The numeric part consists of:\\ 
  
-  * Digits ​0 - denotes a digit of the number. If the number ​would not have a digit at that place, it will be padded with a zero.\\  +  * Digit 0 - denotes a digit of the number. If the number ​does not have a digit at that place, it will be padded with a zero; 
-  * Unordered List ItemCharacters ​# - denotes a digit of the number. If the number ​would not have a digit at that place, it would be skipped ​instead.\\ ​ +  * Unordered List ItemCharacter "#" ​- denotes a digit of the number. If the number ​does not have a digit at that place, it is skipped 
-  * Character . - denotes the decimal point in the number. If there is no decimal point in the format, number ​will be rounded. The decimal point will not be printed if no digits ​would be written after it. The actual character of the printed decimal point is dependant on the locale. The number of 0 and # characters on the right of the decimal point specify minimal and maximal ​number ​of decimal places. The number of 0 characters on the left of the decimal point specify the minimal number of integral digits. The number of # characters on the left is irrelevant, since number will never have its integral digits removed.\\  +  * Character ​"." (dot) - denotes the decimal point in the number. If there is no decimal point in the format, ​the number ​is rounded. The decimal point is not printed if no digits ​are written after it. The actual character of the printed decimal point is dependant on the locale. The number of "0" ​and "#" ​characters on the right of the decimal point specify minimal and maximal ​numbers ​of the decimal places. The number of "0" ​characters on the left of the decimal point specify the minimal number of integral digits. The number of "#" ​characters on the left is irrelevant, since number will never have its integral digits removed; 
-  * Character , - denotes a number group separator. The presence of this character signifies that the number should be divided into groups for easier reading. The actual sizes of the group and the group separator character is dependant on the locale (usually it is every three digits)\\  +  * Character ​"," ​- denotes a number group separator. The presence of this character signifies that the number should be divided into groups for easier reading. The actual sizes of the group and the group separator character is dependant on the locale (usually it is every third digit); 
-Note: this character must not be the last character before the decimal point (e.g. ##,.0) or at the end of the numeric part if there is no decimal point (e.g. ###0,). Other than that, the position of the character has no influence on the formatting, only it’s presence in the format.\\  +Note: this character must not be the last character before the decimal point (e.g. ##,.0) or at the end of the numeric part if there is no decimal point (e.g. ###0,). Other than that, the position of the character has no influence on the formatting, only it’s presence in the format. 
-  * Characters E or e, followed by optional + or -, followed by at least one 0 digit signifies ​that the number should be presented in exponential notation. The case of the first letter signifies which case should the notation be written in. If a + sign follows the E or e, a sign of the exponent is always printed, otherwise if there is a - or no sign, the sign of the exponent will be printed ​only if it’s negative. The number of 0 characters signifies the minimum number of digits in the exponent which will be padded with zeros if needed.+  * Characters ​"E" ​or "e," ​followed by optional ​"+" ​or "-," ​followed by at least one "0" ​digit signify ​that the number should be presented in exponential notation. The case of the first letter signifies which case should the notation be written in. If a "+" ​sign follows the "E" ​or "e," ​a sign of the exponent is always printed, otherwise if there is a "-" ​or no sign, only the sign of the exponent will be printed ​(if it is negative). The number of "0" ​characters signifies the minimum number of digits in the exponent which will be padded with zeros if needed.
  
 ^Format ^Explanation ^Examples ​   ^ ^Format ^Explanation ^Examples ​   ^
Line 135: Line 151:
 \\ \\
 \\ \\
-The prefix ​and suffix ​are text inserted before and after the numeric part. All the characters should be quoted using either single-quote ' or double-quote " characters. The \ character is used to escape other characters (including quotes and backslashes) if they need to be placed inside quoted prefixes or suffixes. While the quotes are not necessary, they are needed if special characters are used in the suffix, and it is recommended to place them anyway. ​+Prefixes ​and suffixes ​are inserted ​within the text before and after the numeric part. All characters should be quoted using either single-quote ' or double-quotes ​" characters. The \ character is used to escape other characters (including quotes and backslashes) if they need to be placed inside quoted prefixes or suffixes. While the quotes are not necessary, they are needed if special characters are used in the suffix, and it is recommended to place them anyway. ​ 
 +\\
  
 Examples: Examples:
- 
   * 0.#####"​ K" will append “ K” to the formatted number (note the space inside the quotes, and no space between the number and the quotes. 12.345 → 12.345 K\\    * 0.#####"​ K" will append “ K” to the formatted number (note the space inside the quotes, and no space between the number and the quotes. 12.345 → 12.345 K\\ 
   * "​$"​0.00 will prepend the dollar sign to the formatted number. 1.234 → $1.23\\ ​   * "​$"​0.00 will prepend the dollar sign to the formatted number. 1.234 → $1.23\\ ​
   * "​±"​0.##"​ mm" the “±” sign to the number, and append “ mm”. 17.5 → ±17.5 mm\\    * "​±"​0.##"​ mm" the “±” sign to the number, and append “ mm”. 17.5 → ±17.5 mm\\ 
-Due to technical limitations,​ the prefixes and suffixes must not be misinterpretable ​as a number - the prefix must not contain digits or +/- signs; and the suffix should not start with digits or the characters ​e or E if they can be misinterpreted as a continuation of the number.+Due to technical limitations,​ the prefixes and suffixes must not be misinterpreted ​as a number - the prefix must not contain digits or "+/-" ​signs; and the suffix should not start with digits or the "e" ​or "E" characters ​if they can be misinterpreted as a continuation of the number. 
 +\\
  
-Prefixes and suffixes can be used to append measurement units to the data: For example the format of 0.0##" GHz" will append a GHz unit to the input value: 1.85 → 1.85 GHz.  +Prefixes and suffixes can be used to append measurement units to the data: For examplethe format of 0.0##" GHz" will append a GHz unit to the input value: 1.85 → 1.85 GHz.  
-Note: there is no automatic unit conversion performed: thus entering a value like “1500 MHz” will format it as “1500 GHz” ignoring the supplied units. The value entered must be in correct units.+Note: there is no automatic unit conversion performed: thusentering a value like “1500 MHz” will format it as “1500 GHz,” ignoring the supplied units. The entered ​value must be in the correct units. 
 +\\
  
 ==== Date formatting ==== ==== Date formatting ====
-Dates are formatted by arranging the individual ​datetime ​elements, and the separators in between. For example, the format dd-MM-yyyy formats the 16th of August 2018 as 16-08-2018.+Dates are formatted by arranging the individual ​DateTime ​elements, and the separators in between. For example, the format ​"dd-MM-yyyy" ​formats the 16th of August 2018 as 16-08-2018.
  
-The datetime ​elements are the following:​\\  +DateTime ​elements are the following:​\\  
-  * d - Day of the month, as either one or two digits.\\  +  * d - Day of the month, as either one or two digits 
-  * dd - Day of the month, as two digits padded with zeros\\  +  * dd - Day of the month, as two digits padded with zeros; 
-  * ddd - Abbreviated localized day of the week\\  +  * ddd - Abbreviated localized day of the week; 
-  * dddd - Full localized day of the week\\  +  * dddd - Full localized day of the week; 
-  * f...f - The fractional part of the second, rounded to as many characters as f characters (1-7)\\  +  * f...f - The fractional part of the second, rounded to as many characters as f characters (1-7); 
-  * h - The hour, using 12-hour ​clock\\ ​ +  * h - Hour, using the 12-hour ​time;  
-  * hh - The hour, using 12-hour ​clock, padded with a zero to two digits\\  +  * hh - Hour, using the 12-hour ​time, padded with a zero to two digits 
-  * H - The hour, using 24-hour ​clock\\ ​ +  * H - Hour, using the 24-hour ​time;  
-  * HH - The hour, using 24-hour ​clock, padded with a zero to two digits\\  +  * HH - Hour, using the 24-hour ​time, padded with a zero to two digits 
-  * m - The minute, from 1 to 59\\  +  * m - Minute, from 1 to 59; 
-  * mm - The minute, from 01 to 59, padded with a zero to two digits\\  +  * mm - Minute, from 01 to 59, padded with a zero to two digits 
-  * M - The month, from 1 to 12\\  +  * M - Month, from 1 to 12; 
-  * MM - The month, from 01 to 12, padded with a zero to two digits\\  +  * MM - Month, from 01 to 12, padded with a zero to two digits 
-  * MMM - Abbreviated localized name of the month\\  +  * MMM - Abbreviated localized name of the month 
-  * MM - Full localized name of the month\\  +  * MM - Full localized name of the month; 
-  * s - The second, from 1 to 59\\  +  * s - Second, from 1 to 59; 
-  * ss - The second, from 01 to 59, padded with a zero to two digits\\  +  * ss - Second, from 01 to 59, padded with a zero to two digits; 
-  * t - One letter AM/PM specifier, localized\\  +  * t - One letter AM/PM specifier, localized 
-  * tt - Full AM/PM specifier, localized\\  +  * tt - Full AM/PM specifier, localized 
-  * y - The two digit year, not padded with zeros (2008 → 8 and 2018 → 18)\\   +  * y - Two digit year, not padded with zeros (2008 → 8 and 2018 → 18)  
-  * yy - The two digit year, padded with a zero if needed (2008 → 08 and 2018 → 18) \\  +  * yy - Two digit year, padded with a zero if needed (2008 → 08 and 2018 → 18); 
-  * : - The localized ​time part separator\\  +  * : - Localized ​time part separator; 
-  * / - The localized ​date part separator\\  +  * / - Localized ​date part separator 
-  * ' and " - Used for quoting special characters\\  +  * ' and " - Used for quoting special characters 
-  * \ - Used for escaping the special meaning of the next character\\ +  * \ - Used for escaping the special meaning of the next character
  
-Other alphabetic characters should not be used. All other characters will be copied to the output verbatim and used as separators. Note: to use : and / without localization,​ quote them using ' ​or ".+Other alphabetic characters should not be used. All other characters will be copied to the output verbatim and used as separators. Note: to use ":" ​and "/" ​without localization,​ quote them using single ​or double quotes.
  
 Examples:​\\ ​ Examples:​\\ ​
-  * yyyy-MM-dd HH':'​mm':'​ss → 2018-08-16 20:47:13\\  +  * yyyy-MM-dd HH':'​mm':'​ss → 2018-08-16 20:47:13; 
-  * dd/MM/yyyy → 16/08/2018\\  +  * dd/MM/yyyy → 16/08/2018; 
-  * HH':'​mm → 20:47\\  +  * HH':'​mm → 20:47; 
-  * hh':'​mm tt → 08:47 PM\\ +  * hh':'​mm tt → 08:47 PM
 +\\
  
 ==== Endnotes ==== ==== Endnotes ====
  
-Some parts are based on modified .NET Documentation by Microsoft available at https://​docs.microsoft.com/​en-us/​dotnet,​ released under CC BY 4.0 licence.+Some parts are based on modified .NET Documentation by Microsoftavailable at https://​docs.microsoft.com/​en-us/​dotnet,​ released under the CC BY 4.0 license.