dvrHandle.read( ts_packet.data() );
// Check TS error conditions: sync_byte, transport_error_indicator, scrambling_control.
- if ( (ts_packet->sync_byte() != TRANSPORT_PACKET_SYNC_BYTE) ||
+ if ( (ts_packet->sync_byte() != senf::TransportPacketType::SYNC_BYTE) ||
(ts_packet->transport_error_indicator() == true) ||
(ts_packet->transport_scrmbl_ctrl() != 0))
{
###########################################################################
-SENFSCons.Binary(env, 'sniffer', SENFSCons.GlobSources(),
- LIBS = [ 'Scheduler', 'Packets', 'Socket', 'Utils' ],
- OBJECTS = [ '#/Packets/DefaultBundle/DefaultBundle.o',
- '#/Packets/MPEGDVBBundle/MPEGDVBBundle.o' ])
+SENFSCons.Binary(env, 'sniffer', SENFSCons.GlobSources(), LIBS = [
+ 'Packets_DefaultBundle', 'Packets_MPEGDVBBundle',
+ 'Scheduler', 'Packets', 'Socket', 'Utils' ])
SENFSCons.Doxygen(env)
using mixin::initSize;
static void dump(packet p, std::ostream & os);
+ static const byte SYNC_BYTE = 0x47;
};
/** \brief Transport packet typedef */
- typedef TransportPacketType::packet TransportPacket;
-
- #define TRANSPORT_PACKET_SYNC_BYTE 0x47
-
+ typedef ConcretePacket<TransportPacketType> TransportPacket;
}
senf::TransportPacket p (senf::TransportPacket::create(data));
- BOOST_CHECK_EQUAL( p->sync_byte(), TRANSPORT_PACKET_SYNC_BYTE );
- BOOST_CHECK( ! p->transport_error_indicator() );
- BOOST_CHECK( p->pusi() );
- BOOST_CHECK( ! p->transport_priority() );
- BOOST_CHECK_EQUAL( p->pid(), 0x010fu );
- BOOST_CHECK_EQUAL( p->transport_scrmbl_ctrl(), 0x0u );
- BOOST_CHECK_EQUAL( p->adaptation_field_ctrl(), 0x1u );
- BOOST_CHECK_EQUAL( p->continuity_counter(), 0x0eu );
+ BOOST_CHECK_EQUAL( p->sync_byte(), TransportPacketType::SYNC_BYTE );
+ BOOST_CHECK( ! p->transport_error_indicator() );
+ BOOST_CHECK( p->pusi() );
+ BOOST_CHECK( ! p->transport_priority() );
+ BOOST_CHECK_EQUAL( p->pid(), 0x010fu );
+ BOOST_CHECK_EQUAL( p->transport_scrmbl_ctrl(), 0x0u );
+ BOOST_CHECK_EQUAL( p->adaptation_field_ctrl(), 0x1u );
+ BOOST_CHECK_EQUAL( p->continuity_counter(), 0x0eu );
}
///////////////////////////////cc.e////////////////////////////////////////
/// \addtogroup protocol_facets_group
/// @{
- /** xxx
+ /** \todo Document me!
*/
class DVBDemuxSocketProtocol
: public virtual SocketProtocol
{
public:
- void setBufferSize(unsigned long size) const;
-
+ void setBufferSize(unsigned long size) const;
+ ///< set the size of the circular buffer used for filtered data.
+ /**< The default size is two maximum sized sections, i.e. if this
+ function is not called a buffer size of 2 * 4096 bytes will
+ be used.
+ \param[in] size Size of circular buffer. */
void startFiltering() const;
void stopFiltering() const;
prefix_ void senf::ConnectedUNDatagramSocketProtocol::init_client() const
{
- int sock = ::socket(PF_UNIX,SOCK_DGRAM,0);
+ int sock = ::socket(PF_UNIX, SOCK_DGRAM, 0);
if (sock < 0)
throw SystemException( "Could not create socket(PF_UNIX,SOCK_DGRAM,0)." );
- fd(sock);
+ fd(sock);
}
prefix_ void senf::ConnectedUNDatagramSocketProtocol::init_client(UNSocketAddress const & address) const
for (; i != i_end; ++i) {
stream_ << timestamp << sep;
+ stream_ << "[" << LEVELNAMES_[level] << "]";
if (area != "senf::log::DefaultArea")
- stream_ << "[" << area << "]";
- stream_ << "[" << LEVELNAMES_[level] << "] ";
+ stream_ << "[" << area << "] ";
stream_ << *i << "\n";
sep = '-';
}