Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
ConfigParameter Class Reference
Public Member Functions | |
| def | __init__ |
| def | get_full_name |
| def | get_display_name |
| def | sanitize |
| def | set_value |
| def | __str__ |
| def | get_verbose_description |
Detailed Description
This class keeps information about a single configuration parameter
Definition at line 93 of file tools/config/__init__.py.
Constructor & Destructor Documentation
| def __init__ | ( | self, | |
| name, | |||
| data, | |||
| unit_name, | |||
| unit_kind | |||
| ) |
Construct a ConfigParameter
Positional arguments:
name - the name of the configuration parameter
data - the data associated with the configuration parameter
unit_name - the unit (target/library/application) that defines this
parameter
unit_ kind - the kind of the unit ("target", "library" or "application")
Definition at line 96 of file tools/config/__init__.py.
Member Function Documentation
| def __str__ | ( | self ) |
Return the string representation of this configuration parameter Arguments: None
Definition at line 213 of file tools/config/__init__.py.
| def get_display_name | ( | unit_name, | |
| unit_kind, | |||
label = None |
|||
| ) |
Return the name displayed for a unit when interrogating the origin
and the last set place of a parameter
Positional arguments:
unit_name - the unit (target/library/application) that defines this
parameter
unit_kind - the kind of the unit ("target", "library" or "application")
Keyword arguments:
label - the name of the label in the 'target_config_overrides' section
Definition at line 166 of file tools/config/__init__.py.
| def get_full_name | ( | name, | |
| unit_name, | |||
| unit_kind, | |||
label = None, |
|||
allow_prefix = True |
|||
| ) |
Return the full (prefixed) name of a parameter. If the parameter
already has a prefix, check if it is valid
Positional arguments:
name - the simple (unqualified) name of the parameter
unit_name - the unit (target/library/application) that defines this
parameter
unit_kind - the kind of the unit ("target", "library" or "application")
Keyword arguments:
label - the name of the label in the 'target_config_overrides' section
allow_prefix - True to allow the original name to have a prefix, False
otherwise
Definition at line 117 of file tools/config/__init__.py.
| def get_verbose_description | ( | self ) |
Return a verbose description of this configuration parameter as a string Arguments: None
Definition at line 224 of file tools/config/__init__.py.
| def sanitize | ( | name ) |
"Sanitize" a name so that it is a valid C macro name. Currently it simply replaces '.' and '-' with '_'. Positional arguments: name - the name to make into a valid C macro
Definition at line 186 of file tools/config/__init__.py.
| def set_value | ( | self, | |
| value, | |||
| unit_name, | |||
| unit_kind, | |||
label = None |
|||
| ) |
Sets a value for this parameter, remember the place where it was
set. If the value is a Boolean, it is converted to 1 (for True) or
to 0 (for False).
Positional arguments:
value - the value of the parameter
unit_name - the unit (target/library/application) that defines this
parameter
unit_kind - the kind of the unit ("target", "library" or "application")
Keyword arguments:
label - the name of the label in the 'target_config_overrides' section
(optional)
Definition at line 195 of file tools/config/__init__.py.
Generated on Tue Aug 9 2022 00:37:39 by
1.7.2