// $Id$
//
// Copyright (C) 2007
-// Fraunhofer Institut fuer offene Kommunikationssysteme (FOKUS)
-// Kompetenzzentrum fuer Satelitenkommunikation (SatCom)
-// Stefan Bund <stefan.bund@fokus.fraunhofer.de>
+// Fraunhofer Institute for Open Communication Systems (FOKUS)
+// Competence Center NETwork research (NET), St. Augustin, GERMANY
+// Thorsten Horstmann <tho@berlios.de>
//
// 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
// 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
/** \file
- \brief DVBHandles
- */
+ \brief DVBFrontendHandle public header */
-#ifndef HH_DVBFrontendHandle_
-#define HH_DVBFrontendHandle_ 1
+#ifndef HH_SENF_Socket_Protocols_DVB_DVBFrontendHandle_
+#define HH_SENF_Socket_Protocols_DVB_DVBFrontendHandle_ 1
// Custom includes
-#include "Socket/BufferingPolicy.hh"
-#include "Socket/FramingPolicy.hh"
-#include "Socket/CommunicationPolicy.hh"
-#include "Socket/ReadWritePolicy.hh"
-#include "Socket/ProtocolClientSocketHandle.hh"
-#include "Socket/SocketProtocol.hh"
-
-#include <linux/dvb/frontend.h>
+#include <boost/cstdint.hpp>
+#include <linux/dvb/frontend.h>
+#include "../../../Socket/FramingPolicy.hh"
+#include "../../../Socket/CommunicationPolicy.hh"
+#include "../../../Socket/ReadWritePolicy.hh"
+#include "../../../Socket/ProtocolClientSocketHandle.hh"
+#include "../../../Socket/SocketProtocol.hh"
//#include "DVBFrontendHandle.mpp"
///////////////////////////////hh.p////////////////////////////////////////
/// @{
typedef MakeSocketPolicy<
- NoAddressingPolicy,
+ NoAddressingPolicy,
DatagramFramingPolicy,
UnconnectedCommunicationPolicy,
NotReadablePolicy,
- NotWriteablePolicy,
- NoBufferingPolicy
- >::policy DVBFrontend_Policy; ///< Socket Policy for xxxx
+ NotWriteablePolicy
+ >::policy DVBFrontend_Policy; ///< Socket Policy for DVBFrontendSocketProtocol
+
+ /** \brief SocketProtocol for the dvb frontend device
- /** \brief xxx
+ The DVB frontend device controls the tuner and DVB demodulator hardware.
*/
- class DVBFrontendProtocol
- : public ConcreteSocketProtocol<DVBFrontend_Policy>
+ class DVBFrontendSocketProtocol
+ : public ConcreteSocketProtocol<DVBFrontend_Policy, DVBFrontendSocketProtocol>
{
public:
///////////////////////////////////////////////////////////////////////////
///\name Constructors
///@{
- void init_client() const; ///< xxx
+ void init_client(boost::uint8_t adapter=0, boost::uint8_t device=0) const;
+ ///< Opens the specified frontend device in read-only mode.
/**< \note This member is implicitly called from the
ProtocolClientSocketHandle::ProtocolClientSocketHandle()
constructor */
///@}
///\name Abstract Interface Implementation
-
- unsigned available() const;
- bool eof() const;
+ ///@{
- std::auto_ptr<SocketProtocol> clone() const;
+ unsigned available() const; ///< Returns always <tt>0</tt>
+ /**< Returns always <tt>0</tt>, since the DVB frontend
+ socket is not readable. */
+ bool eof() const; ///< Returns always <tt>false</tt>
+ /**< Returns always <tt>false</tt>, since the DVB frontend
+ socket does not support the notion of EOF. */
///@}
-
- void signalStrength(int16_t *strength) const;
+
+ int16_t signalStrength() const; ///< Returns current signal strength
+ /**< Returns the signal strength value for the signal
+ currently received by the front-end. For this method,
+ read-only access to the device is sufficient.*/
+
+ int16_t signalNoiseRatio() const;
+ ///< Returns current signal-to-noise ratio
+ /**< Returns the signal-to-noise ratio for the signal
+ currently received by the front-end. For this method,
+ read-only access to the device is sufficient. */
+
+ uint32_t bitErrorRate() const; ///< Returns the current bit error rate for the signal
+ /**< Returns the bit error rate for the signal currently
+ received/demodulated by the front-end. For this method,
+ read-only access to the device is sufficient. */
};
- typedef ProtocolClientSocketHandle<DVBFrontendProtocol> DVBFrontendHandle;
+ typedef ProtocolClientSocketHandle<DVBFrontendSocketProtocol> DVBFrontendHandle;
+ ///@}
}
//#include "DVBFrontendHandle.cti"
#endif
-\f
+
// Local Variables:
// mode: c++
// fill-column: 100