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.
Fork of OmniWheels by
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 55 of file 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 58 of file config/__init__.py.
Member Function Documentation
def __str__ | ( | self ) |
Return the string representation of this configuration parameter Arguments: None
Definition at line 175 of file 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 128 of file 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 79 of file config/__init__.py.
def get_verbose_description | ( | self ) |
Return a verbose description of this configuration parameter as a string Arguments: None
Definition at line 186 of file 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 148 of file 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 157 of file config/__init__.py.
Generated on Fri Jul 22 2022 04:54:17 by
