python_huw_code
Unterschiede
Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
| Beide Seiten der vorigen RevisionVorhergehende ÜberarbeitungNächste Überarbeitung | Vorhergehende Überarbeitung | ||
| python_huw_code [2015/09/12 21:44] – [Module] 192.168.1.68 | python_huw_code [2022/01/09 14:41] (aktuell) – Externe Bearbeitung 127.0.0.1 | ||
|---|---|---|---|
| Zeile 2: | Zeile 2: | ||
| ===== Modules ===== | ===== Modules ===== | ||
| ==== Init ==== | ==== Init ==== | ||
| + | - init variables | ||
| + | - init classes | ||
| + | - calls all inits direct available | ||
| + | - init or open db | ||
| ==== read parameter ==== | ==== read parameter ==== | ||
| + | - need file and db | ||
| + | - check availability of parameter file | ||
| + | - read file into classes | ||
| + | - log all read values into db | ||
| ==== notification ==== | ==== notification ==== | ||
| + | - send email | ||
| + | - log into db | ||
| + | - if error in send or db write, try to log to file | ||
| ==== logging ==== | ==== logging ==== | ||
| + | - write to db | ||
| + | - in case of error use Notification | ||
| ==== check ==== | ==== check ==== | ||
| ==== measure ==== | ==== measure ==== | ||
| - | ===== environments | + | ===== Environments |
| - | - code lib | + | ==== Code lib ==== |
| - | - dev | + | ==== Dev ==== |
| - | - prod | + | ==== Prod ==== |
| ===== principles ===== | ===== principles ===== | ||
| ==== Error management ==== | ==== Error management ==== | ||
| + | - check # of parameter of calls | ||
| + | - check length, range, values of calls | ||
| + | - use < | ||
| + | - use one global Exit procedure | ||
| ==== module test ==== | ==== module test ==== | ||
| ==== literals ==== | ==== literals ==== | ||
| Zeile 24: | Zeile 41: | ||
| * Procedures | * Procedures | ||
| ==== used abbreviations==== | ==== used abbreviations==== | ||
| + | - corr: correction | ||
| - idx: index | - idx: index | ||
| - hum: humidity | - hum: humidity | ||
| - no: number | - no: number | ||
| - temp: temperature | - temp: temperature | ||
| + | - txt: text | ||
| - | ==== used variables ==== | + | ==== Variables ==== |
| - | - f: file | + | === Principles === |
| + | - avoid " | ||
| + | |||
| + | === Used Variables | ||
| + | |||
| + | |||
| + | - cnt: counter | ||
| + | - data: bin data | ||
| + | - db: database handle | ||
| + | - e: error | ||
| + | - f: file handle | ||
| - i: counter | - i: counter | ||
| - l: line | - l: line | ||
| - r: range | - r: range | ||
| + | - row: db row | ||
| - s: sensor | - s: sensor | ||
| + | - t: text string | ||
| + | - ta: time ASCII | ||
| + | - ti: time integer | ||
| ==== OS ==== | ==== OS ==== | ||
| + | - only linux | ||
| ==== Python ==== | ==== Python ==== | ||
| + | - 2.7 | ||
python_huw_code.1442087095.txt.gz · Zuletzt geändert: (Externe Bearbeitung)
