3 * Copyright 2009 Free Software Foundation, Inc.
5 * This file is part of GNU Radio
7 * GNU Radio is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 3, or (at your option)
12 * GNU Radio is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License along
18 * with this program; if not, write to the Free Software Foundation, Inc.,
19 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
21 #ifndef INCLUDED_VRT_RX_PACKET_HANDLER_H
22 #define INCLUDED_VRT_RX_PACKET_HANDLER_H
24 #include <vrt/expanded_header.h>
30 * \brief Abstract function object called to handle received VRT packets.
32 * An object derived from this class is passed to vrt_rx_udp::rx_packets
33 * to process the received packets.
35 class rx_packet_handler {
37 virtual ~rx_packet_handler();
40 * \param payload points to the first 32-bit word of the payload field.
41 * \param n32_bit_words is the number of 32-bit words in the payload field.
42 * \param hdr is the expanded version of the mandatory and optional header fields (& trailer).
44 * \p payload points to the raw payload section of the packet received off
45 * the wire. The data is network-endian (aka big-endian) 32-bit integers.
47 * This is the general purpose, low level interface and relies on other
48 * functions to handle all required endian-swapping and format conversion
49 * of the payload. \sa FIXME.
51 * \returns true if the object wants to be called again with new data;
52 * false if no additional data is wanted.
54 virtual bool operator()(const uint32_t *payload,
56 const expanded_header *hdr);
62 #endif /* INCLUDED_VRT_RX_PACKET_HANDLER_H */