534
edits
m (→Switches Methods:   Adding getName method)  | 
				|||
| Line 110: | Line 110: | ||
== Switches Methods ==  | == Switches Methods ==  | ||
===   | === getName() ===  | ||
Return the   | 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.  | >>> RMP0PSW.getName()  | ||
'  | 'rmp0psw'  | ||
>>>  | >>>  | ||
</syntaxhighlight>  | </syntaxhighlight>  | ||
===   | === getValueType() ===  | ||
Return the switch   | 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.  | >>> RMP0PSW.getValueType()  | ||
'  | 'int'  | ||
>>>  | >>>  | ||
</syntaxhighlight>  | </syntaxhighlight>  | ||
edits