Settings Rules
Explanation of Wildcards for Device Settings
Wildcards are coming inside square ([]) or angle (<>) brackets. All other symbols has to be preserved as is. If the symbol of bracket has to be preserved it will be introduced like that: {[} or {<}. In the table below the word explanation can mean any text. The value in the parantheses states the default value.
Rules for the description string
The 4th argument of LoadConfigKey(_ini, key, default, description) is the user-facing help string. Follow these rules so descriptions stay machine-parseable and consistent across drivers:
- Describe the value FORMAT, not what the key does. The key name already conveys the purpose; the description tells the user what kind of value is accepted.
- Use the wildcards from the table below. Wrap the value pattern in
[...]for tokens with format, or<...>for free strings. - Alternatives inside
[...]are separated by|(not/). The default alternative is wrapped in parentheses, e.g.[NV|NVPro|(Auto)]. /may still appear inside[...]as a unit denominator (e.g.<a[G/V], b[G]>,[G/cm/A]) since|is the alternative separator.- Numeric with unit:
[fu name unit (default)], e.g.[fu power dBm (20 dBm)]. Unitless:[f name (default)]or[n count (3)]. - The default value is duplicated — once in the 2nd argument of
LoadConfigKey, once inside the(...)in the description. Keep them in sync. - Prose hints come BEFORE the wildcard, not after:
"calibration B=a*I+b <a[G/V], b[G]>"is fine;"[fu dBm] RF source output power"is not.
Wildcard |
Description |
Example |
| [n explanation (3)] | Any integer number, 3 is default. | [n] can be -5, 4 etc. |
| [x explanation (3)] | Any hexadecimal number, 3 is default. | [x] can be 10, 1f etc. |
| [n0 explanation] | Consequent integer numbers started from 0. | init[n0] can be init0, init1 etc. |
| [f explanation (3.0)] | Any float number, 3.0 is default. | [f] can be -5.0, 4.0 etc. |
| [fu explanation (3.0 dB)] | Any float number with unit, 3.0 dB is default. | [fu] can be -5.0 dB, 4.0 dB etc. |
| [a|b|c|(d)] | Any string out of 'a', 'b', 'c', 'd'. Default value is 'd'. | [w|r|(rw)] can be rw or w or r |
| <some string> | Any string. | <device name> can be DG |

