Hauptmenü

Modul Regeln

Begonnen von ritchie, 21 Juli 2013, 09:16:37

Vorheriges Thema - Nächstes Thema

ritchie

Hallo Zusammen,

ich bin derzeit eine Modul für einen EHZ Zähler (Stromzähler) am schreiben, da die ersten Kabel bereits liegen :-).
Da ich das Modul nach den bestehenden Regeln von FHEM versuche zu erstellen, hier meine ersten Fragen dazu.

- Wie sind die Loglevel zu definieren ?
  1 = Kritsch
  2 = Error
  3 = Warning
  4 = .. Appl

use constant LOGCRITICALMESSAGE => 1;
use constant LOGERRORMESSAGE => 2;
use constant LOGWARNINGMESSAGE => 3;
use constant LOGAPPLICATIONMESSAGE => 4;
use constant LOGDIAGNOSEMESSAGE => 5;

Ich will hier eine Const im Header erstellen und dann in dem Modul entsprechend verwenden. Wäre auch was für die Develop Guides oder..

Gruss R.
IPU662  Ipfire & Fhem (Homematic + MAX) - Produktiv
Cubietruck (1Wire - USB) - Produktiv

rudolfkoenig


ritchie

Danke für die Info.

Also so

use constant LOG_SERVERSTARTSTOP_MESSAGE => 0;
use constant LOG_ERROR_MESSAGE => 1;
use constant LOG_MAJOR_MESSAGE => 2;
use constant LOG_COMMAND_MESSAGE => 3;
use constant LOG_RECEIVING_MESSAGE => 4;
use constant LOG_DIAGNOSE => 5;

Gruss R.
IPU662  Ipfire & Fhem (Homematic + MAX) - Produktiv
Cubietruck (1Wire - USB) - Produktiv