HSL 2.0 framework
Description of the framework
|
Access to the debug page of the HS/FS. More..
Public Member Functions | |
def | __init__ (self, section_key) |
Constructor. More... | |
def | set_value (self, key, value) |
Sets a value. More... | |
def | add_value_to_average_field (self, key, value) |
Sets a value. More... | |
def | increase_counter_field (self, key) |
Increases a value by '1'. More... | |
def | add_message (self, message) |
Adds a message list to the debug section if no message list is available yet. More... | |
def | add_exception (self, comment=None) |
Adds an exception list to the debug section, if no exception list exists yet. More... | |
def | get_debug_information (self) |
Returns the debug information collected so far. More... | |
Access to the debug page of the HS/FS
An instance of this class offers the possibility to output information on the debug page of the HS/FS. By calling the method hsl20_4.framework::create_debug_section, a separate section is automatically created on the debug page. All methods offered by this class always refer to this section
A code example can be found in the documentation for the remanent memory
def hsl20_4_debug_page.hsl20_4_debug_page.Section.__init__ | ( | self, | |
section_key | |||
) |
Constructor
section_key | string Key under which all entries on the debug page are grouped |
def hsl20_4_debug_page.hsl20_4_debug_page.Section.add_exception | ( | self, | |
comment = None |
|||
) |
Adds an exception list to the debug section, if no exception list exists yet
The current exception is added to this list. If the machine does not have an exception at the time of the call, the list remains unchanged. Up to 15 different exceptions are displayed. If the list overflows, the oldest entry disappears
The display of an exception
TIMESTAMP (NUMBER)
EXCEPTION
comment | string Optional. Comment on the exception |
def hsl20_4_debug_page.hsl20_4_debug_page.Section.add_message | ( | self, | |
message | |||
) |
Adds a message list to the debug section, if no message list exists yet
Up to 25 different messages are displayed. When the number of messages overflows, the oldest entry disappears
The display of a message
TIMESTAMP (NUMBER)
MESSAGE TEXT
message | string Message text |
def hsl20_4_debug_page.hsl20_4_debug_page.Section.add_value_to_average_field | ( | self, | |
key, | |||
value | |||
) |
Sets a value
Calculates the average value using the new and the existing value. If the transferred key does not yet exist, it is created automatically
key | string Key |
value | string Value |
def hsl20_4_debug_page.hsl20_4_debug_page.Section.get_debug_information | ( | self | ) |
Returns the debug information collected so far
The value contains another dictionary with 3 fields.
def hsl20_4_debug_page.hsl20_4_debug_page.Section.increase_counter_field | ( | self, | |
key | |||
) |
Increases a value by '1'
If the passed key does not yet exist, it is automatically created and set to '1'
key | string Key |
def hsl20_4_debug_page.hsl20_4_debug_page.Section.set_value | ( | self, | |
key, | |||
value | |||
) |
Sets a value
If the transferred key does not yet exist, it is created automatically
key | string Key |
value | string Value |