<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=utf-8"><meta name=Generator content="Microsoft Word 15 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman",serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
span.apple-tab-span
{mso-style-name:apple-tab-span;}
span.apple-converted-space
{mso-style-name:apple-converted-space;}
span.apple-style-span
{mso-style-name:apple-style-span;}
span.E-MailFormatvorlage20
{mso-style-type:personal-reply;
font-family:"Calibri",sans-serif;
color:#1F497D;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:70.85pt 70.85pt 2.0cm 70.85pt;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=DE link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US'>Danke für die schnellen Antworten!<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US'>@Matthias:<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US'>Ok, werden den Code anpassen und das dann mal so versuchen<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US'>@Andreas:<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US'>Danke für die Aufklärung ;)<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US'>Ich will genauer wissen wann ein Impuls kam. Ein PAC4200 sendet mir etwa zwischen 1 und 7 Impulsen je Sekunde. Ich will also genauer wissen, wann die 7 Impulse kamen. Also in den ersten 700ms oder eher gegen Ende des Sekundenintervalls (300 – 1000ms).<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US'>Gruß<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US'>Marius<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US'><o:p> </o:p></span></p><div><div style='border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm'><p class=MsoNormal><b><span style='font-size:11.0pt;font-family:"Calibri",sans-serif'>Von:</span></b><span style='font-size:11.0pt;font-family:"Calibri",sans-serif'> volkszaehler-users [mailto:volkszaehler-users-bounces@demo.volkszaehler.org] <b>Im Auftrag von </b>Matthias Behr<br><b>Gesendet:</b> Sonntag, 29. November 2015 21:10<br><b>An:</b> volkszaehler.org - users <volkszaehler-users@demo.volkszaehler.org><br><b>Betreff:</b> Re: [vz-users] S0-Impulse Interval verkürzen<o:p></o:p></span></p></div></div><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Hallo,<o:p></o:p></p><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>du müsstest den Code ändern: (aus MeterS0.cpp) <o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><div><p class=MsoNormal><span lang=EN-IE>ssize_t MeterS0::read(std::vector<Reading> &rds, size_t n) {<o:p></o:p></span></p></div><div><p class=MsoNormal><span lang=EN-IE><o:p> </o:p></span></p></div><div><p class=MsoNormal><span class=apple-tab-span><span lang=EN-IE> </span></span><span lang=EN-IE>ssize_t ret = 0;<o:p></o:p></span></p></div><div><p class=MsoNormal><span lang=EN-IE><o:p> </o:p></span></p></div><div><p class=MsoNormal><span class=apple-tab-span><span lang=EN-IE> </span></span><span lang=EN-IE>if (!_hwif) return 0;<o:p></o:p></span></p></div><div><p class=MsoNormal><span class=apple-tab-span><span lang=EN-IE> </span></span><span lang=EN-IE>if (n<4) return 0; // would be worth a debug msg!<o:p></o:p></span></p></div><div><p class=MsoNormal><span lang=EN-IE><o:p> </o:p></span></p></div><div><p class=MsoNormal><span class=apple-tab-span><span lang=EN-IE> </span></span><span lang=EN-IE>// wait till last+1s (even if we are already later)<o:p></o:p></span></p></div><div><p class=MsoNormal><span class=apple-tab-span><span lang=EN-IE> </span></span><span lang=EN-IE>struct timespec req = _time_last_read;<o:p></o:p></span></p></div><div><p class=MsoNormal><span class=apple-tab-span><span lang=EN-IE> </span></span><span lang=EN-IE>// (or even more seconds if !send_zero<o:p></o:p></span></p></div><div><p class=MsoNormal><span lang=EN-IE><o:p> </o:p></span></p></div><div><p class=MsoNormal><span class=apple-tab-span><span lang=EN-IE> </span></span><span lang=EN-IE>unsigned int t_imp;<o:p></o:p></span></p></div><div><p class=MsoNormal><span class=apple-tab-span><span lang=EN-IE> </span></span><span lang=EN-IE>unsigned int t_imp_neg;<o:p></o:p></span></p></div><div><p class=MsoNormal><span class=apple-tab-span><span lang=EN-IE> </span></span><span lang=EN-IE>bool is_zero = true;<o:p></o:p></span></p></div><div><p class=MsoNormal><span class=apple-tab-span><span lang=EN-IE> </span></span><span lang=EN-IE>do{<o:p></o:p></span></p></div><div><p class=MsoNormal><span class=apple-tab-span><span lang=EN-IE> </span></span>req.tv_sec += 1;<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>statt req.tv_sec +=1; müsstest du<o:p></o:p></p></div><div><p class=MsoNormal><span lang=EN-IE>timespec_add_ms( req, 100); <o:p></o:p></span></p></div><div><p class=MsoNormal><span lang=EN-IE>machen.<o:p></o:p></span></p></div><div><p class=MsoNormal><span lang=EN-IE><o:p> </o:p></span></p></div><div><p class=MsoNormal><span lang=EN-IE><o:p> </o:p></span></p></div><div><blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'><div><p class=MsoNormal>Am 29.11.2015 um 20:33 schrieb Marius Brahm <<a href="mailto:marius.brahm@gmx.de">marius.brahm@gmx.de</a>>:<o:p></o:p></p></div><p class=MsoNormal><o:p> </o:p></p><div><div><p class=MsoNormal><b><span style='font-size:11.0pt;font-family:"Calibri",sans-serif'>Von:</span></b><span class=apple-converted-space><span style='font-size:11.0pt;font-family:"Calibri",sans-serif'> </span></span><span style='font-size:11.0pt;font-family:"Calibri",sans-serif'>volkszaehler-users [</span><a href="mailto:volkszaehler-users-bounces@demo.volkszaehler.org"><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:purple'>mailto:volkszaehler-users-bounces@demo.volkszaehler.org</span></a><span style='font-size:11.0pt;font-family:"Calibri",sans-serif'>]<span class=apple-converted-space> </span><b>Im Auftrag von<span class=apple-converted-space> </span></b>Andreas Goetz<br><b>Gesendet:</b><span class=apple-converted-space> </span>Freitag, 20. November 2015 11:34<br><b>An:</b><span class=apple-converted-space> </span></span><a href="http://volkszaehler.org/"><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:purple'>volkszaehler.org</span></a><span class=apple-converted-space><span style='font-size:11.0pt;font-family:"Calibri",sans-serif'> </span></span><span style='font-size:11.0pt;font-family:"Calibri",sans-serif'>- users <</span><a href="mailto:volkszaehler-users@demo.volkszaehler.org"><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:purple'>volkszaehler-users@demo.volkszaehler.org</span></a><span style='font-size:11.0pt;font-family:"Calibri",sans-serif'>><br><b>Betreff:</b><span class=apple-converted-space> </span>Re: [vz-users] S0-Impulse Interval verkürzen</span><o:p></o:p></p></div><div><p class=MsoNormal> <o:p></o:p></p></div><div><div style='margin-left:35.4pt'><p class=MsoNormal><span lang=EN-IE>Moin<o:p></o:p></span></p></div><div><div style='margin-left:35.4pt'><p class=MsoNormal><span lang=EN-IE> <o:p></o:p></span></p></div><div><div style='margin-left:35.4pt'><p class=MsoNormal><span lang=EN-IE>2015-11-20 11:30 GMT+01:00 Udo1 <</span><a href="mailto:udo1@gmx.net" target="_blank"><span lang=EN-IE style='color:purple'>udo1@gmx.net</span></a><span lang=EN-IE>>:<o:p></o:p></span></p></div><blockquote style='border:none;border-left:solid #CCCCCC 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-top:5.0pt;margin-right:0cm;margin-bottom:5.0pt'><div style='margin-left:35.4pt'><p class=MsoNormal>Am 20.11.2015 um 11:15 schrieb Brahm, Marius:<o:p></o:p></p></div><blockquote style='border:none;border-left:solid #CCCCCC 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-top:5.0pt;margin-right:0cm;margin-bottom:5.0pt'><div style='margin-left:35.4pt'><p class=MsoNormal>es sind etwa 20 St.<o:p></o:p></p></div></blockquote><div style='margin-left:35.4pt'><p class=MsoNormal>Betrifft wohl dieses Thema:<br><a href="https://github.com/volkszaehler/vzlogger/issues/206" target="_blank"><span style='color:purple'>https://github.com/volkszaehler/vzlogger/issues/206</span></a><br><br>Ich meine das ist schon erledigt. Vielleicht mal auf die neueste vzlogger-Version updaten:<o:p></o:p></p></div></blockquote><div><p class=MsoNormal style='mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:12.0pt;margin-left:35.4pt'><br>Es ist das Thema, aber auch mit der Lösung gibt es- wie geschrieben- nur 1 Timestamp pro Sekunde.<o:p></o:p></p><p class=MsoNormal style='margin-bottom:6.0pt'><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'>Vielen Dank für die Antworten!</span><o:p></o:p></p><p class=MsoNormal style='margin-bottom:6.0pt'><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'>Ich habe mich nun etwas in vzlogger und co eingelesen. Wenn ich den Code ändere, sollte es doch funktionieren.<span class=apple-converted-space> </span></span><o:p></o:p></p><p class=MsoNormal style='margin-bottom:6.0pt'><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'>Folgendes ist mir noch nicht ganz klar. Die Middleware frägt doch beim vzlogger (Controller) via http die Daten an. Das heißt die Häufigkeit der Anfragen sollte doch das Zeitintervall verkürzen, warum dann in vzlogger eingreifen, oder habe ich da etwas grundlegendes falsch verstanden?</span><o:p></o:p></p><p class=MsoNormal style='margin-bottom:6.0pt'><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'>Erst einmal vielleicht noch die allgemeine Frage ob man das mit einer „kleinen” Änderung vornehmen kann, oder ob das tiefer in die Struktur eingreift als gedacht.</span><o:p></o:p></p><p class=MsoNormal style='margin-bottom:6.0pt'><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'>Klar unter Buffer / MeterS0 / api und co ist einiges mit Intervall und Zeitstempeln. Gerade bei der MeterS0.cpp bin ich auf einen verdächtigen Wert gestoßen<span class=apple-converted-space> </span></span><o:p></o:p></p><p class=MsoNormal style='margin-bottom:6.0pt'><span lang=EN-IE style='font-size:11.0pt;font-family:"Courier New";color:#1F497D'>680: int rv = poll(&poll_fd, 1, 1000); // timeout set to 1s</span><span lang=EN-IE><o:p></o:p></span></p><p class=MsoNormal style='margin-bottom:6.0pt'><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'>Vielen Dank schon mal!</span><o:p></o:p></p><p class=MsoNormal style='margin-bottom:6.0pt'><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'>Gruß</span><o:p></o:p></p><p class=MsoNormal style='margin-bottom:6.0pt'><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'>Marius</span><o:p></o:p></p><p class=MsoNormal style='margin-bottom:12.0pt'><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'> </span><o:p></o:p></p></div><blockquote style='border:none;border-left:solid #CCCCCC 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-top:5.0pt;margin-right:0cm;margin-bottom:5.0pt'><div style='margin-left:35.4pt'><p class=MsoNormal><br>Gruß<br>Udo<o:p></o:p></p></div></blockquote></div><div style='margin-left:35.4pt'><p class=MsoNormal> <o:p></o:p></p></div></div><div><div style='margin-left:35.4pt'><p class=MsoNormal>Viele Grüße,<o:p></o:p></p></div></div><div><p class=MsoNormal style='mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:12.0pt;margin-left:35.4pt'>Andreas<o:p></o:p></p></div></div></div></blockquote></div><p class=MsoNormal><o:p> </o:p></p><div><div><div><p class=MsoNormal>Gruß<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>Matthias<o:p></o:p></p></div></div></div><p class=MsoNormal><o:p> </o:p></p></div></div></body></html>