// $Id$
//
// Copyright (C) 2007
-// Fraunhofer Institute for Open Communication Systems (FOKUS)
-// Competence Center NETwork research (NET), St. Augustin, GERMANY
+// 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
/** \file
\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 <boost/cstdint.hpp>
-#include <linux/dvb/frontend.h>
-#include "../../../Socket/BufferingPolicy.hh"
+#include <linux/dvb/frontend.h>
#include "../../../Socket/FramingPolicy.hh"
#include "../../../Socket/CommunicationPolicy.hh"
#include "../../../Socket/ReadWritePolicy.hh"
/// @{
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 xxx
+ /** \brief SocketProtocol for the dvb frontend device
+
+ 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(boost::uint8_t adapter=0, boost::uint8_t device=0) 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