Rtos API example
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 39 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 42 of file config/__init__.py.
Member Function Documentation
def __str__ | ( | self ) |
Return the string representation of this configuration parameter Arguments: None
Definition at line 157 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 110 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 63 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 168 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 130 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 139 of file config/__init__.py.
Generated on Sun Jul 17 2022 08:25:44 by 1.7.2