HSL 2.0 framework
Description of the framework
Public Member Functions |List of all members
hsl20_4_debug_page.hsl20_4_debug_page.Section Class Reference

Access to the debug page of the HS/FS. More..

Public Member Functions

def__init__ (self, section_key)
Constructor. More...
defset_value (self, key, value)
Sets a value. More...
defadd_value_to_average_field (self, key, value)
Sets a value. More...
defincrease_counter_field (self, key)
Increases a value by '1'. More...
defadd_message (self, message)
Adds a message list to the debug section if no message list is available yet. More...
defadd_exception (self, comment=None)
Adds an exception list to the debug section, if no exception list exists yet. More...
defget_debug_information (self)
Returns the debug information collected so far. More...

Detailed Description

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

Note
There is one section per module context on the debug page.

A code example can be found in the documentation for the remanent memory

Constructor & Destructor Documentation

◆ __init__()

def hsl20_4_debug_page.hsl20_4_debug_page.Section.__init__ ( self,
section_key
)

Constructor

Warning
This class should not be instantiated directly.
Parameters
section_keystring
Key under which all entries on the debug page are grouped

Member Function Documentation

◆ add_exception()

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

Note
If the same exception is added several times, it is only displayed once and a counter is added
Parameters
commentstring
Optional. Comment on the exception
From version 2.0.4:
Added note on exception list

◆ add_message()

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

Note
If the same message is added several times, it is only displayed once and a counter is added
Parameters
messagestring
Message text
From version 2.0.4:
Note on the message list added

◆ add_value_to_average_field()

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

Parameters
keystring
Key
valuestring
Value

◆ get_debug_information()

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.

Note
Is called up by the HS/FS when the debug page is created
Returns
dictionary
Debug Information

◆ increase_counter_field()

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'

Note
When increasing, you can also specify a key that was generated with another method of this class
Parameters
keystring
Key

◆ set_value()

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

Parameters
keystring
Key
valuestring
Value

The documentation for this class was generated from the following file: