Note de ce sujet :
  • Moyenne : 0 (0 vote(s))
  • 1
  • 2
  • 3
  • 4
  • 5
EIS5 EIS6 EIS1 etc..
#8
> Mmmmmh ...
> Pour information, le forum domotique-EIB comporte aussi une partie
"Fichiers", aimablement garnie par ses membres,

Ah voilà, j'ai trouvé ESI11 Data Type “4-Octet Unsigned Value”14

Maintenant la question qui tue :-)

Comment décoder ? Selon le fichier read_knx_grp.pl que Alain nous à mis à
disposition (dans la partie garnie par ses membres :-) ), il décode ESI1
ESI5 et ESI6.

exemple ESI5 :

$knxval = hex($val[0]) * 256 + hex($val[1]);

if (($knxval & 0x8000) != 0) { $sign = 1; } else { $sign = 0; }
$exp = ($knxval >> 11) & 0x0f;
$mant = $knxval & 0x07ff;

if ($sign != 0) {
# 2-complement
$mant -= 1;
$mant = ($mant ^0x07ff) & 0x07ff;
}

$val = $mant * (2 ** $exp) * 0.01;

if ($sign != 0) { $val = -1 * $val; }


Comment je peux faire un pondre un chinois pareil pour ESI11 ?!? Sinon son
astuce fonctionne très bien !

Bonne journée

Chrystof


Messages dans ce sujet
EIS5 EIS6 EIS1 etc.. - par Chrystof - 18/02/2010, 10:59:30
EIS5 EIS6 EIS1 etc.. - par Mathieu Gallissot - 18/02/2010, 11:22:08
EIS5 EIS6 EIS1 etc.. - par Cyrille Demaret - 18/02/2010, 11:22:44
EIS5 EIS6 EIS1 etc.. - par Chrisophe Bruchez - 18/02/2010, 12:07:41
EIS5 EIS6 EIS1 etc.. - par Energy01 - 18/02/2010, 13:31:56
EIS5 EIS6 EIS1 etc.. - par Chrisophe Bruchez - 18/02/2010, 13:38:39
EIS5 EIS6 EIS1 etc.. - par marc.assin - 18/02/2010, 13:43:59
EIS5 EIS6 EIS1 etc.. - par Chrisophe Bruchez - 18/02/2010, 14:01:38
EIS5 EIS6 EIS1 etc.. - par DaGGeR - 19/02/2010, 13:08:59
EIS5 EIS6 EIS1 etc.. - par marc.assin - 19/02/2010, 13:50:30
EIS5 EIS6 EIS1 etc.. - par Pascal - 19/02/2010, 18:43:30
EIS5 EIS6 EIS1 etc.. - par alain - 19/02/2010, 21:27:17
EIS5 EIS6 EIS1 etc.. - par jef2000 - 19/02/2010, 21:43:52
EIS5 EIS6 EIS1 etc.. - par alain - 19/02/2010, 23:16:58
EIS5 EIS6 EIS1 etc.. - par Chrisophe Bruchez - 22/02/2010, 07:45:01

Atteindre :


Utilisateur(s) parcourant ce sujet : 1 visiteur(s)