12 #ifndef INCLUDED_LIBCYBERRADIO_VITAIQSOURCE_H_ 13 #define INCLUDED_LIBCYBERRADIO_VITAIQSOURCE_H_ 15 #include "LibCyberRadio/Common/Debuggable.h" 16 #include "LibCyberRadio/Common/Vita49Packet.h" 17 #include "LibCyberRadio/Common/VitaIqUdpPort.h" 18 #include <boost/thread.hpp> 28 typedef std::vector<Vita49Packet> Vita49PacketVector;
73 size_t payload_size = 8192,
74 size_t vita_header_size = 0,
75 size_t vita_tail_size = 0,
76 bool byte_swapped =
false,
77 bool iq_swapped =
false,
78 const std::string& host =
"0.0.0.0",
79 unsigned short port = 0,
93 virtual int getPackets(
int noutput_items, Vita49PacketVector& output_items);
151 void recalc_packet_size();
153 void connect_udp_port();
155 void disconnect_udp_port();
160 size_t d_payload_size;
161 size_t d_vita_header_size;
162 size_t d_vita_tail_size;
166 unsigned short d_port;
167 size_t d_packet_size;
168 VitaIqUdpPort* d_udp_port;
169 boost::mutex d_udp_port_mtx;
virtual int getPacketSize() const
Gets the VITA 49 or I/Q packet size.
size_t getPayloadSize() const
Gets the payload size.
virtual ~VitaIqSource()
Destroys a vita_iq_source object.
Class that supports debug output.
int getVitaType() const
Gets the VITA type.
size_t getVitaHeaderSize() const
Gets the VITA 49 frame header size.
virtual int debug(const char *format,...)
Outputs debug information.
bool isIqSwapped() const
Gets the I/Q-swapping state.
Defines functionality for LibCyberRadio applications.
VitaIqSource(const std::string &name="VitaIqSource", int vita_type=0, size_t payload_size=8192, size_t vita_header_size=0, size_t vita_tail_size=0, bool byte_swapped=false, bool iq_swapped=false, const std::string &host="0.0.0.0", unsigned short port=0, bool debug=false)
Creates a VitaIqSource object.
bool isByteSwapped() const
Gets the byte-swapping state.
size_t getVitaTailSize() const
Gets the VITA 49 frame trailer size.
virtual int getPacketsPayloadData(int noutput_items, void *buff)
Gets VITA 49 or I/Q data packets.
A generic VITA 49-compatible I/Q data source object.
virtual int getPackets(int noutput_items, Vita49PacketVector &output_items)
Gets VITA 49 or I/Q data packets.