Project "Tuxbox-GIT: apps":

The branch, master has been updated
       via  fe3d32c7d4017a98a85147cefe5c425381768557 (commit)
      from  092be476b449689ce92db40e6bd620f48aaffc3a (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit fe3d32c7d4017a98a85147cefe5c425381768557
Author: GetAway <get-a...@t-online.de>
Date:   Sun Apr 12 17:23:46 2015 +0200

    controlAPI: introduce show signal strength
    
    Signed-off-by: GetAway <get-a...@t-online.de>

diff --git a/tuxbox/neutrino/daemons/nhttpd/doc/nhttpd_controlapi.html 
b/tuxbox/neutrino/daemons/nhttpd/doc/nhttpd_controlapi.html
index 7b38b97..dee0060 100644
--- a/tuxbox/neutrino/daemons/nhttpd/doc/nhttpd_controlapi.html
+++ b/tuxbox/neutrino/daemons/nhttpd/doc/nhttpd_controlapi.html
@@ -205,6 +205,11 @@
                http://dbox/control/reloadplugins</a></td>
        </tr>
        <tr>
+               <td>44. <a href="#signal">Signalst&auml;rke anzeigen</a></td>
+               <td><a href="http://dbox/control/signal";>
+               http://dbox/control/signal</a></td>
+       </tr>
+       <tr>
                <td>&nbsp;</td>
                <td>&nbsp;</td>
        </tr>
@@ -2114,7 +2119,7 @@ http://dbox:31339/0,0x0069,0x03ff,0x0400<br>
 <br>
 
 <!-- *********************************************************** -->
-<div class="title1"><a name="reloadplugins"></a>41. Plugins neu laden</div>
+<div class="title1"><a name="reloadplugins"></a>43. Plugins neu laden</div>
 <div class="URL">Handler: http://dbox/control/reloadplugins</div>
 <br>
 <b>Parameter:</b> keine<br>
@@ -2123,5 +2128,27 @@ http://dbox:31339/0,0x0069,0x03ff,0x0400<br>
 Die Pluginliste wird neu geladen.
 <br><br>
 
+<!-- *********************************************************** -->
+<div class="title1"><a name="signal"></a>44. Signalst&auml;rke zeigen</div>
+<div class="URL">Handler: http://dbox/control/signal</div>
+<br>
+<b>Parameter:</b> keine oder sig, snr, ber<br><br>
+<b>R&uuml;ckgabe</b>:<br>
+SIG: 100<br>
+SNR:  90<br>
+BER:  0<br>
+<br>
+Signalst&auml;rke SIG in %, SNR in % und BER wird ausgegeben.
+Wird ein spezieller Wert als Parameter angegeben, wird keine Beschreibung 
ausgegeben.
+<br>
+<div class="example">
+Beispiel:<br>
+<br>
+&gt;&gt;&gt;http://dbox/control/signal?sig<br>
+100<br>
+&nbsp;</div>
+<br>
+
+
 </body>
 </html>
diff --git a/tuxbox/neutrino/daemons/nhttpd/tuxboxapi/controlapi.cpp 
b/tuxbox/neutrino/daemons/nhttpd/tuxboxapi/controlapi.cpp
index 3529662..2205a53 100644
--- a/tuxbox/neutrino/daemons/nhttpd/tuxboxapi/controlapi.cpp
+++ b/tuxbox/neutrino/daemons/nhttpd/tuxboxapi/controlapi.cpp
@@ -146,6 +146,7 @@ const CControlAPI::TyCgiCall CControlAPI::yCgiCallList[]=
        {"epgsearch",           &CControlAPI::EpgSearchTXTCGI,  ""},
        {"epgsearchxml",        &CControlAPI::EpgSearchXMLCGI,  ""},
        {"zapto",               &CControlAPI::ZaptoCGI,         "text/plain"},
+       {"signal",              &CControlAPI::SignalInfoCGI,                    
"text/plain"},
        {"getonidsid",          &CControlAPI::GetChannel_IDCGI, "text/plain"},
        // boxcontrol - system
        {"standby",             &CControlAPI::StandbyCGI,       "text/plain"},
@@ -1790,6 +1791,43 @@ void CControlAPI::SendChannelList(CyhookHandler *hh)
 }
 
 //-----------------------------------------------------------------------------
