X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=senf%2FSocket%2FProtocols%2FDVB%2FDVBSocketController.hh;h=ed5d18c25ff0291dfeb19931e38137cccd19612f;hb=72cc548dfc3fa72d14d4d8c1a178f162165e933a;hp=92a684eec3d441116cd23b9ac0f828352014d738;hpb=9cb871b939efe93e35dd96808d25089399acfc46;p=senf.git diff --git a/senf/Socket/Protocols/DVB/DVBSocketController.hh b/senf/Socket/Protocols/DVB/DVBSocketController.hh index 92a684e..ed5d18c 100644 --- a/senf/Socket/Protocols/DVB/DVBSocketController.hh +++ b/senf/Socket/Protocols/DVB/DVBSocketController.hh @@ -2,23 +2,28 @@ // // Copyright (C) 2007 // Fraunhofer Institute for Open Communication Systems (FOKUS) -// Competence Center NETwork research (NET), St. Augustin, GERMANY -// Anton Gillert // -// This program is free software; you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation; either version 2 of the License, or -// (at your option) any later version. +// The contents of this file are subject to the Fraunhofer FOKUS Public License +// Version 1.0 (the "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// http://senf.berlios.de/license.html // -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. +// The Fraunhofer FOKUS Public License Version 1.0 is based on, +// but modifies the Mozilla Public License Version 1.1. +// See the full license text for the amendments. // -// You should have received a copy of the GNU General Public License -// along with this program; if not, write to the -// Free Software Foundation, Inc., -// 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// Software distributed under the License is distributed on an "AS IS" basis, +// WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License +// for the specific language governing rights and limitations under the License. +// +// The Original Code is Fraunhofer FOKUS code. +// +// The Initial Developer of the Original Code is Fraunhofer-Gesellschaft e.V. +// (registered association), Hansastraße 27 c, 80686 Munich, Germany. +// All Rights Reserved. +// +// Contributor(s): +// Anton Gillert #ifndef HH_SENF_Socket_Protocols_DVB_DVBSocketController_ @@ -30,14 +35,14 @@ #include "DVBFrontendHandle.hh" #include "DVBDemuxHandles.hh" #include "DVBConfigParser.hh" -#include "DVBProtocolWrapper.hh" -#include -#include - -#define MPE_TABLEID 62 +#include +#include +///////////////////////////////hh.p//////////////////////////////////////// namespace senf { +#define MPE_TABLEID 62 + /** \brief Helperclass for configuration and controlling DVB devices. The DVB API provides two methods for tuning. The first method is @@ -53,14 +58,11 @@ namespace senf { You have to find out which parts of these functionality are implemented by your preferred device driver by your own. */ - - - class DVBSocketController : boost::noncopyable { public: - senf::console::ScopedDirectory dir; + console::ScopedDirectory dir; typedef boost::function Callback; ///< Callback which is called when an asynchronous tuning succeeds. @@ -68,10 +70,10 @@ public: DVBSocketController(DVBFrontendHandle frontendHandle_ = DVBFrontendHandle(0,0), const Callback & cb = NULL); ~DVBSocketController(); - senf::DVBDemuxSectionHandle createDVBDemuxSectionHandle( int adapternumber=0, int demuxnumber=0, bool addToConsole=false ); - senf::DVBDemuxPESHandle createDVBDemuxPESHandle( int adapternumber=0, int demuxnumber=0, bool addToConsole=false ); + DVBDemuxSectionHandle createDVBDemuxSectionHandle( int adapternumber=0, int demuxnumber=0, bool addToConsole=false ); + DVBDemuxPESHandle createDVBDemuxPESHandle( int adapternumber=0, int demuxnumber=0, bool addToConsole=false ); - void addToConsole(senf::DVBDemuxSectionHandle sh); + void addToConsole(DVBDemuxSectionHandle sh); ///< Adds an DVBDemuxSectionHandle to the console /**< Allocates the functionality of DVBDemuxSectionProtocol into the folder of the DVBSocketController. If the @@ -79,7 +81,7 @@ public: console support will automatically removed. \param[in] sh handle of a protocol*/ - void addToConsole(senf::DVBDemuxPESHandle sh); + void addToConsole(DVBDemuxPESHandle sh); ///< Adds an DVBDemuxPESHandle to the console /**< Allocates the functionality of DVBDemuxPESProtocol into the folder of the DVBSocketController. If the protocol @@ -87,7 +89,7 @@ public: support will automatically removed. \param[in] sh handle of a protocol*/ - void tuneToCMD( const std::string & input, const std::string & mode = "async"); + void tuneToCMD(std::string const & input, std::string const & mode = "async"); ///< Tunes a DVB device given by the type of the DVBFrontendHandle /**< Tunes a DVB device by a channel name or complete configuration line. This method was created for use @@ -97,7 +99,7 @@ public: it would be searched in the config file. \param[in] mode The mode in which it will tune "sync" or "async"*/ - void tuneTo(const std::string & channel); + void tuneTo(std::string const & channel); ///< Tunes a DVB device to a channel /**< Tunes a DVB device to a channel whose parameters are stored in a config file. The method determines @@ -129,7 +131,7 @@ public: /**< Tunes a DVB-C device in asynchronous mode and calls the callback if existing. Needs full configuration. */ - dvb_frontend_event tuneTo_sync( const std::string & channel ); + dvb_frontend_event tuneTo_sync(std::string const & channel ); ///< Tunes a DVB device given by the type of the DVBFrontendHandle /**< Tunes a DVB device, given by the type of the DVBFrontendHandle, by a channel name in synchronous mode @@ -139,7 +141,7 @@ public: \note The member "dvb_frontend_event.status" should be correct by the most device driver implementations. But "dvb_frontend_event.parameters" maybe not and is - definitly not set by: Cinergy T� (2.6.27), + definitely not set by: Cinergy T� (2.6.27), Terratec Cinergy DT USB XS Diversity (2.6.27) */ dvb_frontend_event tuneDVB_S_sync(unsigned int frequency, fe_spectral_inversion_t inversion, unsigned int symbole_rate, fe_code_rate_t code_rate); @@ -149,7 +151,7 @@ public: \note The member "dvb_frontend_event.status" should be correct by the most device driver implementations. But "dvb_frontend_event.parameters" maybe not and is - definitly not set by: Cinergy T� (2.6.27), + definitely not set by: Cinergy T� (2.6.27), Terratec Cinergy DT USB XS Diversity (2.6.27) */ dvb_frontend_event tuneDVB_T_sync(unsigned int frequency, @@ -167,7 +169,7 @@ public: \note The member "dvb_frontend_event.status" should be correct by the most device driver implementations. But "dvb_frontend_event.parameters" maybe not and is - definitly not set by: Cinergy T� (2.6.27), + definitely not set by: Cinergy T� (2.6.27), Terratec Cinergy DT USB XS Diversity (2.6.27) */ dvb_frontend_event tuneDVB_C_sync(unsigned int frequency, @@ -179,7 +181,7 @@ public: \note The member "dvb_frontend_event.status" should be correct by the most device driver implementations. But "dvb_frontend_event.parameters" maybe not and is - definitly not set by: Cinergy T� (2.6.27), + definitely not set by: Cinergy T� (2.6.27), Terratec Cinergy DT USB XS Diversity (2.6.27) */ fe_type_t getType(); ///< Returns the type of the card. The type is defined in frontend.h @@ -216,10 +218,10 @@ public: std::string getTuneInfo(const std::string & conf ="Ssbuf"); ///< Returns a string which shows actual tuning status /**<
"S" prints signal strength (in hex) -
"s" prints singal to noise ration (in hex) +
"s" prints signal to noise ration (in hex)
"b" prints bit error rate (in hex)
"u" prints uncorrected blocks (in hex) -
"f" prints readable overal status e.g. "Has Lock"
+
"f" prints readable overall status e.g. "Has Lock"
These characters can be used to form the output. Be aware, some features may not be supported be your current driver implementation and could end in throwing @@ -232,10 +234,15 @@ private: static unsigned int controllerNr; unsigned int sectionNr; unsigned int pesNr; - senf::scheduler::FdEvent event; + scheduler::FdEvent event; void readEvent(int i); void initConsole(); }; } + +///////////////////////////////hh.e//////////////////////////////////////// +//#include "DVBSocketController.cci" +//#include "DVBSocketController.ct" +//#include "DVBSocketController.cti" #endif