534
edits
m (→Switches Methods: Adding getName method) |
|||
Line 123: | Line 123: | ||
>>> RMP0PSW.getValueType() | >>> RMP0PSW.getValueType() | ||
'int' | 'int' | ||
>>> | |||
</syntaxhighlight> | |||
=== getName() === | |||
Return the switch Name according the configuration | |||
<syntaxhighlight lang="python"> | |||
Python 3.4.2 (default, Sep 26 2018, 07:16:01) | |||
[GCC 4.9.2] on linux | |||
Type "help", "copyright", "credits" or "license" for more information. | |||
>>> from FGInterface import FGInterface as FGINT | |||
>>> FGINT1 = FGINT('radiopanel.cfg', 0) | |||
>>> FGINT1.createDevices() | |||
>>> FGINT1.createElements() | |||
>>> RMP0PSW = FGINT1.getElement('RMP0PSW') | |||
>>> RMP0PSW.getName() | |||
'rmp0psw' | |||
>>> | >>> | ||
</syntaxhighlight> | </syntaxhighlight> |
edits