+void CControlAPI::SignalInfoCGI(CyhookHandler *hh)
+{
+       CZapitClient::responseFESignal s;
+       NeutrinoAPI->Zapit->getFESignal(s);
+
+               bool parame_empty = false;
+
+               if (hh->ParamList["1"].empty())
+                       parame_empty = true;
+
+               if ( parame_empty || (hh->ParamList["1"] == "sig") ){
+                       signal.sig = s.sig & 0xFFFF;
+                       unsigned int sig = signal.sig * 100 / 65535;
+                       if (parame_empty)
+                               hh->printf("SIG: ");
+                       hh->printf("%3u\n", sig);
+               }
+               if ( parame_empty || (hh->ParamList["1"] == "snr") ){
+                       signal.snr = s.snr & 0xFFFF;
+                       unsigned int snr = signal.snr * 100 / 65535;
+                       if (parame_empty)
+                               hh->printf("SNR: ");
+                       hh->printf("%3u\n", snr);
+               }
+               if ( parame_empty || (hh->ParamList["1"] == "ber") ){
+                       signal.ber = (s.ber < 0x3FFFF) ? s.ber : 0x3FFFF;
+                       unsigned int ber = signal.ber / 2621;
+                       if ((signal.ber > 0) && (signal.ber < 2621))
+                               ber = 1;
+                       if (parame_empty)
+                               hh->printf("BER: ");
+                       hh->printf("%3u\n", ber);
+               }
+
+}
+
+//-----------------------------------------------------------------------------
 void CControlAPI::SendStreamInfo(CyhookHandler *hh)
 {
 
diff --git a/tuxbox/neutrino/daemons/nhttpd/tuxboxapi/controlapi.h 
b/tuxbox/neutrino/daemons/nhttpd/tuxboxapi/controlapi.h
index ddea0c6..a9979ee 100644
--- a/tuxbox/neutrino/daemons/nhttpd/tuxboxapi/controlapi.h
+++ b/tuxbox/neutrino/daemons/nhttpd/tuxboxapi/controlapi.h
@@ -28,6 +28,12 @@ private:
 
        int rc_send(int ev, unsigned int code, unsigned int value);
 
+       struct feSignal {
+               unsigned long sig;
+               unsigned long ber;
+               unsigned long snr;
+       } signal;
+
        // send functions for ExecuteCGI (controld api)
        void SendEventList(CyhookHandler *hh,t_channel_id channel_id);
        void SendFoundEvents(CyhookHandler *hh, bool xml_format = false);
@@ -100,6 +106,7 @@ private:
        void changeBouquetCGI(CyhookHandler *hh);
        void updateBouquetCGI(CyhookHandler *hh);
        void build_live_url(CyhookHandler *hh);
+       void SignalInfoCGI(CyhookHandler *hh);
 
 protected:
        static const unsigned int PLUGIN_DIR_COUNT = 5;

-----------------------------------------------------------------------

Summary of changes:
 .../daemons/nhttpd/doc/nhttpd_controlapi.html      |   29 ++++++++++++++-
 .../daemons/nhttpd/tuxboxapi/controlapi.cpp        |   38 ++++++++++++++++++++
 .../neutrino/daemons/nhttpd/tuxboxapi/controlapi.h |    7 ++++
 3 files changed, 73 insertions(+), 1 deletions(-)


-- 
Tuxbox-GIT: apps

------------------------------------------------------------------------------
BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT
Develop your own process in accordance with the BPMN 2 standard
Learn Process modeling best practices with Bonita BPM through live exercises
http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual- event?utm_
source=Sourceforge_BPM_Camp_5_6_15&utm_medium=email&utm_campaign=VA_SF
_______________________________________________
Tuxbox-cvs-commits mailing list
Tuxbox-cvs-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tuxbox-cvs-commits

Reply via email to