Switch Class: Difference between revisions

No change in size ,  3 December 2019
m
m (→‎Switches Methods: Adding getName method)
Line 110: Line 110:


== Switches Methods ==
== Switches Methods ==
=== getValueType() ===
=== getName() ===
Return the type of value that is used witch this switch. Can be bool (boolean), int (integer) or string (string) according with the configuration file.
Return the switch Name according the configuration
<syntaxhighlight lang="python">
<syntaxhighlight lang="python">
Python 3.4.2 (default, Sep 26 2018, 07:16:01)
Python 3.4.2 (default, Sep 26 2018, 07:16:01)
Line 121: Line 121:
>>> FGINT1.createElements()
>>> FGINT1.createElements()
>>> RMP0PSW = FGINT1.getElement('RMP0PSW')
>>> RMP0PSW = FGINT1.getElement('RMP0PSW')
>>> RMP0PSW.getValueType()
>>> RMP0PSW.getName()
'int'
'rmp0psw'
>>>
>>>
</syntaxhighlight>
</syntaxhighlight>


=== getName() ===
=== getValueType() ===
Return the switch Name according the configuration
Return the type of value that is used witch this switch. Can be bool (boolean), int (integer) or string (string) according with the configuration file.
<syntaxhighlight lang="python">
<syntaxhighlight lang="python">
Python 3.4.2 (default, Sep 26 2018, 07:16:01)
Python 3.4.2 (default, Sep 26 2018, 07:16:01)
Line 137: Line 137:
>>> FGINT1.createElements()
>>> FGINT1.createElements()
>>> RMP0PSW = FGINT1.getElement('RMP0PSW')
>>> RMP0PSW = FGINT1.getElement('RMP0PSW')
>>> RMP0PSW.getName()
>>> RMP0PSW.getValueType()
'rmp0psw'
'int'
>>>
>>>
</syntaxhighlight>
</syntaxhighlight>
534

edits