Promotic
WikipediaLinkedInYoutubeTwitterFacebook

KeyVal - saving format of named values

On many places in the PROMOTIC system it is necessary to enter multiple named values in a single text. The format described below can be used for this purpose.

The format is very similar e.g. the syntax of CSS styles in HTML pages.

 
Syntax:
Name1:Value1;Name2:Value2; ...

For example: "Temperature:85;Pressure:1013.85;Name:Boiler1;"

 
- Name: Represents value identifier.

This is a system name, so it must contain only alphanumeric and must not contain any diacritics, empty string, spaces and the first character must not be a number.

- Value: Follows after colon (:).
- If the value is a real number with decimal point then the decimal separator must be a period.
- The value may contain character colon.
- The value must not contain:
- Char semicolon (";"). Must be replaced by two characters: backslash and s ("\s")
- Char NewLine (0A hexa). Must be replaced by two characters: backslash and n ("\n")
- Char CarriageReturn (0D hexa). Must be replaced by two characters: backslash and r ("\r")
- Char backslash ("\"). Must be replaced by two characters: 2x backslash ("\\")
- Char left curly bracket ("{"). Must be replaced by two characters: backslash and o ("\o")
- Char pravá curly bracket ("{"). Must be replaced by two characters: backslash and c ("\c")
- If the value starts with the "left curly bracket" character then it must be finished with the "pravá curly bracket" character.

This means that the value is compound and there is a text in KeyVal format inside the brackets.

Example:

"Temperature:85;Parameters:{p1:56;p2:64};"

- The value may contain empty characters at the beginning and at the end (spaces, tabulators) and these characters are considered to be valid.

It means that, for example, when saving a PmMap object (by the mapSaveToString method) the value of the property will contain saved text including these empty characters (at the beginning or at the end).


This format can be used, e.g., for the following purposes:
- in the "Pma object parameters" configurator.
- In the Pm.CreateView method, in the sView and sFrame parameters.
- In the PmMap object, in mapSaveToString and mapLoadFromString methods.
- In the PmaAlarmGroup object, in the "Sound parameters" configurator.
- etc.

History:
Pm8.03.13: Created
PROMOTIC 9.0.13 SCADA system documentation - MICROSYS, spol. s r.o.

Send page remarkContact responsible person
© MICROSYS, spol. s r. o.Tavičská 845/21 703 00 Ostrava-Vítkovice