1
0
mirror of https://github.com/naruxde/revpipycontrol.git synced 2025-11-08 23:53:52 +01:00

Sicherheitswarnung vor dem Output schreiben integriert

Hauptfenster alles aufr?umen vor destroy()
Wertepr?fung bei RevPiCheckClient int() Werten
Bearbeitungsfunktion bei RevPiCheckClient eingebaut
Hilfemen? mit Webbrowser aufruf eingebaut
This commit is contained in:
2017-06-30 13:50:39 +02:00
parent a60431e456
commit 1fec478e3f
14 changed files with 718 additions and 265 deletions

View File

@@ -6,3 +6,4 @@ revpipycontrol.egg-info/*
deb/* deb/*
.eric6project/* .eric6project/*
*.directory *.directory
*.mo

View File

@@ -10,7 +10,7 @@ revpicheckclient</h1>
<h3 style="background-color:#FFFFFF;color:#FF0000"> <h3 style="background-color:#FFFFFF;color:#FF0000">
Global Attributes</h3> Global Attributes</h3>
<table> <table>
<tr><td>None</td></tr> <tr><td>_</td></tr>
</table> </table>
<h3 style="background-color:#FFFFFF;color:#FF0000"> <h3 style="background-color:#FFFFFF;color:#FF0000">
Classes</h3> Classes</h3>
@@ -35,7 +35,7 @@ tkinter.Frame
<h3 style="background-color:#FFFFFF;color:#FF0000"> <h3 style="background-color:#FFFFFF;color:#FF0000">
Class Attributes</h3> Class Attributes</h3>
<table> <table>
<tr><td>cli</td></tr><tr><td>tk</td></tr> <tr><td>None</td></tr>
</table> </table>
<h3 style="background-color:#FFFFFF;color:#FF0000"> <h3 style="background-color:#FFFFFF;color:#FF0000">
Class Methods</h3> Class Methods</h3>
@@ -49,11 +49,20 @@ Methods</h3>
<td><a style="color:#0000FF" href="#RevPiCheckClient.__init__">RevPiCheckClient</a></td> <td><a style="color:#0000FF" href="#RevPiCheckClient.__init__">RevPiCheckClient</a></td>
<td>Instantiiert MyApp-Klasse.</td> <td>Instantiiert MyApp-Klasse.</td>
</tr><tr> </tr><tr>
<td><a style="color:#0000FF" href="#RevPiCheckClient.__chval">__chval</a></td>
<td>Schreibt neuen Output Wert auf den RevPi.</td>
</tr><tr>
<td><a style="color:#0000FF" href="#RevPiCheckClient.__hidewin">__hidewin</a></td> <td><a style="color:#0000FF" href="#RevPiCheckClient.__hidewin">__hidewin</a></td>
<td></td> <td>Verbergt &#252;bergebenes Fenster.</td>
</tr><tr>
<td><a style="color:#0000FF" href="#RevPiCheckClient.__saveoldvalue">__saveoldvalue</a></td>
<td>Speichert bei Keypress aktuellen Wert f&#252;r wiederherstellung.</td>
</tr><tr> </tr><tr>
<td><a style="color:#0000FF" href="#RevPiCheckClient.__showwin">__showwin</a></td> <td><a style="color:#0000FF" href="#RevPiCheckClient.__showwin">__showwin</a></td>
<td></td> <td>Zeigt oder verbergt &#252;bergebenes Fenster.</td>
</tr><tr>
<td><a style="color:#0000FF" href="#RevPiCheckClient.__spinboxkey">__spinboxkey</a></td>
<td>Pr&#252;ft die Eingabe auf plausibilit&#228;t.</td>
</tr><tr> </tr><tr>
<td><a style="color:#0000FF" href="#RevPiCheckClient._createiogroup">_createiogroup</a></td> <td><a style="color:#0000FF" href="#RevPiCheckClient._createiogroup">_createiogroup</a></td>
<td>Erstellt IO-Gruppen.</td> <td>Erstellt IO-Gruppen.</td>
@@ -61,20 +70,35 @@ Methods</h3>
<td><a style="color:#0000FF" href="#RevPiCheckClient._createwidgets">_createwidgets</a></td> <td><a style="color:#0000FF" href="#RevPiCheckClient._createwidgets">_createwidgets</a></td>
<td>Erstellt den Fensterinhalt.</td> <td>Erstellt den Fensterinhalt.</td>
</tr><tr> </tr><tr>
<td><a style="color:#0000FF" href="#RevPiCheckClient._readvalues">_readvalues</a></td> <td><a style="color:#0000FF" href="#RevPiCheckClient._onfrmconf">_onfrmconf</a></td>
<td>Erstellt Fenster in einem Canvas.</td>
</tr><tr>
<td><a style="color:#0000FF" href="#RevPiCheckClient._warnwrite">_warnwrite</a></td>
<td>Warnung f&#252;r Benutzer &#252;ber Schreibfunktion einmal fragen.</td>
</tr><tr>
<td><a style="color:#0000FF" href="#RevPiCheckClient._workvalues">_workvalues</a></td>
<td>Alle Werte der Inputs und Outputs abrufen.</td> <td>Alle Werte der Inputs und Outputs abrufen.</td>
</tr><tr> </tr><tr>
<td><a style="color:#0000FF" href="#RevPiCheckClient.chval">chval</a></td> <td><a style="color:#0000FF" href="#RevPiCheckClient.hideallwindows">hideallwindows</a></td>
<td></td> <td>Versteckt alle Fenster.</td>
</tr><tr>
<td><a style="color:#0000FF" href="#RevPiCheckClient.onfrmconf">onfrmconf</a></td>
<td></td>
</tr><tr> </tr><tr>
<td><a style="color:#0000FF" href="#RevPiCheckClient.readvalues">readvalues</a></td> <td><a style="color:#0000FF" href="#RevPiCheckClient.readvalues">readvalues</a></td>
<td></td> <td>Ruft nur Input Werte von RevPi ab und aktualisiert Fenster.</td>
</tr><tr>
<td><a style="color:#0000FF" href="#RevPiCheckClient.refreshvalues">refreshvalues</a></td>
<td>Ruft alle IO Werte von RevPi ab und aktualisiert Fenster.</td>
</tr><tr> </tr><tr>
<td><a style="color:#0000FF" href="#RevPiCheckClient.toggleauto">toggleauto</a></td> <td><a style="color:#0000FF" href="#RevPiCheckClient.toggleauto">toggleauto</a></td>
<td></td> <td>Schaltet zwischen Autorefresh um und aktualisiert Widgets.</td>
</tr><tr>
<td><a style="color:#0000FF" href="#RevPiCheckClient.togglewrite">togglewrite</a></td>
<td>Schaltet zwischen DoWrite um und aktiviert Schreibfunktion.</td>
</tr><tr>
<td><a style="color:#0000FF" href="#RevPiCheckClient.validatereturn">validatereturn</a></td>
<td>&#220;berpr&#252;ft die R&#252;ckgaben der setvalue Funktion.</td>
</tr><tr>
<td><a style="color:#0000FF" href="#RevPiCheckClient.writevalues">writevalues</a></td>
<td>Schreibt ge&#228;nderte Outputs auf den RevPi.</td>
</tr> </tr>
</table> </table>
<h3 style="background-color:#FFFFFF;color:#FF0000"> <h3 style="background-color:#FFFFFF;color:#FF0000">
@@ -88,49 +112,147 @@ RevPiCheckClient (Constructor)</h3>
<b>RevPiCheckClient</b>(<i>master, xmlcli, xmlmode=0</i>) <b>RevPiCheckClient</b>(<i>master, xmlcli, xmlmode=0</i>)
<p> <p>
Instantiiert MyApp-Klasse. Instantiiert MyApp-Klasse.
</p><a NAME="RevPiCheckClient.__chval" ID="RevPiCheckClient.__chval"></a>
<h3 style="background-color:#FFFFFF;color:#FF0000">
RevPiCheckClient.__chval</h3>
<b>__chval</b>(<i>device, io, event=None</i>)
<p>
Schreibt neuen Output Wert auf den RevPi.
</p><a NAME="RevPiCheckClient.__hidewin" ID="RevPiCheckClient.__hidewin"></a> </p><a NAME="RevPiCheckClient.__hidewin" ID="RevPiCheckClient.__hidewin"></a>
<h3 style="background-color:#FFFFFF;color:#FF0000"> <h3 style="background-color:#FFFFFF;color:#FF0000">
RevPiCheckClient.__hidewin</h3> RevPiCheckClient.__hidewin</h3>
<b>__hidewin</b>(<i>win, event=None</i>) <b>__hidewin</b>(<i>win, event=None</i>)
<a NAME="RevPiCheckClient.__showwin" ID="RevPiCheckClient.__showwin"></a> <p>
Verbergt &#252;bergebenes Fenster.
</p><dl>
<dt><i>win:</i></dt>
<dd>
Fenster zum verbergen
</dd><dt><i>event:</i></dt>
<dd>
Tkinter Event
</dd>
</dl><a NAME="RevPiCheckClient.__saveoldvalue" ID="RevPiCheckClient.__saveoldvalue"></a>
<h3 style="background-color:#FFFFFF;color:#FF0000">
RevPiCheckClient.__saveoldvalue</h3>
<b>__saveoldvalue</b>(<i>event, tkvar</i>)
<p>
Speichert bei Keypress aktuellen Wert f&#252;r wiederherstellung.
</p><a NAME="RevPiCheckClient.__showwin" ID="RevPiCheckClient.__showwin"></a>
<h3 style="background-color:#FFFFFF;color:#FF0000"> <h3 style="background-color:#FFFFFF;color:#FF0000">
RevPiCheckClient.__showwin</h3> RevPiCheckClient.__showwin</h3>
<b>__showwin</b>(<i>win</i>) <b>__showwin</b>(<i>win</i>)
<a NAME="RevPiCheckClient._createiogroup" ID="RevPiCheckClient._createiogroup"></a>
<h3 style="background-color:#FFFFFF;color:#FF0000">
RevPiCheckClient._createiogroup</h3>
<b>_createiogroup</b>(<i>device, frame, iotype</i>)
<p> <p>
Erstellt IO-Gruppen. Zeigt oder verbergt &#252;bergebenes Fenster.
</p><a NAME="RevPiCheckClient._createwidgets" ID="RevPiCheckClient._createwidgets"></a> </p><dl>
<dt><i>win:</i></dt>
<dd>
Fenster zum anzeigen/verbergen
</dd>
</dl><a NAME="RevPiCheckClient.__spinboxkey" ID="RevPiCheckClient.__spinboxkey"></a>
<h3 style="background-color:#FFFFFF;color:#FF0000">
RevPiCheckClient.__spinboxkey</h3>
<b>__spinboxkey</b>(<i>device, io, event=None</i>)
<p>
Pr&#252;ft die Eingabe auf plausibilit&#228;t.
</p><dl>
<dt><i>event:</i></dt>
<dd>
tkinter Event
</dd><dt><i>io:</i></dt>
<dd>
IO Liste mit tkinter Variable
</dd>
</dl><a NAME="RevPiCheckClient._createwidgets" ID="RevPiCheckClient._createwidgets"></a>
<h3 style="background-color:#FFFFFF;color:#FF0000"> <h3 style="background-color:#FFFFFF;color:#FF0000">
RevPiCheckClient._createwidgets</h3> RevPiCheckClient._createwidgets</h3>
<b>_createwidgets</b>(<i></i>) <b>_createwidgets</b>(<i></i>)
<p> <p>
Erstellt den Fensterinhalt. Erstellt den Fensterinhalt.
</p><a NAME="RevPiCheckClient._readvalues" ID="RevPiCheckClient._readvalues"></a> </p><a NAME="RevPiCheckClient._onfrmconf" ID="RevPiCheckClient._onfrmconf"></a>
<h3 style="background-color:#FFFFFF;color:#FF0000"> <h3 style="background-color:#FFFFFF;color:#FF0000">
RevPiCheckClient._readvalues</h3> RevPiCheckClient._onfrmconf</h3>
<b>_readvalues</b>(<i></i>) <b>_onfrmconf</b>(<i>canvas</i>)
<p>
Erstellt Fenster in einem Canvas.
</p><dl>
<dt><i>canvas:</i></dt>
<dd>
Canvas in dem Objekte erstellt werden sollen
</dd>
</dl><a NAME="RevPiCheckClient._warnwrite" ID="RevPiCheckClient._warnwrite"></a>
<h3 style="background-color:#FFFFFF;color:#FF0000">
RevPiCheckClient._warnwrite</h3>
<b>_warnwrite</b>(<i></i>)
<p>
Warnung f&#252;r Benutzer &#252;ber Schreibfunktion einmal fragen.
</p><dl>
<dt>Returns:</dt>
<dd>
True, wenn Warnung einmal mit OK best&#228;tigt wurde
</dd>
</dl><a NAME="RevPiCheckClient._workvalues" ID="RevPiCheckClient._workvalues"></a>
<h3 style="background-color:#FFFFFF;color:#FF0000">
RevPiCheckClient._workvalues</h3>
<b>_workvalues</b>(<i>io_dicts=None, writeout=False</i>)
<p> <p>
Alle Werte der Inputs und Outputs abrufen. Alle Werte der Inputs und Outputs abrufen.
</p><a NAME="RevPiCheckClient.chval" ID="RevPiCheckClient.chval"></a> </p><dl>
<dt><i>io_dicts:</i></dt>
<dd>
Arbeit nur f&#252;r dieses Dict()
</dd><dt><i>writeout:</i></dt>
<dd>
&#196;nderungen auf RevPi schreiben
</dd>
</dl><a NAME="RevPiCheckClient.hideallwindows" ID="RevPiCheckClient.hideallwindows"></a>
<h3 style="background-color:#FFFFFF;color:#FF0000"> <h3 style="background-color:#FFFFFF;color:#FF0000">
RevPiCheckClient.chval</h3> RevPiCheckClient.hideallwindows</h3>
<b>chval</b>(<i>device, io</i>) <b>hideallwindows</b>(<i></i>)
<a NAME="RevPiCheckClient.onfrmconf" ID="RevPiCheckClient.onfrmconf"></a> <p>
<h3 style="background-color:#FFFFFF;color:#FF0000"> Versteckt alle Fenster.
RevPiCheckClient.onfrmconf</h3> </p><a NAME="RevPiCheckClient.readvalues" ID="RevPiCheckClient.readvalues"></a>
<b>onfrmconf</b>(<i>canvas</i>)
<a NAME="RevPiCheckClient.readvalues" ID="RevPiCheckClient.readvalues"></a>
<h3 style="background-color:#FFFFFF;color:#FF0000"> <h3 style="background-color:#FFFFFF;color:#FF0000">
RevPiCheckClient.readvalues</h3> RevPiCheckClient.readvalues</h3>
<b>readvalues</b>(<i></i>) <b>readvalues</b>(<i></i>)
<a NAME="RevPiCheckClient.toggleauto" ID="RevPiCheckClient.toggleauto"></a> <p>
Ruft nur Input Werte von RevPi ab und aktualisiert Fenster.
</p><a NAME="RevPiCheckClient.refreshvalues" ID="RevPiCheckClient.refreshvalues"></a>
<h3 style="background-color:#FFFFFF;color:#FF0000">
RevPiCheckClient.refreshvalues</h3>
<b>refreshvalues</b>(<i></i>)
<p>
Ruft alle IO Werte von RevPi ab und aktualisiert Fenster.
</p><a NAME="RevPiCheckClient.toggleauto" ID="RevPiCheckClient.toggleauto"></a>
<h3 style="background-color:#FFFFFF;color:#FF0000"> <h3 style="background-color:#FFFFFF;color:#FF0000">
RevPiCheckClient.toggleauto</h3> RevPiCheckClient.toggleauto</h3>
<b>toggleauto</b>(<i></i>) <b>toggleauto</b>(<i></i>)
<p>
Schaltet zwischen Autorefresh um und aktualisiert Widgets.
</p><a NAME="RevPiCheckClient.togglewrite" ID="RevPiCheckClient.togglewrite"></a>
<h3 style="background-color:#FFFFFF;color:#FF0000">
RevPiCheckClient.togglewrite</h3>
<b>togglewrite</b>(<i></i>)
<p>
Schaltet zwischen DoWrite um und aktiviert Schreibfunktion.
</p><a NAME="RevPiCheckClient.validatereturn" ID="RevPiCheckClient.validatereturn"></a>
<h3 style="background-color:#FFFFFF;color:#FF0000">
RevPiCheckClient.validatereturn</h3>
<b>validatereturn</b>(<i>returnlist</i>)
<p>
&#220;berpr&#252;ft die R&#252;ckgaben der setvalue Funktion.
</p><dl>
<dt><i>returnlist:</i></dt>
<dd>
list() der xml R&#252;ckgabe
</dd>
</dl><a NAME="RevPiCheckClient.writevalues" ID="RevPiCheckClient.writevalues"></a>
<h3 style="background-color:#FFFFFF;color:#FF0000">
RevPiCheckClient.writevalues</h3>
<b>writevalues</b>(<i></i>)
<p>
Schreibt ge&#228;nderte Outputs auf den RevPi.
</p>
<div align="right"><a style="color:#0000FF" href="#top">Up</a></div> <div align="right"><a style="color:#0000FF" href="#top">Up</a></div>
<hr /> <hr />
</body></html> </body></html>

View File

@@ -10,7 +10,7 @@ revpilogfile</h1>
<h3 style="background-color:#FFFFFF;color:#FF0000"> <h3 style="background-color:#FFFFFF;color:#FF0000">
Global Attributes</h3> Global Attributes</h3>
<table> <table>
<tr><td>None</td></tr> <tr><td>_</td></tr>
</table> </table>
<h3 style="background-color:#FFFFFF;color:#FF0000"> <h3 style="background-color:#FFFFFF;color:#FF0000">
Classes</h3> Classes</h3>
@@ -47,28 +47,28 @@ Methods</h3>
<table> <table>
<tr> <tr>
<td><a style="color:#0000FF" href="#RevPiLogfile.__init__">RevPiLogfile</a></td> <td><a style="color:#0000FF" href="#RevPiLogfile.__init__">RevPiLogfile</a></td>
<td>Init RevPiLogfile-Class.</td>
</tr><tr>
<td><a style="color:#0000FF" href="#RevPiLogfile._closewin">_closewin</a></td>
<td></td> <td></td>
</tr><tr> </tr><tr>
<td><a style="color:#0000FF" href="#RevPiLogfile._createwidgets">_createwidgets</a></td> <td><a style="color:#0000FF" href="#RevPiLogfile._createwidgets">_createwidgets</a></td>
<td></td> <td>Erstellt alle Widgets.</td>
</tr><tr>
<td><a style="color:#0000FF" href="#RevPiLogfile._load_log">_load_log</a></td>
<td>L&#228;d die angegebenen Logfiles herunter.</td>
</tr><tr> </tr><tr>
<td><a style="color:#0000FF" href="#RevPiLogfile.btn_clearapp">btn_clearapp</a></td> <td><a style="color:#0000FF" href="#RevPiLogfile.btn_clearapp">btn_clearapp</a></td>
<td></td> <td>Leert die Logliste der App.</td>
</tr><tr> </tr><tr>
<td><a style="color:#0000FF" href="#RevPiLogfile.btn_clearplc">btn_clearplc</a></td> <td><a style="color:#0000FF" href="#RevPiLogfile.btn_clearplc">btn_clearplc</a></td>
<td></td> <td>Leert die Logliste des PLC.</td>
</tr><tr>
<td><a style="color:#0000FF" href="#RevPiLogfile.get_applines">get_applines</a></td>
<td></td>
</tr><tr> </tr><tr>
<td><a style="color:#0000FF" href="#RevPiLogfile.get_applog">get_applog</a></td> <td><a style="color:#0000FF" href="#RevPiLogfile.get_applog">get_applog</a></td>
<td></td> <td>Ruft App Logbuch ab.</td>
</tr><tr>
<td><a style="color:#0000FF" href="#RevPiLogfile.get_plclines">get_plclines</a></td>
<td></td>
</tr><tr> </tr><tr>
<td><a style="color:#0000FF" href="#RevPiLogfile.get_plclog">get_plclog</a></td> <td><a style="color:#0000FF" href="#RevPiLogfile.get_plclog">get_plclog</a></td>
<td></td> <td>Ruft PLC Logbuch ab.</td>
</tr> </tr>
</table> </table>
<h3 style="background-color:#FFFFFF;color:#FF0000"> <h3 style="background-color:#FFFFFF;color:#FF0000">
@@ -80,35 +80,78 @@ Static Methods</h3>
<h3 style="background-color:#FFFFFF;color:#FF0000"> <h3 style="background-color:#FFFFFF;color:#FF0000">
RevPiLogfile (Constructor)</h3> RevPiLogfile (Constructor)</h3>
<b>RevPiLogfile</b>(<i>master, xmlcli</i>) <b>RevPiLogfile</b>(<i>master, xmlcli</i>)
<p>
Init RevPiLogfile-Class.
</p><a NAME="RevPiLogfile._closewin" ID="RevPiLogfile._closewin"></a>
<h3 style="background-color:#FFFFFF;color:#FF0000">
RevPiLogfile._closewin</h3>
<b>_closewin</b>(<i>event</i>)
<a NAME="RevPiLogfile._createwidgets" ID="RevPiLogfile._createwidgets"></a> <a NAME="RevPiLogfile._createwidgets" ID="RevPiLogfile._createwidgets"></a>
<h3 style="background-color:#FFFFFF;color:#FF0000"> <h3 style="background-color:#FFFFFF;color:#FF0000">
RevPiLogfile._createwidgets</h3> RevPiLogfile._createwidgets</h3>
<b>_createwidgets</b>(<i></i>) <b>_createwidgets</b>(<i></i>)
<a NAME="RevPiLogfile.btn_clearapp" ID="RevPiLogfile.btn_clearapp"></a> <p>
Erstellt alle Widgets.
</p><a NAME="RevPiLogfile._load_log" ID="RevPiLogfile._load_log"></a>
<h3 style="background-color:#FFFFFF;color:#FF0000">
RevPiLogfile._load_log</h3>
<b>_load_log</b>(<i>textwidget, xmlcall, startposition, full</i>)
<p>
L&#228;d die angegebenen Logfiles herunter.
</p><dl>
<dt><i>textwidget:</i></dt>
<dd>
Widget in das Logs eingef&#252;gt werden sollen
</dd><dt><i>xmlcall:</i></dt>
<dd>
xmlrpc Funktion zum Abrufen der Logdaten
</dd><dt><i>startposition:</i></dt>
<dd>
Startposition ab der Logdaten kommen sollen
</dd><dt><i>full:</i></dt>
<dd>
Komplettes Logbuch laden
</dd>
</dl><dl>
<dt>Returns:</dt>
<dd>
Ende der Datei (neue Startposition)
</dd>
</dl><a NAME="RevPiLogfile.btn_clearapp" ID="RevPiLogfile.btn_clearapp"></a>
<h3 style="background-color:#FFFFFF;color:#FF0000"> <h3 style="background-color:#FFFFFF;color:#FF0000">
RevPiLogfile.btn_clearapp</h3> RevPiLogfile.btn_clearapp</h3>
<b>btn_clearapp</b>(<i></i>) <b>btn_clearapp</b>(<i></i>)
<a NAME="RevPiLogfile.btn_clearplc" ID="RevPiLogfile.btn_clearplc"></a> <p>
Leert die Logliste der App.
</p><a NAME="RevPiLogfile.btn_clearplc" ID="RevPiLogfile.btn_clearplc"></a>
<h3 style="background-color:#FFFFFF;color:#FF0000"> <h3 style="background-color:#FFFFFF;color:#FF0000">
RevPiLogfile.btn_clearplc</h3> RevPiLogfile.btn_clearplc</h3>
<b>btn_clearplc</b>(<i></i>) <b>btn_clearplc</b>(<i></i>)
<a NAME="RevPiLogfile.get_applines" ID="RevPiLogfile.get_applines"></a> <p>
<h3 style="background-color:#FFFFFF;color:#FF0000"> Leert die Logliste des PLC.
RevPiLogfile.get_applines</h3> </p><a NAME="RevPiLogfile.get_applog" ID="RevPiLogfile.get_applog"></a>
<b>get_applines</b>(<i></i>)
<a NAME="RevPiLogfile.get_applog" ID="RevPiLogfile.get_applog"></a>
<h3 style="background-color:#FFFFFF;color:#FF0000"> <h3 style="background-color:#FFFFFF;color:#FF0000">
RevPiLogfile.get_applog</h3> RevPiLogfile.get_applog</h3>
<b>get_applog</b>(<i></i>) <b>get_applog</b>(<i>full=False</i>)
<a NAME="RevPiLogfile.get_plclines" ID="RevPiLogfile.get_plclines"></a> <p>
<h3 style="background-color:#FFFFFF;color:#FF0000"> Ruft App Logbuch ab.
RevPiLogfile.get_plclines</h3> </p><dl>
<b>get_plclines</b>(<i></i>) <dt><i>full:</i></dt>
<a NAME="RevPiLogfile.get_plclog" ID="RevPiLogfile.get_plclog"></a> <dd>
Ganzes Logbuch laden
</dd>
</dl><a NAME="RevPiLogfile.get_plclog" ID="RevPiLogfile.get_plclog"></a>
<h3 style="background-color:#FFFFFF;color:#FF0000"> <h3 style="background-color:#FFFFFF;color:#FF0000">
RevPiLogfile.get_plclog</h3> RevPiLogfile.get_plclog</h3>
<b>get_plclog</b>(<i></i>) <b>get_plclog</b>(<i>full=False</i>)
<p>
Ruft PLC Logbuch ab.
</p><dl>
<dt><i>full:</i></dt>
<dd>
Ganzes Logbuch laden
</dd>
</dl>
<div align="right"><a style="color:#0000FF" href="#top">Up</a></div> <div align="right"><a style="color:#0000FF" href="#top">Up</a></div>
<hr /> <hr />
</body></html> </body></html>

View File

@@ -10,7 +10,7 @@ revpioption</h1>
<h3 style="background-color:#FFFFFF;color:#FF0000"> <h3 style="background-color:#FFFFFF;color:#FF0000">
Global Attributes</h3> Global Attributes</h3>
<table> <table>
<tr><td>None</td></tr> <tr><td>_</td></tr>
</table> </table>
<h3 style="background-color:#FFFFFF;color:#FF0000"> <h3 style="background-color:#FFFFFF;color:#FF0000">
Classes</h3> Classes</h3>
@@ -47,22 +47,28 @@ Methods</h3>
<table> <table>
<tr> <tr>
<td><a style="color:#0000FF" href="#RevPiOption.__init__">RevPiOption</a></td> <td><a style="color:#0000FF" href="#RevPiOption.__init__">RevPiOption</a></td>
<td></td> <td>Init RevPiOption-Class.</td>
</tr><tr>
<td><a style="color:#0000FF" href="#RevPiOption._changesdone">_changesdone</a></td>
<td>Pr&#252;ft ob sich die Einstellungen ge&#228;ndert haben.</td>
</tr><tr>
<td><a style="color:#0000FF" href="#RevPiOption._checkclose">_checkclose</a></td>
<td>Pr&#252;ft ob Fenster beendet werden soll.</td>
</tr><tr> </tr><tr>
<td><a style="color:#0000FF" href="#RevPiOption._createwidgets">_createwidgets</a></td> <td><a style="color:#0000FF" href="#RevPiOption._createwidgets">_createwidgets</a></td>
<td></td> <td>Erstellt Widgets.</td>
</tr><tr> </tr><tr>
<td><a style="color:#0000FF" href="#RevPiOption._loadappdata">_loadappdata</a></td> <td><a style="color:#0000FF" href="#RevPiOption._loadappdata">_loadappdata</a></td>
<td></td> <td>L&#228;d aktuelle Einstellungen vom RevPi.</td>
</tr><tr> </tr><tr>
<td><a style="color:#0000FF" href="#RevPiOption._setappdata">_setappdata</a></td> <td><a style="color:#0000FF" href="#RevPiOption._setappdata">_setappdata</a></td>
<td></td> <td>Speichert ge&#228;nderte Einstellungen auf RevPi.</td>
</tr><tr> </tr><tr>
<td><a style="color:#0000FF" href="#RevPiOption.askxmlon">askxmlon</a></td> <td><a style="color:#0000FF" href="#RevPiOption.askxmlon">askxmlon</a></td>
<td></td> <td>Fragt Nuter, ob wirklicht abgeschaltet werden soll.</td>
</tr><tr> </tr><tr>
<td><a style="color:#0000FF" href="#RevPiOption.xmlmods">xmlmods</a></td> <td><a style="color:#0000FF" href="#RevPiOption.xmlmods">xmlmods</a></td>
<td></td> <td>Passt XML-Optionszugriff an.</td>
</tr> </tr>
</table> </table>
<h3 style="background-color:#FFFFFF;color:#FF0000"> <h3 style="background-color:#FFFFFF;color:#FF0000">
@@ -74,27 +80,66 @@ Static Methods</h3>
<h3 style="background-color:#FFFFFF;color:#FF0000"> <h3 style="background-color:#FFFFFF;color:#FF0000">
RevPiOption (Constructor)</h3> RevPiOption (Constructor)</h3>
<b>RevPiOption</b>(<i>master, xmlcli, xmlmode</i>) <b>RevPiOption</b>(<i>master, xmlcli, xmlmode</i>)
<a NAME="RevPiOption._createwidgets" ID="RevPiOption._createwidgets"></a> <p>
Init RevPiOption-Class.
</p><dl>
<dt>Returns:</dt>
<dd>
None
</dd>
</dl><a NAME="RevPiOption._changesdone" ID="RevPiOption._changesdone"></a>
<h3 style="background-color:#FFFFFF;color:#FF0000">
RevPiOption._changesdone</h3>
<b>_changesdone</b>(<i></i>)
<p>
Pr&#252;ft ob sich die Einstellungen ge&#228;ndert haben.
</p><dl>
<dt>Returns:</dt>
<dd>
True, wenn min. eine Einstellung ge&#228;ndert wurde
</dd>
</dl><a NAME="RevPiOption._checkclose" ID="RevPiOption._checkclose"></a>
<h3 style="background-color:#FFFFFF;color:#FF0000">
RevPiOption._checkclose</h3>
<b>_checkclose</b>(<i>event=None</i>)
<p>
Pr&#252;ft ob Fenster beendet werden soll.
</p><dl>
<dt><i>event:</i></dt>
<dd>
tkinter-Event
</dd>
</dl><a NAME="RevPiOption._createwidgets" ID="RevPiOption._createwidgets"></a>
<h3 style="background-color:#FFFFFF;color:#FF0000"> <h3 style="background-color:#FFFFFF;color:#FF0000">
RevPiOption._createwidgets</h3> RevPiOption._createwidgets</h3>
<b>_createwidgets</b>(<i></i>) <b>_createwidgets</b>(<i></i>)
<a NAME="RevPiOption._loadappdata" ID="RevPiOption._loadappdata"></a> <p>
Erstellt Widgets.
</p><a NAME="RevPiOption._loadappdata" ID="RevPiOption._loadappdata"></a>
<h3 style="background-color:#FFFFFF;color:#FF0000"> <h3 style="background-color:#FFFFFF;color:#FF0000">
RevPiOption._loadappdata</h3> RevPiOption._loadappdata</h3>
<b>_loadappdata</b>(<i></i>) <b>_loadappdata</b>(<i></i>)
<a NAME="RevPiOption._setappdata" ID="RevPiOption._setappdata"></a> <p>
L&#228;d aktuelle Einstellungen vom RevPi.
</p><a NAME="RevPiOption._setappdata" ID="RevPiOption._setappdata"></a>
<h3 style="background-color:#FFFFFF;color:#FF0000"> <h3 style="background-color:#FFFFFF;color:#FF0000">
RevPiOption._setappdata</h3> RevPiOption._setappdata</h3>
<b>_setappdata</b>(<i></i>) <b>_setappdata</b>(<i></i>)
<a NAME="RevPiOption.askxmlon" ID="RevPiOption.askxmlon"></a> <p>
Speichert ge&#228;nderte Einstellungen auf RevPi.
</p><a NAME="RevPiOption.askxmlon" ID="RevPiOption.askxmlon"></a>
<h3 style="background-color:#FFFFFF;color:#FF0000"> <h3 style="background-color:#FFFFFF;color:#FF0000">
RevPiOption.askxmlon</h3> RevPiOption.askxmlon</h3>
<b>askxmlon</b>(<i></i>) <b>askxmlon</b>(<i></i>)
<a NAME="RevPiOption.xmlmods" ID="RevPiOption.xmlmods"></a> <p>
Fragt Nuter, ob wirklicht abgeschaltet werden soll.
</p><a NAME="RevPiOption.xmlmods" ID="RevPiOption.xmlmods"></a>
<h3 style="background-color:#FFFFFF;color:#FF0000"> <h3 style="background-color:#FFFFFF;color:#FF0000">
RevPiOption.xmlmods</h3> RevPiOption.xmlmods</h3>
<b>xmlmods</b>(<i></i>) <b>xmlmods</b>(<i></i>)
<p>
Passt XML-Optionszugriff an.
</p>
<div align="right"><a style="color:#0000FF" href="#top">Up</a></div> <div align="right"><a style="color:#0000FF" href="#top">Up</a></div>
<hr /> <hr />
</body></html> </body></html>

View File

@@ -10,7 +10,7 @@ revpiplclist</h1>
<h3 style="background-color:#FFFFFF;color:#FF0000"> <h3 style="background-color:#FFFFFF;color:#FF0000">
Global Attributes</h3> Global Attributes</h3>
<table> <table>
<tr><td>savefile</td></tr> <tr><td>_</td></tr><tr><td>savefile</td></tr>
</table> </table>
<h3 style="background-color:#FFFFFF;color:#FF0000"> <h3 style="background-color:#FFFFFF;color:#FF0000">
Classes</h3> Classes</h3>
@@ -52,6 +52,9 @@ Methods</h3>
<td><a style="color:#0000FF" href="#RevPiPlcList.__init__">RevPiPlcList</a></td> <td><a style="color:#0000FF" href="#RevPiPlcList.__init__">RevPiPlcList</a></td>
<td></td> <td></td>
</tr><tr> </tr><tr>
<td><a style="color:#0000FF" href="#RevPiPlcList._checkclose">_checkclose</a></td>
<td></td>
</tr><tr>
<td><a style="color:#0000FF" href="#RevPiPlcList._createwidgets">_createwidgets</a></td> <td><a style="color:#0000FF" href="#RevPiPlcList._createwidgets">_createwidgets</a></td>
<td></td> <td></td>
</tr><tr> </tr><tr>
@@ -67,9 +70,6 @@ Methods</h3>
<td><a style="color:#0000FF" href="#RevPiPlcList.evt_btnadd">evt_btnadd</a></td> <td><a style="color:#0000FF" href="#RevPiPlcList.evt_btnadd">evt_btnadd</a></td>
<td></td> <td></td>
</tr><tr> </tr><tr>
<td><a style="color:#0000FF" href="#RevPiPlcList.evt_btnclose">evt_btnclose</a></td>
<td></td>
</tr><tr>
<td><a style="color:#0000FF" href="#RevPiPlcList.evt_btnnew">evt_btnnew</a></td> <td><a style="color:#0000FF" href="#RevPiPlcList.evt_btnnew">evt_btnnew</a></td>
<td></td> <td></td>
</tr><tr> </tr><tr>
@@ -95,6 +95,10 @@ Static Methods</h3>
<h3 style="background-color:#FFFFFF;color:#FF0000"> <h3 style="background-color:#FFFFFF;color:#FF0000">
RevPiPlcList (Constructor)</h3> RevPiPlcList (Constructor)</h3>
<b>RevPiPlcList</b>(<i>master</i>) <b>RevPiPlcList</b>(<i>master</i>)
<a NAME="RevPiPlcList._checkclose" ID="RevPiPlcList._checkclose"></a>
<h3 style="background-color:#FFFFFF;color:#FF0000">
RevPiPlcList._checkclose</h3>
<b>_checkclose</b>(<i>event=None</i>)
<a NAME="RevPiPlcList._createwidgets" ID="RevPiPlcList._createwidgets"></a> <a NAME="RevPiPlcList._createwidgets" ID="RevPiPlcList._createwidgets"></a>
<h3 style="background-color:#FFFFFF;color:#FF0000"> <h3 style="background-color:#FFFFFF;color:#FF0000">
RevPiPlcList._createwidgets</h3> RevPiPlcList._createwidgets</h3>
@@ -115,10 +119,6 @@ RevPiPlcList.build_listconn</h3>
<h3 style="background-color:#FFFFFF;color:#FF0000"> <h3 style="background-color:#FFFFFF;color:#FF0000">
RevPiPlcList.evt_btnadd</h3> RevPiPlcList.evt_btnadd</h3>
<b>evt_btnadd</b>(<i></i>) <b>evt_btnadd</b>(<i></i>)
<a NAME="RevPiPlcList.evt_btnclose" ID="RevPiPlcList.evt_btnclose"></a>
<h3 style="background-color:#FFFFFF;color:#FF0000">
RevPiPlcList.evt_btnclose</h3>
<b>evt_btnclose</b>(<i></i>)
<a NAME="RevPiPlcList.evt_btnnew" ID="RevPiPlcList.evt_btnnew"></a> <a NAME="RevPiPlcList.evt_btnnew" ID="RevPiPlcList.evt_btnnew"></a>
<h3 style="background-color:#FFFFFF;color:#FF0000"> <h3 style="background-color:#FFFFFF;color:#FF0000">
RevPiPlcList.evt_btnnew</h3> RevPiPlcList.evt_btnnew</h3>

View File

@@ -10,7 +10,7 @@ revpiprogram</h1>
<h3 style="background-color:#FFFFFF;color:#FF0000"> <h3 style="background-color:#FFFFFF;color:#FF0000">
Global Attributes</h3> Global Attributes</h3>
<table> <table>
<tr><td>savefile</td></tr> <tr><td>_</td></tr><tr><td>savefile</td></tr>
</table> </table>
<h3 style="background-color:#FFFFFF;color:#FF0000"> <h3 style="background-color:#FFFFFF;color:#FF0000">
Classes</h3> Classes</h3>
@@ -35,7 +35,7 @@ tkinter.Frame
<h3 style="background-color:#FFFFFF;color:#FF0000"> <h3 style="background-color:#FFFFFF;color:#FF0000">
Class Attributes</h3> Class Attributes</h3>
<table> <table>
<tr><td>myapp</td></tr><tr><td>root</td></tr> <tr><td>None</td></tr>
</table> </table>
<h3 style="background-color:#FFFFFF;color:#FF0000"> <h3 style="background-color:#FFFFFF;color:#FF0000">
Class Methods</h3> Class Methods</h3>
@@ -47,6 +47,9 @@ Methods</h3>
<table> <table>
<tr> <tr>
<td><a style="color:#0000FF" href="#RevPiProgram.__init__">RevPiProgram</a></td> <td><a style="color:#0000FF" href="#RevPiProgram.__init__">RevPiProgram</a></td>
<td>Init RevPiProgram-Class.</td>
</tr><tr>
<td><a style="color:#0000FF" href="#RevPiProgram._checkclose">_checkclose</a></td>
<td></td> <td></td>
</tr><tr> </tr><tr>
<td><a style="color:#0000FF" href="#RevPiProgram._createwidgets">_createwidgets</a></td> <td><a style="color:#0000FF" href="#RevPiProgram._createwidgets">_createwidgets</a></td>
@@ -71,22 +74,22 @@ Methods</h3>
<td>Erstellt eine Dateiliste von einem Verzeichnis.</td> <td>Erstellt eine Dateiliste von einem Verzeichnis.</td>
</tr><tr> </tr><tr>
<td><a style="color:#0000FF" href="#RevPiProgram.getpictoryrsc">getpictoryrsc</a></td> <td><a style="color:#0000FF" href="#RevPiProgram.getpictoryrsc">getpictoryrsc</a></td>
<td></td> <td>L&#228;d die piCtory Konfiguration herunter.</td>
</tr><tr> </tr><tr>
<td><a style="color:#0000FF" href="#RevPiProgram.getprocimg">getprocimg</a></td> <td><a style="color:#0000FF" href="#RevPiProgram.getprocimg">getprocimg</a></td>
<td></td> <td>L&#228;d das aktuelle Prozessabbild herunter.</td>
</tr><tr> </tr><tr>
<td><a style="color:#0000FF" href="#RevPiProgram.picontrolreset">picontrolreset</a></td> <td><a style="color:#0000FF" href="#RevPiProgram.picontrolreset">picontrolreset</a></td>
<td></td> <td>F&#252;rt ein Reset der piBridge durch.</td>
</tr><tr> </tr><tr>
<td><a style="color:#0000FF" href="#RevPiProgram.plcdownload">plcdownload</a></td> <td><a style="color:#0000FF" href="#RevPiProgram.plcdownload">plcdownload</a></td>
<td></td> <td>L&#228;d das aktuelle Projekt herunter.</td>
</tr><tr> </tr><tr>
<td><a style="color:#0000FF" href="#RevPiProgram.plcupload">plcupload</a></td> <td><a style="color:#0000FF" href="#RevPiProgram.plcupload">plcupload</a></td>
<td></td> <td>L&#228;dt das angegebene Projekt auf den RevPi.</td>
</tr><tr> </tr><tr>
<td><a style="color:#0000FF" href="#RevPiProgram.setpictoryrsc">setpictoryrsc</a></td> <td><a style="color:#0000FF" href="#RevPiProgram.setpictoryrsc">setpictoryrsc</a></td>
<td></td> <td>&#220;bertr&#228;gt die angegebene piCtory-Konfiguration.</td>
</tr> </tr>
</table> </table>
<h3 style="background-color:#FFFFFF;color:#FF0000"> <h3 style="background-color:#FFFFFF;color:#FF0000">
@@ -98,6 +101,12 @@ Static Methods</h3>
<h3 style="background-color:#FFFFFF;color:#FF0000"> <h3 style="background-color:#FFFFFF;color:#FF0000">
RevPiProgram (Constructor)</h3> RevPiProgram (Constructor)</h3>
<b>RevPiProgram</b>(<i>master, xmlcli, xmlmode, revpi</i>) <b>RevPiProgram</b>(<i>master, xmlcli, xmlmode, revpi</i>)
<p>
Init RevPiProgram-Class.
</p><a NAME="RevPiProgram._checkclose" ID="RevPiProgram._checkclose"></a>
<h3 style="background-color:#FFFFFF;color:#FF0000">
RevPiProgram._checkclose</h3>
<b>_checkclose</b>(<i>event=None</i>)
<a NAME="RevPiProgram._createwidgets" ID="RevPiProgram._createwidgets"></a> <a NAME="RevPiProgram._createwidgets" ID="RevPiProgram._createwidgets"></a>
<h3 style="background-color:#FFFFFF;color:#FF0000"> <h3 style="background-color:#FFFFFF;color:#FF0000">
RevPiProgram._createwidgets</h3> RevPiProgram._createwidgets</h3>
@@ -130,7 +139,7 @@ RevPiProgram.check_replacedir</h3>
Gibt das rootdir von einem entpackten Verzeichnis zurueck. Gibt das rootdir von einem entpackten Verzeichnis zurueck.
</p><p> </p><p>
Dabei wird geprueft, ob es sich um einen einzelnen Ordner handelt Dabei wird geprueft, ob es sich um einen einzelnen Ordner handelt
und ob es eine piCtory Konfiguraiton im rootdir gibt. und ob es eine piCtory Konfiguration im rootdir gibt.
</p><dl> </p><dl>
<dt><i>rootdir:</i></dt> <dt><i>rootdir:</i></dt>
<dd> <dd>
@@ -161,27 +170,39 @@ Dateiliste
<h3 style="background-color:#FFFFFF;color:#FF0000"> <h3 style="background-color:#FFFFFF;color:#FF0000">
RevPiProgram.getpictoryrsc</h3> RevPiProgram.getpictoryrsc</h3>
<b>getpictoryrsc</b>(<i></i>) <b>getpictoryrsc</b>(<i></i>)
<a NAME="RevPiProgram.getprocimg" ID="RevPiProgram.getprocimg"></a> <p>
L&#228;d die piCtory Konfiguration herunter.
</p><a NAME="RevPiProgram.getprocimg" ID="RevPiProgram.getprocimg"></a>
<h3 style="background-color:#FFFFFF;color:#FF0000"> <h3 style="background-color:#FFFFFF;color:#FF0000">
RevPiProgram.getprocimg</h3> RevPiProgram.getprocimg</h3>
<b>getprocimg</b>(<i></i>) <b>getprocimg</b>(<i></i>)
<a NAME="RevPiProgram.picontrolreset" ID="RevPiProgram.picontrolreset"></a> <p>
L&#228;d das aktuelle Prozessabbild herunter.
</p><a NAME="RevPiProgram.picontrolreset" ID="RevPiProgram.picontrolreset"></a>
<h3 style="background-color:#FFFFFF;color:#FF0000"> <h3 style="background-color:#FFFFFF;color:#FF0000">
RevPiProgram.picontrolreset</h3> RevPiProgram.picontrolreset</h3>
<b>picontrolreset</b>(<i></i>) <b>picontrolreset</b>(<i></i>)
<a NAME="RevPiProgram.plcdownload" ID="RevPiProgram.plcdownload"></a> <p>
F&#252;rt ein Reset der piBridge durch.
</p><a NAME="RevPiProgram.plcdownload" ID="RevPiProgram.plcdownload"></a>
<h3 style="background-color:#FFFFFF;color:#FF0000"> <h3 style="background-color:#FFFFFF;color:#FF0000">
RevPiProgram.plcdownload</h3> RevPiProgram.plcdownload</h3>
<b>plcdownload</b>(<i></i>) <b>plcdownload</b>(<i></i>)
<a NAME="RevPiProgram.plcupload" ID="RevPiProgram.plcupload"></a> <p>
L&#228;d das aktuelle Projekt herunter.
</p><a NAME="RevPiProgram.plcupload" ID="RevPiProgram.plcupload"></a>
<h3 style="background-color:#FFFFFF;color:#FF0000"> <h3 style="background-color:#FFFFFF;color:#FF0000">
RevPiProgram.plcupload</h3> RevPiProgram.plcupload</h3>
<b>plcupload</b>(<i></i>) <b>plcupload</b>(<i></i>)
<a NAME="RevPiProgram.setpictoryrsc" ID="RevPiProgram.setpictoryrsc"></a> <p>
L&#228;dt das angegebene Projekt auf den RevPi.
</p><a NAME="RevPiProgram.setpictoryrsc" ID="RevPiProgram.setpictoryrsc"></a>
<h3 style="background-color:#FFFFFF;color:#FF0000"> <h3 style="background-color:#FFFFFF;color:#FF0000">
RevPiProgram.setpictoryrsc</h3> RevPiProgram.setpictoryrsc</h3>
<b>setpictoryrsc</b>(<i>filename=None</i>) <b>setpictoryrsc</b>(<i>filename=None</i>)
<p>
&#220;bertr&#228;gt die angegebene piCtory-Konfiguration.
</p>
<div align="right"><a style="color:#0000FF" href="#top">Up</a></div> <div align="right"><a style="color:#0000FF" href="#top">Up</a></div>
<hr /> <hr />
</body></html> </body></html>

View File

@@ -10,7 +10,7 @@ revpipycontrol</h1>
<h3 style="background-color:#FFFFFF;color:#FF0000"> <h3 style="background-color:#FFFFFF;color:#FF0000">
Global Attributes</h3> Global Attributes</h3>
<table> <table>
<tr><td>None</td></tr> <tr><td>_</td></tr>
</table> </table>
<h3 style="background-color:#FFFFFF;color:#FF0000"> <h3 style="background-color:#FFFFFF;color:#FF0000">
Classes</h3> Classes</h3>
@@ -23,10 +23,7 @@ Classes</h3>
<h3 style="background-color:#FFFFFF;color:#FF0000"> <h3 style="background-color:#FFFFFF;color:#FF0000">
Functions</h3> Functions</h3>
<table> <table>
<tr> <tr><td>None</td></tr>
<td><a style="color:#0000FF" href="#addroot">addroot</a></td>
<td>H&#228;ngt root-dir der Anwendung vor Dateinamen.</td>
</tr>
</table> </table>
<hr /><hr /> <hr /><hr />
<a NAME="RevPiPyControl" ID="RevPiPyControl"></a> <a NAME="RevPiPyControl" ID="RevPiPyControl"></a>
@@ -50,55 +47,67 @@ Methods</h3>
<table> <table>
<tr> <tr>
<td><a style="color:#0000FF" href="#RevPiPyControl.__init__">RevPiPyControl</a></td> <td><a style="color:#0000FF" href="#RevPiPyControl.__init__">RevPiPyControl</a></td>
<td></td> <td>Init RevPiPyControl-Class.</td>
</tr><tr> </tr><tr>
<td><a style="color:#0000FF" href="#RevPiPyControl._btnstate">_btnstate</a></td> <td><a style="color:#0000FF" href="#RevPiPyControl._btnstate">_btnstate</a></td>
<td></td> <td>Setzt den state der Buttons.</td>
</tr><tr> </tr><tr>
<td><a style="color:#0000FF" href="#RevPiPyControl._closeall">_closeall</a></td> <td><a style="color:#0000FF" href="#RevPiPyControl._closeall">_closeall</a></td>
<td></td> <td>Schlie&#223;t alle Fenster.</td>
</tr><tr>
<td><a style="color:#0000FF" href="#RevPiPyControl._closeapp">_closeapp</a></td>
<td>R&#228;umt auf und beendet Programm.</td>
</tr><tr> </tr><tr>
<td><a style="color:#0000FF" href="#RevPiPyControl._createwidgets">_createwidgets</a></td> <td><a style="color:#0000FF" href="#RevPiPyControl._createwidgets">_createwidgets</a></td>
<td>Erstellt den Fensterinhalt.</td> <td>Erstellt den Fensterinhalt.</td>
</tr><tr> </tr><tr>
<td><a style="color:#0000FF" href="#RevPiPyControl._fillconnbar">_fillconnbar</a></td> <td><a style="color:#0000FF" href="#RevPiPyControl._fillconnbar">_fillconnbar</a></td>
<td></td> <td>Generiert Men&#252;eintr&#228;ge f&#252;r Verbindungen.</td>
</tr><tr> </tr><tr>
<td><a style="color:#0000FF" href="#RevPiPyControl._fillmbar">_fillmbar</a></td> <td><a style="color:#0000FF" href="#RevPiPyControl._fillmbar">_fillmbar</a></td>
<td></td> <td>Generiert Men&#252;eintr&#228;ge.</td>
</tr><tr> </tr><tr>
<td><a style="color:#0000FF" href="#RevPiPyControl._opt_conn">_opt_conn</a></td> <td><a style="color:#0000FF" href="#RevPiPyControl._opt_conn">_opt_conn</a></td>
<td></td> <td></td>
</tr><tr> </tr><tr>
<td><a style="color:#0000FF" href="#RevPiPyControl.infowindow">infowindow</a></td>
<td>&#214;ffnet das Fenster f&#252;r die Verbindungen.</td>
</tr><tr>
<td><a style="color:#0000FF" href="#RevPiPyControl.plcdebug">plcdebug</a></td>
<td>Baut den Debugframe und packt ihn.</td>
</tr><tr>
<td><a style="color:#0000FF" href="#RevPiPyControl.plclist">plclist</a></td> <td><a style="color:#0000FF" href="#RevPiPyControl.plclist">plclist</a></td>
<td></td> <td>&#214;ffnet das Fenster f&#252;r die Verbindungen.</td>
</tr><tr> </tr><tr>
<td><a style="color:#0000FF" href="#RevPiPyControl.plclogs">plclogs</a></td> <td><a style="color:#0000FF" href="#RevPiPyControl.plclogs">plclogs</a></td>
<td></td> <td>&#214;ffnet das Fenster f&#252;r Logdateien.</td>
</tr><tr>
<td><a style="color:#0000FF" href="#RevPiPyControl.plcmonitor">plcmonitor</a></td>
<td>Startet das Monitorfenster.</td>
</tr><tr> </tr><tr>
<td><a style="color:#0000FF" href="#RevPiPyControl.plcoptions">plcoptions</a></td> <td><a style="color:#0000FF" href="#RevPiPyControl.plcoptions">plcoptions</a></td>
<td>Startet das Optionsfenster.</td> <td>Startet das Optionsfenster.</td>
</tr><tr> </tr><tr>
<td><a style="color:#0000FF" href="#RevPiPyControl.plcprogram">plcprogram</a></td> <td><a style="color:#0000FF" href="#RevPiPyControl.plcprogram">plcprogram</a></td>
<td></td> <td>Startet das Programmfenster.</td>
</tr><tr> </tr><tr>
<td><a style="color:#0000FF" href="#RevPiPyControl.plcrestart">plcrestart</a></td> <td><a style="color:#0000FF" href="#RevPiPyControl.plcrestart">plcrestart</a></td>
<td></td> <td>Startet das PLC Programm neu.</td>
</tr><tr> </tr><tr>
<td><a style="color:#0000FF" href="#RevPiPyControl.plcstart">plcstart</a></td> <td><a style="color:#0000FF" href="#RevPiPyControl.plcstart">plcstart</a></td>
<td></td> <td>Startet das PLC Programm.</td>
</tr><tr> </tr><tr>
<td><a style="color:#0000FF" href="#RevPiPyControl.plcstop">plcstop</a></td> <td><a style="color:#0000FF" href="#RevPiPyControl.plcstop">plcstop</a></td>
<td></td> <td>Beendet das PLC Programm.</td>
</tr><tr>
<td><a style="color:#0000FF" href="#RevPiPyControl.serverdisconnect">serverdisconnect</a></td>
<td>Trennt eine bestehende Verbindung.</td>
</tr><tr> </tr><tr>
<td><a style="color:#0000FF" href="#RevPiPyControl.servererror">servererror</a></td> <td><a style="color:#0000FF" href="#RevPiPyControl.servererror">servererror</a></td>
<td>Setzt alles auf NULL.</td> <td>Setzt alles zur&#252;ck f&#252;r neue Verbindungen.</td>
</tr><tr> </tr><tr>
<td><a style="color:#0000FF" href="#RevPiPyControl.tmr_plcrunning">tmr_plcrunning</a></td> <td><a style="color:#0000FF" href="#RevPiPyControl.tmr_plcrunning">tmr_plcrunning</a></td>
<td></td> <td></td>
</tr><tr>
<td><a style="color:#0000FF" href="#RevPiPyControl.visitwebsite">visitwebsite</a></td>
<td>&#214;ffnet auf dem System einen Webbrowser zur Projektseite.</td>
</tr> </tr>
</table> </table>
<h3 style="background-color:#FFFFFF;color:#FF0000"> <h3 style="background-color:#FFFFFF;color:#FF0000">
@@ -110,15 +119,37 @@ Static Methods</h3>
<h3 style="background-color:#FFFFFF;color:#FF0000"> <h3 style="background-color:#FFFFFF;color:#FF0000">
RevPiPyControl (Constructor)</h3> RevPiPyControl (Constructor)</h3>
<b>RevPiPyControl</b>(<i>master=None</i>) <b>RevPiPyControl</b>(<i>master=None</i>)
<a NAME="RevPiPyControl._btnstate" ID="RevPiPyControl._btnstate"></a> <p>
Init RevPiPyControl-Class.
</p><dl>
<dt><i>master:</i></dt>
<dd>
tkinter master
</dd>
</dl><a NAME="RevPiPyControl._btnstate" ID="RevPiPyControl._btnstate"></a>
<h3 style="background-color:#FFFFFF;color:#FF0000"> <h3 style="background-color:#FFFFFF;color:#FF0000">
RevPiPyControl._btnstate</h3> RevPiPyControl._btnstate</h3>
<b>_btnstate</b>(<i></i>) <b>_btnstate</b>(<i></i>)
<a NAME="RevPiPyControl._closeall" ID="RevPiPyControl._closeall"></a> <p>
Setzt den state der Buttons.
</p><a NAME="RevPiPyControl._closeall" ID="RevPiPyControl._closeall"></a>
<h3 style="background-color:#FFFFFF;color:#FF0000"> <h3 style="background-color:#FFFFFF;color:#FF0000">
RevPiPyControl._closeall</h3> RevPiPyControl._closeall</h3>
<b>_closeall</b>(<i></i>) <b>_closeall</b>(<i></i>)
<a NAME="RevPiPyControl._createwidgets" ID="RevPiPyControl._createwidgets"></a> <p>
Schlie&#223;t alle Fenster.
</p><a NAME="RevPiPyControl._closeapp" ID="RevPiPyControl._closeapp"></a>
<h3 style="background-color:#FFFFFF;color:#FF0000">
RevPiPyControl._closeapp</h3>
<b>_closeapp</b>(<i>event=None</i>)
<p>
R&#228;umt auf und beendet Programm.
</p><dl>
<dt><i>event:</i></dt>
<dd>
tkinter Event
</dd>
</dl><a NAME="RevPiPyControl._createwidgets" ID="RevPiPyControl._createwidgets"></a>
<h3 style="background-color:#FFFFFF;color:#FF0000"> <h3 style="background-color:#FFFFFF;color:#FF0000">
RevPiPyControl._createwidgets</h3> RevPiPyControl._createwidgets</h3>
<b>_createwidgets</b>(<i></i>) <b>_createwidgets</b>(<i></i>)
@@ -128,28 +159,42 @@ Erstellt den Fensterinhalt.
<h3 style="background-color:#FFFFFF;color:#FF0000"> <h3 style="background-color:#FFFFFF;color:#FF0000">
RevPiPyControl._fillconnbar</h3> RevPiPyControl._fillconnbar</h3>
<b>_fillconnbar</b>(<i></i>) <b>_fillconnbar</b>(<i></i>)
<a NAME="RevPiPyControl._fillmbar" ID="RevPiPyControl._fillmbar"></a> <p>
Generiert Men&#252;eintr&#228;ge f&#252;r Verbindungen.
</p><a NAME="RevPiPyControl._fillmbar" ID="RevPiPyControl._fillmbar"></a>
<h3 style="background-color:#FFFFFF;color:#FF0000"> <h3 style="background-color:#FFFFFF;color:#FF0000">
RevPiPyControl._fillmbar</h3> RevPiPyControl._fillmbar</h3>
<b>_fillmbar</b>(<i></i>) <b>_fillmbar</b>(<i></i>)
<a NAME="RevPiPyControl._opt_conn" ID="RevPiPyControl._opt_conn"></a> <p>
Generiert Men&#252;eintr&#228;ge.
</p><a NAME="RevPiPyControl._opt_conn" ID="RevPiPyControl._opt_conn"></a>
<h3 style="background-color:#FFFFFF;color:#FF0000"> <h3 style="background-color:#FFFFFF;color:#FF0000">
RevPiPyControl._opt_conn</h3> RevPiPyControl._opt_conn</h3>
<b>_opt_conn</b>(<i>text</i>) <b>_opt_conn</b>(<i>text</i>)
<a NAME="RevPiPyControl.plclist" ID="RevPiPyControl.plclist"></a> <a NAME="RevPiPyControl.infowindow" ID="RevPiPyControl.infowindow"></a>
<h3 style="background-color:#FFFFFF;color:#FF0000">
RevPiPyControl.infowindow</h3>
<b>infowindow</b>(<i></i>)
<p>
&#214;ffnet das Fenster f&#252;r die Verbindungen.
</p><a NAME="RevPiPyControl.plcdebug" ID="RevPiPyControl.plcdebug"></a>
<h3 style="background-color:#FFFFFF;color:#FF0000">
RevPiPyControl.plcdebug</h3>
<b>plcdebug</b>(<i></i>)
<p>
Baut den Debugframe und packt ihn.
</p><a NAME="RevPiPyControl.plclist" ID="RevPiPyControl.plclist"></a>
<h3 style="background-color:#FFFFFF;color:#FF0000"> <h3 style="background-color:#FFFFFF;color:#FF0000">
RevPiPyControl.plclist</h3> RevPiPyControl.plclist</h3>
<b>plclist</b>(<i></i>) <b>plclist</b>(<i></i>)
<a NAME="RevPiPyControl.plclogs" ID="RevPiPyControl.plclogs"></a> <p>
&#214;ffnet das Fenster f&#252;r die Verbindungen.
</p><a NAME="RevPiPyControl.plclogs" ID="RevPiPyControl.plclogs"></a>
<h3 style="background-color:#FFFFFF;color:#FF0000"> <h3 style="background-color:#FFFFFF;color:#FF0000">
RevPiPyControl.plclogs</h3> RevPiPyControl.plclogs</h3>
<b>plclogs</b>(<i></i>) <b>plclogs</b>(<i></i>)
<a NAME="RevPiPyControl.plcmonitor" ID="RevPiPyControl.plcmonitor"></a>
<h3 style="background-color:#FFFFFF;color:#FF0000">
RevPiPyControl.plcmonitor</h3>
<b>plcmonitor</b>(<i></i>)
<p> <p>
Startet das Monitorfenster. &#214;ffnet das Fenster f&#252;r Logdateien.
</p><a NAME="RevPiPyControl.plcoptions" ID="RevPiPyControl.plcoptions"></a> </p><a NAME="RevPiPyControl.plcoptions" ID="RevPiPyControl.plcoptions"></a>
<h3 style="background-color:#FFFFFF;color:#FF0000"> <h3 style="background-color:#FFFFFF;color:#FF0000">
RevPiPyControl.plcoptions</h3> RevPiPyControl.plcoptions</h3>
@@ -160,50 +205,49 @@ Startet das Optionsfenster.
<h3 style="background-color:#FFFFFF;color:#FF0000"> <h3 style="background-color:#FFFFFF;color:#FF0000">
RevPiPyControl.plcprogram</h3> RevPiPyControl.plcprogram</h3>
<b>plcprogram</b>(<i></i>) <b>plcprogram</b>(<i></i>)
<a NAME="RevPiPyControl.plcrestart" ID="RevPiPyControl.plcrestart"></a> <p>
Startet das Programmfenster.
</p><a NAME="RevPiPyControl.plcrestart" ID="RevPiPyControl.plcrestart"></a>
<h3 style="background-color:#FFFFFF;color:#FF0000"> <h3 style="background-color:#FFFFFF;color:#FF0000">
RevPiPyControl.plcrestart</h3> RevPiPyControl.plcrestart</h3>
<b>plcrestart</b>(<i></i>) <b>plcrestart</b>(<i></i>)
<a NAME="RevPiPyControl.plcstart" ID="RevPiPyControl.plcstart"></a> <p>
Startet das PLC Programm neu.
</p><a NAME="RevPiPyControl.plcstart" ID="RevPiPyControl.plcstart"></a>
<h3 style="background-color:#FFFFFF;color:#FF0000"> <h3 style="background-color:#FFFFFF;color:#FF0000">
RevPiPyControl.plcstart</h3> RevPiPyControl.plcstart</h3>
<b>plcstart</b>(<i></i>) <b>plcstart</b>(<i></i>)
<a NAME="RevPiPyControl.plcstop" ID="RevPiPyControl.plcstop"></a> <p>
Startet das PLC Programm.
</p><a NAME="RevPiPyControl.plcstop" ID="RevPiPyControl.plcstop"></a>
<h3 style="background-color:#FFFFFF;color:#FF0000"> <h3 style="background-color:#FFFFFF;color:#FF0000">
RevPiPyControl.plcstop</h3> RevPiPyControl.plcstop</h3>
<b>plcstop</b>(<i></i>) <b>plcstop</b>(<i></i>)
<a NAME="RevPiPyControl.servererror" ID="RevPiPyControl.servererror"></a> <p>
Beendet das PLC Programm.
</p><a NAME="RevPiPyControl.serverdisconnect" ID="RevPiPyControl.serverdisconnect"></a>
<h3 style="background-color:#FFFFFF;color:#FF0000">
RevPiPyControl.serverdisconnect</h3>
<b>serverdisconnect</b>(<i></i>)
<p>
Trennt eine bestehende Verbindung.
</p><a NAME="RevPiPyControl.servererror" ID="RevPiPyControl.servererror"></a>
<h3 style="background-color:#FFFFFF;color:#FF0000"> <h3 style="background-color:#FFFFFF;color:#FF0000">
RevPiPyControl.servererror</h3> RevPiPyControl.servererror</h3>
<b>servererror</b>(<i></i>) <b>servererror</b>(<i></i>)
<p> <p>
Setzt alles auf NULL. Setzt alles zur&#252;ck f&#252;r neue Verbindungen.
</p><a NAME="RevPiPyControl.tmr_plcrunning" ID="RevPiPyControl.tmr_plcrunning"></a> </p><a NAME="RevPiPyControl.tmr_plcrunning" ID="RevPiPyControl.tmr_plcrunning"></a>
<h3 style="background-color:#FFFFFF;color:#FF0000"> <h3 style="background-color:#FFFFFF;color:#FF0000">
RevPiPyControl.tmr_plcrunning</h3> RevPiPyControl.tmr_plcrunning</h3>
<b>tmr_plcrunning</b>(<i></i>) <b>tmr_plcrunning</b>(<i></i>)
<a NAME="RevPiPyControl.visitwebsite" ID="RevPiPyControl.visitwebsite"></a>
<div align="right"><a style="color:#0000FF" href="#top">Up</a></div> <h3 style="background-color:#FFFFFF;color:#FF0000">
<hr /><hr /> RevPiPyControl.visitwebsite</h3>
<a NAME="addroot" ID="addroot"></a> <b>visitwebsite</b>(<i></i>)
<h2 style="background-color:#FFFFFF;color:#0000FF">addroot</h2>
<b>addroot</b>(<i>filename</i>)
<p> <p>
H&#228;ngt root-dir der Anwendung vor Dateinamen. &#214;ffnet auf dem System einen Webbrowser zur Projektseite.
</p><p> </p>
Je nach Ausf&#252;hrungsart der Anwendung muss das root-dir &#252;ber
andere Arten abgerufen werden.
</p><dl>
<dt><i>filename:</i></dt>
<dd>
Datei oder Ordnername
</dd>
</dl><dl>
<dt>Returns:</dt>
<dd>
root dir
</dd>
</dl>
<div align="right"><a style="color:#0000FF" href="#top">Up</a></div> <div align="right"><a style="color:#0000FF" href="#top">Up</a></div>
<hr /> <hr />
</body></html> </body></html>

View File

@@ -1,35 +1,54 @@
mytools.addroot?4(filename)
mytools.gettrans?4(proglang=None)
revpicheckclient.RevPiCheckClient.__chval?6(device, io, event=None)
revpicheckclient.RevPiCheckClient.__hidewin?6(win, event=None) revpicheckclient.RevPiCheckClient.__hidewin?6(win, event=None)
revpicheckclient.RevPiCheckClient.__saveoldvalue?6(event, tkvar)
revpicheckclient.RevPiCheckClient.__showwin?6(win) revpicheckclient.RevPiCheckClient.__showwin?6(win)
revpicheckclient.RevPiCheckClient.__spinboxkey?6(device, io, event=None)
revpicheckclient.RevPiCheckClient._createiogroup?5(device, frame, iotype) revpicheckclient.RevPiCheckClient._createiogroup?5(device, frame, iotype)
revpicheckclient.RevPiCheckClient._createwidgets?5() revpicheckclient.RevPiCheckClient._createwidgets?5()
revpicheckclient.RevPiCheckClient._readvalues?5() revpicheckclient.RevPiCheckClient._onfrmconf?5(canvas)
revpicheckclient.RevPiCheckClient.chval?4(device, io) revpicheckclient.RevPiCheckClient._warnwrite?5()
revpicheckclient.RevPiCheckClient.cli?7 revpicheckclient.RevPiCheckClient._workvalues?5(io_dicts=None, writeout=False)
revpicheckclient.RevPiCheckClient.onfrmconf?4(canvas) revpicheckclient.RevPiCheckClient.hideallwindows?4()
revpicheckclient.RevPiCheckClient.readvalues?4() revpicheckclient.RevPiCheckClient.readvalues?4()
revpicheckclient.RevPiCheckClient.tk?7 revpicheckclient.RevPiCheckClient.refreshvalues?4()
revpicheckclient.RevPiCheckClient.toggleauto?4() revpicheckclient.RevPiCheckClient.toggleauto?4()
revpicheckclient.RevPiCheckClient.togglewrite?4()
revpicheckclient.RevPiCheckClient.validatereturn?4(returnlist)
revpicheckclient.RevPiCheckClient.writevalues?4()
revpicheckclient.RevPiCheckClient?1(master, xmlcli, xmlmode=0) revpicheckclient.RevPiCheckClient?1(master, xmlcli, xmlmode=0)
revpicheckclient._?8
revpiinfo.RevPiInfo._closewin?5(event=None)
revpiinfo.RevPiInfo._createwidgets?5()
revpiinfo.RevPiInfo.app?7
revpiinfo.RevPiInfo.root?7
revpiinfo.RevPiInfo?1(master)
revpiinfo._?8
revpilogfile.RevPiLogfile._closewin?5(event)
revpilogfile.RevPiLogfile._createwidgets?5() revpilogfile.RevPiLogfile._createwidgets?5()
revpilogfile.RevPiLogfile._load_log?5(textwidget, xmlcall, startposition, full)
revpilogfile.RevPiLogfile.btn_clearapp?4() revpilogfile.RevPiLogfile.btn_clearapp?4()
revpilogfile.RevPiLogfile.btn_clearplc?4() revpilogfile.RevPiLogfile.btn_clearplc?4()
revpilogfile.RevPiLogfile.get_applines?4() revpilogfile.RevPiLogfile.get_applog?4(full=False)
revpilogfile.RevPiLogfile.get_applog?4() revpilogfile.RevPiLogfile.get_plclog?4(full=False)
revpilogfile.RevPiLogfile.get_plclines?4()
revpilogfile.RevPiLogfile.get_plclog?4()
revpilogfile.RevPiLogfile?1(master, xmlcli) revpilogfile.RevPiLogfile?1(master, xmlcli)
revpilogfile._?8
revpioption.RevPiOption._changesdone?5()
revpioption.RevPiOption._checkclose?5(event=None)
revpioption.RevPiOption._createwidgets?5() revpioption.RevPiOption._createwidgets?5()
revpioption.RevPiOption._loadappdata?5() revpioption.RevPiOption._loadappdata?5()
revpioption.RevPiOption._setappdata?5() revpioption.RevPiOption._setappdata?5()
revpioption.RevPiOption.askxmlon?4() revpioption.RevPiOption.askxmlon?4()
revpioption.RevPiOption.xmlmods?4() revpioption.RevPiOption.xmlmods?4()
revpioption.RevPiOption?1(master, xmlcli, xmlmode) revpioption.RevPiOption?1(master, xmlcli, xmlmode)
revpioption._?8
revpiplclist.RevPiPlcList._checkclose?5(event=None)
revpiplclist.RevPiPlcList._createwidgets?5() revpiplclist.RevPiPlcList._createwidgets?5()
revpiplclist.RevPiPlcList._loadappdata?5() revpiplclist.RevPiPlcList._loadappdata?5()
revpiplclist.RevPiPlcList._saveappdata?5() revpiplclist.RevPiPlcList._saveappdata?5()
revpiplclist.RevPiPlcList.build_listconn?4() revpiplclist.RevPiPlcList.build_listconn?4()
revpiplclist.RevPiPlcList.evt_btnadd?4() revpiplclist.RevPiPlcList.evt_btnadd?4()
revpiplclist.RevPiPlcList.evt_btnclose?4()
revpiplclist.RevPiPlcList.evt_btnnew?4() revpiplclist.RevPiPlcList.evt_btnnew?4()
revpiplclist.RevPiPlcList.evt_btnremove?4() revpiplclist.RevPiPlcList.evt_btnremove?4()
revpiplclist.RevPiPlcList.evt_btnsave?4() revpiplclist.RevPiPlcList.evt_btnsave?4()
@@ -38,8 +57,10 @@ revpiplclist.RevPiPlcList.evt_listconn?4(evt=None)
revpiplclist.RevPiPlcList.myapp?7 revpiplclist.RevPiPlcList.myapp?7
revpiplclist.RevPiPlcList.root?7 revpiplclist.RevPiPlcList.root?7
revpiplclist.RevPiPlcList?1(master) revpiplclist.RevPiPlcList?1(master)
revpiplclist._?8
revpiplclist.get_connections?4() revpiplclist.get_connections?4()
revpiplclist.savefile?7 revpiplclist.savefile?7
revpiprogram.RevPiProgram._checkclose?5(event=None)
revpiprogram.RevPiProgram._createwidgets?5() revpiprogram.RevPiProgram._createwidgets?5()
revpiprogram.RevPiProgram._evt_optdown?5(text="") revpiprogram.RevPiProgram._evt_optdown?5(text="")
revpiprogram.RevPiProgram._evt_optup?5(text="") revpiprogram.RevPiProgram._evt_optup?5(text="")
@@ -49,31 +70,34 @@ revpiprogram.RevPiProgram.check_replacedir?4(rootdir)
revpiprogram.RevPiProgram.create_filelist?4(rootdir) revpiprogram.RevPiProgram.create_filelist?4(rootdir)
revpiprogram.RevPiProgram.getpictoryrsc?4() revpiprogram.RevPiProgram.getpictoryrsc?4()
revpiprogram.RevPiProgram.getprocimg?4() revpiprogram.RevPiProgram.getprocimg?4()
revpiprogram.RevPiProgram.myapp?7
revpiprogram.RevPiProgram.picontrolreset?4() revpiprogram.RevPiProgram.picontrolreset?4()
revpiprogram.RevPiProgram.plcdownload?4() revpiprogram.RevPiProgram.plcdownload?4()
revpiprogram.RevPiProgram.plcupload?4() revpiprogram.RevPiProgram.plcupload?4()
revpiprogram.RevPiProgram.root?7
revpiprogram.RevPiProgram.setpictoryrsc?4(filename=None) revpiprogram.RevPiProgram.setpictoryrsc?4(filename=None)
revpiprogram.RevPiProgram?1(master, xmlcli, xmlmode, revpi) revpiprogram.RevPiProgram?1(master, xmlcli, xmlmode, revpi)
revpiprogram._?8
revpiprogram.savefile?7 revpiprogram.savefile?7
revpipycontrol.RevPiPyControl._btnstate?5() revpipycontrol.RevPiPyControl._btnstate?5()
revpipycontrol.RevPiPyControl._closeall?5() revpipycontrol.RevPiPyControl._closeall?5()
revpipycontrol.RevPiPyControl._closeapp?5(event=None)
revpipycontrol.RevPiPyControl._createwidgets?5() revpipycontrol.RevPiPyControl._createwidgets?5()
revpipycontrol.RevPiPyControl._fillconnbar?5() revpipycontrol.RevPiPyControl._fillconnbar?5()
revpipycontrol.RevPiPyControl._fillmbar?5() revpipycontrol.RevPiPyControl._fillmbar?5()
revpipycontrol.RevPiPyControl._opt_conn?5(text) revpipycontrol.RevPiPyControl._opt_conn?5(text)
revpipycontrol.RevPiPyControl.infowindow?4()
revpipycontrol.RevPiPyControl.myapp?7 revpipycontrol.RevPiPyControl.myapp?7
revpipycontrol.RevPiPyControl.plcdebug?4()
revpipycontrol.RevPiPyControl.plclist?4() revpipycontrol.RevPiPyControl.plclist?4()
revpipycontrol.RevPiPyControl.plclogs?4() revpipycontrol.RevPiPyControl.plclogs?4()
revpipycontrol.RevPiPyControl.plcmonitor?4()
revpipycontrol.RevPiPyControl.plcoptions?4() revpipycontrol.RevPiPyControl.plcoptions?4()
revpipycontrol.RevPiPyControl.plcprogram?4() revpipycontrol.RevPiPyControl.plcprogram?4()
revpipycontrol.RevPiPyControl.plcrestart?4() revpipycontrol.RevPiPyControl.plcrestart?4()
revpipycontrol.RevPiPyControl.plcstart?4() revpipycontrol.RevPiPyControl.plcstart?4()
revpipycontrol.RevPiPyControl.plcstop?4() revpipycontrol.RevPiPyControl.plcstop?4()
revpipycontrol.RevPiPyControl.root?7 revpipycontrol.RevPiPyControl.root?7
revpipycontrol.RevPiPyControl.serverdisconnect?4()
revpipycontrol.RevPiPyControl.servererror?4() revpipycontrol.RevPiPyControl.servererror?4()
revpipycontrol.RevPiPyControl.tmr_plcrunning?4() revpipycontrol.RevPiPyControl.tmr_plcrunning?4()
revpipycontrol.RevPiPyControl.visitwebsite?4()
revpipycontrol.RevPiPyControl?1(master=None) revpipycontrol.RevPiPyControl?1(master=None)
revpipycontrol.addroot?4(filename) revpipycontrol._?8

View File

@@ -1,4 +1,5 @@
RevPiCheckClient tkinter.Frame RevPiCheckClient tkinter.Frame
RevPiInfo tkinter.Frame
RevPiLogfile tkinter.Frame RevPiLogfile tkinter.Frame
RevPiOption tkinter.Frame RevPiOption tkinter.Frame
RevPiPlcList tkinter.Frame RevPiPlcList tkinter.Frame

View File

@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE Project SYSTEM "Project-5.1.dtd"> <!DOCTYPE Project SYSTEM "Project-5.1.dtd">
<!-- eric project file for project revpipycontrol --> <!-- eric project file for project revpipycontrol -->
<!-- Saved: 2017-06-29, 17:51:42 --> <!-- Saved: 2017-06-30, 13:49:59 -->
<!-- Copyright (C) 2017 Sven Sager, akira@narux.de --> <!-- Copyright (C) 2017 Sven Sager, akira@narux.de -->
<Project version="5.1"> <Project version="5.1">
<Language>en_US</Language> <Language>en_US</Language>
@@ -22,6 +22,7 @@
<Source>revpipycontrol/revpioption.py</Source> <Source>revpipycontrol/revpioption.py</Source>
<Source>revpipycontrol/revpiprogram.py</Source> <Source>revpipycontrol/revpiprogram.py</Source>
<Source>revpipycontrol/mytools.py</Source> <Source>revpipycontrol/mytools.py</Source>
<Source>revpipycontrol/revpiinfo.py</Source>
</Sources> </Sources>
<Forms/> <Forms/>
<Translations/> <Translations/>

View File

@@ -1,8 +1,8 @@
msgid "" msgid ""
msgstr "" msgstr ""
"Project-Id-Version: RevPiPyControl 0.4.0\n" "Project-Id-Version: RevPiPyControl 0.4.0\n"
"POT-Creation-Date: 2017-06-29 20:10+0200\n" "POT-Creation-Date: 2017-06-30 13:50+0200\n"
"PO-Revision-Date: 2017-06-29 20:10+0200\n" "PO-Revision-Date: 2017-06-30 13:50+0200\n"
"Last-Translator: \n" "Last-Translator: \n"
"Language-Team: \n" "Language-Team: \n"
"Language: de\n" "Language: de\n"
@@ -15,34 +15,72 @@ msgstr ""
"X-Poedit-SourceCharset: UTF-8\n" "X-Poedit-SourceCharset: UTF-8\n"
"X-Poedit-SearchPath-0: .\n" "X-Poedit-SearchPath-0: .\n"
#: revpicheckclient.py:143 #: revpicheckclient.py:103 revpicheckclient.py:395 revpioption.py:288
#: revpiplclist.py:198 revpiprogram.py:306 revpiprogram.py:337
#: revpiprogram.py:400 revpiprogram.py:433 revpiprogram.py:515
#: revpiprogram.py:587 revpiprogram.py:618 revpiprogram.py:631
#: revpiprogram.py:686 revpiprogram.py:706 revpiprogram.py:714
#: revpipycontrol.py:342
msgid "Error"
msgstr "Fehler"
#: revpicheckclient.py:104
msgid ""
"Given value for Output '{}' is not valid! \n"
"Reset to '{}'"
msgstr ""
"Angegebener Wert bei Output '{}' ist nicht gültig! \n"
"Setze auf '{}' zurück"
#: revpicheckclient.py:202
msgid "Devices of RevPi" msgid "Devices of RevPi"
msgstr "Devices vom RevPi" msgstr "Devices vom RevPi"
#: revpicheckclient.py:175 #: revpicheckclient.py:234
msgid "Control" msgid "Control"
msgstr "Kontrolle" msgstr "Kontrolle"
#: revpicheckclient.py:179 #: revpicheckclient.py:238
msgid "Read all IOs" msgid "Read all IOs"
msgstr "IOs aktualisieren" msgstr "IOs aktualisieren"
#: revpicheckclient.py:184 #: revpicheckclient.py:243
msgid "Read just Inputs" msgid "Read just Inputs"
msgstr "Inputs lesen" msgstr "Inputs lesen"
#: revpicheckclient.py:189 #: revpicheckclient.py:248
msgid "Write Outputs" msgid "Write Outputs"
msgstr "Outputs schreiben" msgstr "Outputs schreiben"
#: revpicheckclient.py:195 #: revpicheckclient.py:254
msgid "Autorefresh values" msgid "Autorefresh values"
msgstr "Aktualisiere automatisch" msgstr "Aktualisiere automatisch"
#: revpicheckclient.py:201 #: revpicheckclient.py:262
msgid "Write values to RevPi" msgid "Write values to RevPi"
msgstr "Schreibe Werte auf RevPi" msgstr "Schreibe Werte auf RevPi"
#: revpicheckclient.py:276 revpiprogram.py:407 revpipycontrol.py:228
#: revpipycontrol.py:267 revpipycontrol.py:285 revpipycontrol.py:303
msgid "Warning"
msgstr "Warnung"
#: revpicheckclient.py:277
msgid ""
"You want to set outputs on the RevPi! Note that these are set "
"IMMEDIATELY!!! \n"
"If another control program is running on the RevPi, it could interfere and "
"reset the outputs."
msgstr ""
"Sie wollen Outputs auf dem RevPi setzen! Beachten Sie, dass diese SOFORT "
"gesetzt werden!!! \n"
"Wenn auf dem RevPi ein anderes Programm zur Steuerung läuft, könnte dies "
"gestört werden und die Ausgänge wieder zurücksetzen."
#: revpicheckclient.py:392
msgid "Error set value of device '{}' Output '{}': {} \n"
msgstr "Fehler beim Setzen auf Device '{}' bei Output '{}': {}\n"
#: revpilogfile.py:37 #: revpilogfile.py:37
msgid "RevPi Python PLC Logs" msgid "RevPi Python PLC Logs"
msgstr "RevPi Python PLC Logdaten" msgstr "RevPi Python PLC Logdaten"
@@ -184,14 +222,6 @@ msgstr "Information"
msgid "Settings saved" msgid "Settings saved"
msgstr "Einstellungen gespeichert" msgstr "Einstellungen gespeichert"
#: revpioption.py:288 revpiplclist.py:198 revpiprogram.py:306
#: revpiprogram.py:337 revpiprogram.py:400 revpiprogram.py:433
#: revpiprogram.py:515 revpiprogram.py:587 revpiprogram.py:618
#: revpiprogram.py:631 revpiprogram.py:686 revpiprogram.py:706
#: revpiprogram.py:714 revpipycontrol.py:325
msgid "Error"
msgstr "Fehler"
#: revpioption.py:289 #: revpioption.py:289
msgid "The settings could not be saved. This can happen if values are wrong!" msgid "The settings could not be saved. This can happen if values are wrong!"
msgstr "" msgstr ""
@@ -345,7 +375,7 @@ msgstr "piControlReset ausführen"
msgid "execute" msgid "execute"
msgstr "ausführen" msgstr "ausführen"
#: revpiprogram.py:216 revpipycontrol.py:95 #: revpiprogram.py:216 revpipycontrol.py:107
msgid "Exit" msgid "Exit"
msgstr "Beenden" msgstr "Beenden"
@@ -412,11 +442,6 @@ msgstr ""
"Die piCtory Konfiguration konnte auf dem Revolution Pi nicht geschrieben " "Die piCtory Konfiguration konnte auf dem Revolution Pi nicht geschrieben "
"werden." "werden."
#: revpiprogram.py:407 revpipycontrol.py:211 revpipycontrol.py:250
#: revpipycontrol.py:268 revpipycontrol.py:286
msgid "Warning"
msgstr "Warnung"
#: revpiprogram.py:408 #: revpiprogram.py:408
msgid "" msgid ""
"The piCtroy configuration has been saved successfully. \n" "The piCtroy configuration has been saved successfully. \n"
@@ -486,67 +511,67 @@ msgstr "Der Revoluton Pi konnte Teile der Übertragung nicht verarbeiten."
msgid "Errors occurred during transmission" msgid "Errors occurred during transmission"
msgstr "Bei der Übertragung traten Fehler auf" msgstr "Bei der Übertragung traten Fehler auf"
#: revpipycontrol.py:93 #: revpipycontrol.py:105
msgid "Connections..." msgid "Connections..."
msgstr "Verbindungen..." msgstr "Verbindungen..."
#: revpipycontrol.py:96 #: revpipycontrol.py:108
msgid "Main" msgid "Main"
msgstr "Datei" msgstr "Datei"
#: revpipycontrol.py:104 #: revpipycontrol.py:116
msgid "Visit website..." msgid "Visit website..."
msgstr "Webseite besuchen..." msgstr "Webseite besuchen..."
#: revpipycontrol.py:106 #: revpipycontrol.py:118
msgid "Info..." msgid "Info..."
msgstr "Info..." msgstr "Info..."
#: revpipycontrol.py:108 #: revpipycontrol.py:119
msgid "Help" msgid "Help"
msgstr "Hilfe" msgstr "Hilfe"
#: revpipycontrol.py:116 #: revpipycontrol.py:127
msgid "PLC start" msgid "PLC start"
msgstr "PLC Start" msgstr "PLC Start"
#: revpipycontrol.py:121 #: revpipycontrol.py:132
msgid "PLC stop" msgid "PLC stop"
msgstr "PLC Stopp" msgstr "PLC Stopp"
#: revpipycontrol.py:126 #: revpipycontrol.py:137
msgid "PLC restart" msgid "PLC restart"
msgstr "PLC Neustart" msgstr "PLC Neustart"
#: revpipycontrol.py:131 #: revpipycontrol.py:142
msgid "PLC logs" msgid "PLC logs"
msgstr "PLC Logs" msgstr "PLC Logs"
#: revpipycontrol.py:142 #: revpipycontrol.py:153
msgid "PLC watch mode" msgid "PLC watch mode"
msgstr "PLC watch Modus" msgstr "PLC watch Modus"
#: revpipycontrol.py:159 #: revpipycontrol.py:170
msgid "PLC log..." msgid "PLC log..."
msgstr "PLC Log..." msgstr "PLC Log..."
#: revpipycontrol.py:161 #: revpipycontrol.py:172
msgid "PLC options..." msgid "PLC options..."
msgstr "PLC Optionen..." msgstr "PLC Optionen..."
#: revpipycontrol.py:163 #: revpipycontrol.py:174
msgid "PLC program..." msgid "PLC program..."
msgstr "PLC Programm..." msgstr "PLC Programm..."
#: revpipycontrol.py:167 #: revpipycontrol.py:178
msgid "Disconnect" msgid "Disconnect"
msgstr "Trennen" msgstr "Trennen"
#: revpipycontrol.py:172 #: revpipycontrol.py:183
msgid "Connect" msgid "Connect"
msgstr "Verbinden" msgstr "Verbinden"
#: revpipycontrol.py:212 #: revpipycontrol.py:229
msgid "" msgid ""
"The watch mode ist not supported in version {} of RevPiPyLoad on your RevPi! " "The watch mode ist not supported in version {} of RevPiPyLoad on your RevPi! "
"You need at least version 0.4.0." "You need at least version 0.4.0."
@@ -554,7 +579,7 @@ msgstr ""
"Der Watch-Modus wird von der RevPiPyLoad Version {} auf dem RevPi nicht " "Der Watch-Modus wird von der RevPiPyLoad Version {} auf dem RevPi nicht "
"unterstützt! Sie benötigen mindestens Version 0.4.0." "unterstützt! Sie benötigen mindestens Version 0.4.0."
#: revpipycontrol.py:251 #: revpipycontrol.py:268
msgid "" msgid ""
"This version of Logviewer ist not supported in version {} of RevPiPyLoad on " "This version of Logviewer ist not supported in version {} of RevPiPyLoad on "
"your RevPi! You need at least version 0.4.1." "your RevPi! You need at least version 0.4.1."
@@ -562,7 +587,7 @@ msgstr ""
"Diese Version vom Logbetrachter wird in der RevPiPyLoad Version {} auf Ihrem " "Diese Version vom Logbetrachter wird in der RevPiPyLoad Version {} auf Ihrem "
"RevPi nicht unterstützt! Sie benötigen mindestens Version 0.4.1." "RevPi nicht unterstützt! Sie benötigen mindestens Version 0.4.1."
#: revpipycontrol.py:269 revpipycontrol.py:287 #: revpipycontrol.py:286 revpipycontrol.py:304
msgid "" msgid ""
"XML-RPC access mode in the RevPiPyLoad configuration is to small to access " "XML-RPC access mode in the RevPiPyLoad configuration is to small to access "
"this dialog" "this dialog"
@@ -570,6 +595,10 @@ msgstr ""
"Der XML-RPC Modus ist beim RevPiPyLoad nicht hoch genug eingestellt, um " "Der XML-RPC Modus ist beim RevPiPyLoad nicht hoch genug eingestellt, um "
"diesen Dialog zu verwenden!" "diesen Dialog zu verwenden!"
#: revpipycontrol.py:326 #: revpipycontrol.py:343
msgid "Can not reach server!" msgid "Can not reach server!"
msgstr "Server ist nicht erreichbar!" msgstr "Server ist nicht erreichbar!"
#~ msgid "Given value for Output '{}' is not valid! Reset to '{}'"
#~ msgstr ""
#~ "Angegebener Wert bei Output '{}' ist nicht gültig! Setze auf '{}' zurück"

View File

@@ -9,8 +9,9 @@
import pickle import pickle
import tkinter import tkinter
from threading import Lock import tkinter.messagebox as tkmsg
from mytools import gettrans from mytools import gettrans
from threading import Lock
from xmlrpc.client import ServerProxy, MultiCall from xmlrpc.client import ServerProxy, MultiCall
# Übersetzung laden # Übersetzung laden
@@ -27,12 +28,15 @@ class RevPiCheckClient(tkinter.Frame):
self.xmlmode = xmlmode self.xmlmode = xmlmode
self.cli = xmlcli self.cli = xmlcli
self.cli.psstart() self.cli.psstart()
self.lst_devices = self.cli.ps_devices() self.dict_devices = {v[0]: v[1] for v in self.cli.ps_devices()}
self.dict_inps = pickle.loads(self.cli.ps_inps().data) self.dict_inps = pickle.loads(self.cli.ps_inps().data)
self.dict_outs = pickle.loads(self.cli.ps_outs().data) self.dict_outs = pickle.loads(self.cli.ps_outs().data)
self.lk = Lock() self.lk = Lock()
self.lst_wins = [] self.dict_wins = {}
self.__checkwrite = True
self.__lockedvar = None
self.__oldvalue = None
self.autorw = tkinter.BooleanVar() self.autorw = tkinter.BooleanVar()
self.dowrite = tkinter.BooleanVar() self.dowrite = tkinter.BooleanVar()
@@ -43,27 +47,76 @@ class RevPiCheckClient(tkinter.Frame):
# Aktuelle Werte einlesen # Aktuelle Werte einlesen
self.refreshvalues() self.refreshvalues()
def __chval(self, device, io): def __chval(self, device, io, event=None):
if self.dowrite.get(): u"""Schreibt neuen Output Wert auf den RevPi."""
if self.dowrite.get() and self._warnwrite():
with self.lk: with self.lk:
self.cli.ps_setvalue(device, io[0], io[5].get()) self.validatereturn(
self.cli.ps_setvalue(device, io[0], io[5].get())
)
# Alles neu einlesen wenn nicht AutoRW aktiv ist # Alles neu einlesen wenn nicht AutoRW aktiv ist
if not self.autorw.get(): if not self.autorw.get():
self.refreshvalues() self.refreshvalues()
self.__lockedvar = None
def __hidewin(self, win, event=None): def __hidewin(self, win, event=None):
u"""Verbergt übergebenes Fenster.
@param win: Fenster zum verbergen
@param event: Tkinter Event"""
win.withdraw() win.withdraw()
def __saveoldvalue(self, event, tkvar):
u"""Speichert bei Keypress aktuellen Wert für wiederherstellung."""
if self.__lockedvar is None:
self.__lockedvar = tkvar
try:
self.__oldvalue = tkvar.get()
except Exception:
pass
def __showwin(self, win): def __showwin(self, win):
u"""Zeigt oder verbergt übergebenes Fenster.
@param win: Fenster zum anzeigen/verbergen"""
if win.winfo_viewable(): if win.winfo_viewable():
win.withdraw() win.withdraw()
else: else:
win.deiconify() win.deiconify()
def _createiogroup(self, device, frame, iotype): def __spinboxkey(self, device, io, event=None):
"""Erstellt IO-Gruppen.""" u"""Prüft die Eingabe auf plausibilität.
@param event: tkinter Event
@param io: IO Liste mit tkinter Variable"""
# io = [name,bytelen,byteaddr,bmk,bitaddress,(tkinter_var)]
try:
newvalue = io[5].get()
# Wertebereich prüfen
if newvalue < 0 or newvalue > 255 * io[1]:
raise ValueError("too big")
self.__chval(device, io)
except Exception:
io[5].set(self.__oldvalue)
tkmsg.showerror(
_("Error"),
_("Given value for Output '{}' is not valid! \nReset to ""'{}'"
"").format(self.dict_devices[device], self.__oldvalue),
parent=self.dict_wins[device]
)
# Focus zurücksetzen
event.widget.focus_set()
def _createiogroup(self, device, frame, iotype):
u"""Erstellt IO-Gruppen.
@param device: Deviceposition
@param frame: tkinter Frame
@iotype: 'inp' oder 'out' als str()
"""
# IO-Typen festlegen # IO-Typen festlegen
if iotype == "inp": if iotype == "inp":
lst_io = self.dict_inps[device] lst_io = self.dict_inps[device]
@@ -120,10 +173,16 @@ class RevPiCheckClient(tkinter.Frame):
check.grid(column=1, row=rowcount) check.grid(column=1, row=rowcount)
else: else:
var = tkinter.IntVar() var = tkinter.IntVar()
# FIXME: Mehrere Bytes möglich
txt = tkinter.Spinbox(s_frame, to=255 * io[1]) txt = tkinter.Spinbox(s_frame, to=255 * io[1])
txt.bind(
"<Key>",
lambda event, tkvar=var: self.__saveoldvalue(event, tkvar)
)
txt.bind(
"<FocusOut>",
lambda event, device=device, io=io:
self.__spinboxkey(device, io, event)
)
txt["command"] = \ txt["command"] = \
lambda device=device, io=io: self.__chval(device, io) lambda device=device, io=io: self.__chval(device, io)
txt["state"] = "disabled" if iotype == "inp" else "normal" txt["state"] = "disabled" if iotype == "inp" else "normal"
@@ -131,7 +190,7 @@ class RevPiCheckClient(tkinter.Frame):
txt["textvariable"] = var txt["textvariable"] = var
txt.grid(column=1, row=rowcount) txt.grid(column=1, row=rowcount)
# Steuerelementvariable in IO übernehmen # Steuerelementvariable in IO übernehmen (mutabel)
io.append(var) io.append(var)
rowcount += 1 rowcount += 1
@@ -143,31 +202,31 @@ class RevPiCheckClient(tkinter.Frame):
devgrp["text"] = _("Devices of RevPi") devgrp["text"] = _("Devices of RevPi")
devgrp.pack(fill="y", side="left") devgrp.pack(fill="y", side="left")
for dev in self.lst_devices: for dev in self.dict_devices:
win = tkinter.Toplevel(self) win = tkinter.Toplevel(self)
win.wm_title(dev[1]) win.wm_title(self.dict_devices[dev])
win.protocol( win.protocol(
"WM_DELETE_WINDOW", "WM_DELETE_WINDOW",
lambda win=win: self.__hidewin(win) lambda win=win: self.__hidewin(win)
) )
win.resizable(False, True) win.resizable(False, True)
win.withdraw() win.withdraw()
self.lst_wins.append(win) self.dict_wins[dev] = win
# Devicegruppe erstellen # Devicegruppe erstellen
group = tkinter.LabelFrame(win) group = tkinter.LabelFrame(win)
group["text"] = dev[1] group["text"] = self.dict_devices[dev]
group.pack(side="left", fill="both", expand=True) group.pack(side="left", fill="both", expand=True)
for iotype in ["inp", "out"]: for iotype in ["inp", "out"]:
frame = tkinter.Frame(group) frame = tkinter.Frame(group)
frame.pack(side="left", fill="both", expand=True) frame.pack(side="left", fill="both", expand=True)
self._createiogroup(dev[0], frame, iotype) self._createiogroup(dev, frame, iotype)
# Button erstellen # Button erstellen
btn = tkinter.Button(devgrp) btn = tkinter.Button(devgrp)
btn["command"] = lambda win=win: self.__showwin(win) btn["command"] = lambda win=win: self.__showwin(win)
btn["text"] = dev[1] btn["text"] = self.dict_devices[dev]
btn.pack(fill="x", padx=10, pady=5) btn.pack(fill="x", padx=10, pady=5)
# Steuerungsfunktionen # Steuerungsfunktionen
@@ -196,17 +255,38 @@ class RevPiCheckClient(tkinter.Frame):
check["variable"] = self.autorw check["variable"] = self.autorw
check.pack(anchor="w") check.pack(anchor="w")
check = tkinter.Checkbutton(cntgrp) self.chk_dowrite = tkinter.Checkbutton(cntgrp)
check["state"] = "disabled" if self.xmlmode < 3 else "normal" self.chk_dowrite["command"] = self.togglewrite
check["text"] = _("Write values to RevPi") self.chk_dowrite["state"] = "normal" if self.xmlmode >= 3 \
check["variable"] = self.dowrite and self.autorw.get() else "disabled"
check.pack(anchor="w") self.chk_dowrite["text"] = _("Write values to RevPi")
self.chk_dowrite["variable"] = self.dowrite
self.chk_dowrite.pack(anchor="w")
def _onfrmconf(self, canvas): def _onfrmconf(self, canvas):
u"""Erstellt Fenster in einem Canvas.
@param canvas: Canvas in dem Objekte erstellt werden sollen"""
canvas.configure(scrollregion=canvas.bbox("all")) canvas.configure(scrollregion=canvas.bbox("all"))
def _warnwrite(self):
u"""Warnung für Benutzer über Schreibfunktion einmal fragen.
@returns: True, wenn Warnung einmal mit OK bestätigt wurde"""
if self.__checkwrite:
self.__checkwrite = not tkmsg.askokcancel(
_("Warning"),
_("You want to set outputs on the RevPi! Note that these are "
"set IMMEDIATELY!!! \nIf another control program is "
"running on the RevPi, it could interfere and reset the "
"outputs."),
icon=tkmsg.WARNING,
parent=self.master
)
return not self.__checkwrite
def _workvalues(self, io_dicts=None, writeout=False): def _workvalues(self, io_dicts=None, writeout=False):
"""Alle Werte der Inputs und Outputs abrufen.""" u"""Alle Werte der Inputs und Outputs abrufen.
@param io_dicts: Arbeit nur für dieses Dict()
@param writeout: Änderungen auf RevPi schreiben"""
# Abfragelisten vorbereiten # Abfragelisten vorbereiten
if io_dicts is None: if io_dicts is None:
@@ -220,13 +300,17 @@ class RevPiCheckClient(tkinter.Frame):
if writeout: if writeout:
xmlmc = MultiCall(self.cli) xmlmc = MultiCall(self.cli)
for dev in self.lst_devices: for dev in self.dict_devices:
# io = [name,bytelen,byteaddr,bmk,bitaddress,(tkinter_var)] # io = [name,bytelen,byteaddr,bmk,bitaddress,(tkinter_var)]
# IO Typ verarbeiten # IO Typ verarbeiten
for iotype in io_dicts: for iotype in io_dicts:
# ios verarbeiten # ios verarbeiten
for io in iotype[dev[0]]: for io in iotype[dev]:
# Gesperrte Variable überspringen
if io[5] == self.__lockedvar:
continue
# Bytes umwandeln # Bytes umwandeln
int_byte = int.from_bytes( int_byte = int.from_bytes(
@@ -236,55 +320,81 @@ class RevPiCheckClient(tkinter.Frame):
# Bit-IO # Bit-IO
new_val = bool(int_byte & 1 << io[4]) new_val = bool(int_byte & 1 << io[4])
if writeout and new_val != io[5].get(): if writeout and new_val != io[5].get():
xmlmc.ps_setvalue(dev[0], io[0], io[5].get()) xmlmc.ps_setvalue(dev, io[0], io[5].get())
else: else:
io[5].set(new_val) io[5].set(new_val)
else: else:
# Byte-IO # Byte-IO
if writeout and int_byte != io[5].get(): if writeout and int_byte != io[5].get():
xmlmc.ps_setvalue(dev[0], io[0], io[5].get()) xmlmc.ps_setvalue(dev, io[0], io[5].get())
else: else:
io[5].set(int_byte) io[5].set(int_byte)
# Werte per Multicall schreiben # Werte per Multicall schreiben
if writeout: if writeout:
with self.lk: with self.lk:
xmlmc() self.validatereturn(xmlmc())
if self.autorw.get(): if self.autorw.get():
self.master.after(200, self._workvalues) self.master.after(200, self._workvalues)
def hideallwindows(self): def hideallwindows(self):
for win in self.lst_wins: u"""Versteckt alle Fenster."""
win.withdraw() for win in self.dict_wins:
self.dict_wins[win].withdraw()
def readvalues(self): def readvalues(self):
u"""Ruft nur Input Werte von RevPi ab und aktualisiert Fenster."""
if not self.autorw.get(): if not self.autorw.get():
self._workvalues([self.dict_inps]) self._workvalues([self.dict_inps])
def refreshvalues(self): def refreshvalues(self):
u"""Ruft alle IO Werte von RevPi ab und aktualisiert Fenster."""
if not self.autorw.get(): if not self.autorw.get():
self._workvalues() self._workvalues()
def toggleauto(self): def toggleauto(self):
u"""Schaltet zwischen Autorefresh um und aktualisiert Widgets."""
stateval = "disabled" if self.autorw.get() else "normal" stateval = "disabled" if self.autorw.get() else "normal"
self.btn_refresh["state"] = stateval self.btn_refresh["state"] = stateval
self.btn_read["state"] = stateval self.btn_read["state"] = stateval
self.btn_write["state"] = stateval self.btn_write["state"] = stateval
self.chk_dowrite["state"] = "normal" if self.xmlmode >= 3 \
and self.autorw.get() else "disabled"
if self.autorw.get(): if self.autorw.get():
self._workvalues() self._workvalues()
else:
self.dowrite.set(False)
def togglewrite(self):
u"""Schaltet zwischen DoWrite um und aktiviert Schreibfunktion."""
if self._warnwrite():
self.refreshvalues()
else:
self.dowrite.set(False)
def validatereturn(self, returnlist):
u"""Überprüft die Rückgaben der setvalue Funktion.
@param returnlist: list() der xml Rückgabe"""
if type(returnlist[0]) != list:
returnlist = [returnlist]
str_errmsg = ""
for lst_result in returnlist:
# [device, io, status, msg]
if not lst_result[2]:
# Fehlermeldungen erstellen
devicename = self.dict_devices[lst_result[0]]
str_errmsg += _(
"Error set value of device '{}' Output '{}': {} \n"
).format(devicename, lst_result[1], lst_result[3])
if str_errmsg != "":
tkmsg.showerror(_("Error"), str_errmsg)
def writevalues(self): def writevalues(self):
if not self.autorw.get(): u"""Schreibt geänderte Outputs auf den RevPi."""
if self._warnwrite() and not self.autorw.get():
self._workvalues([self.dict_outs], True) self._workvalues([self.dict_outs], True)
# Testdrive
if __name__ == "__main__":
cli = ServerProxy("http://192.168.50.35:55123")
cli.psstart()
tk = tkinter.Tk()
RevPiCheckClient(tk, cli, 3)
tk.mainloop()

View File

@@ -646,7 +646,7 @@ class RevPiProgram(tkinter.Frame):
if fname == rscfile: if fname == rscfile:
continue continue
# TODO: Fehlerabfang bei Dateilesen # FIXME: Fehlerabfang bei Dateilesen
with open(fname, "rb") as fh: with open(fname, "rb") as fh:
# Dateinamen ermitteln # Dateinamen ermitteln
@@ -719,9 +719,3 @@ class RevPiProgram(tkinter.Frame):
# Temp-Dir aufräumen # Temp-Dir aufräumen
if dirtmp is not None: if dirtmp is not None:
rmtree(dirtmp) rmtree(dirtmp)
if __name__ == "__main__":
root = tkinter.Tk()
myapp = RevPiProgram(root, None, "test")
root.mainloop()

View File

@@ -1,13 +1,14 @@
#!/usr/bin/python3 #!/usr/bin/python3
# #
# RevPiPyControl # RevPiPyControl
# Version: 0.4.1 # Version: see global var pycontrolverion
# #
# Webpage: https://revpimodio.org/revpipyplc/ # Webpage: https://revpimodio.org/revpipyplc/
# (c) Sven Sager, License: LGPLv3 # (c) Sven Sager, License: LGPLv3
# #
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
import revpicheckclient import revpicheckclient
import revpiinfo
import revpilogfile import revpilogfile
import revpioption import revpioption
import revpiplclist import revpiplclist
@@ -15,6 +16,7 @@ import revpiprogram
import socket import socket
import tkinter import tkinter
import tkinter.messagebox as tkmsg import tkinter.messagebox as tkmsg
import webbrowser
from functools import partial from functools import partial
from mytools import addroot, gettrans from mytools import addroot, gettrans
from xmlrpc.client import ServerProxy from xmlrpc.client import ServerProxy
@@ -22,6 +24,8 @@ from xmlrpc.client import ServerProxy
# Übersetzung laden # Übersetzung laden
_ = gettrans() _ = gettrans()
pycontrolversion = "0.4.1"
class RevPiPyControl(tkinter.Frame): class RevPiPyControl(tkinter.Frame):
@@ -29,6 +33,7 @@ class RevPiPyControl(tkinter.Frame):
u"""Init RevPiPyControl-Class. u"""Init RevPiPyControl-Class.
@param master: tkinter master""" @param master: tkinter master"""
super().__init__(master) super().__init__(master)
self.master.protocol("WM_DELETE_WINDOW", self._closeapp)
self.pack(fill="both", expand=True) self.pack(fill="both", expand=True)
self.cli = None self.cli = None
@@ -74,8 +79,15 @@ class RevPiPyControl(tkinter.Frame):
self.tkprogram.destroy() self.tkprogram.destroy()
if self.debugframe is not None: if self.debugframe is not None:
self.debugframe.destroy() self.debugframe.destroy()
self.cli.psstop()
self.debugframe = None self.debugframe = None
def _closeapp(self, event=None):
u"""Räumt auf und beendet Programm.
@param event: tkinter Event"""
self._closeall()
self.master.destroy()
def _createwidgets(self): def _createwidgets(self):
u"""Erstellt den Fensterinhalt.""" u"""Erstellt den Fensterinhalt."""
# Hauptfenster # Hauptfenster
@@ -104,7 +116,6 @@ class RevPiPyControl(tkinter.Frame):
label=_("Visit website..."), command=self.visitwebsite) label=_("Visit website..."), command=self.visitwebsite)
menu1.add_separator() menu1.add_separator()
menu1.add_command(label=_("Info..."), command=self.infowindow) menu1.add_command(label=_("Info..."), command=self.infowindow)
# TODO: Menü einbauen
self.mbar.add_cascade(label=_("Help"), menu=menu1) self.mbar.add_cascade(label=_("Help"), menu=menu1)
self.var_conn = tkinter.StringVar(self) self.var_conn = tkinter.StringVar(self)
@@ -199,8 +210,14 @@ class RevPiPyControl(tkinter.Frame):
self.mbar.entryconfig("PLC", state="normal") self.mbar.entryconfig("PLC", state="normal")
def infowindow(self): def infowindow(self):
# TODO: Infofenster aufrufen u"""Öffnet das Fenster für die Verbindungen."""
pass win = tkinter.Toplevel(self)
revpiinfo.RevPiInfo(win)
win.focus_set()
win.grab_set()
self.wait_window(win)
self.dict_conn = revpiplclist.get_connections()
self._fillconnbar()
def plcdebug(self): def plcdebug(self):
u"""Baut den Debugframe und packt ihn.""" u"""Baut den Debugframe und packt ihn."""
@@ -362,8 +379,9 @@ class RevPiPyControl(tkinter.Frame):
self.master.after(1000, self.tmr_plcrunning) self.master.after(1000, self.tmr_plcrunning)
def visitwebsite(self): def visitwebsite(self):
# TODO: Webseite besuchen u"""Öffnet auf dem System einen Webbrowser zur Projektseite."""
pass webbrowser.open("https://revpimodio.org")
if __name__ == "__main__": if __name__ == "__main__":
root = tkinter.Tk() root = tkinter.Tk()