Statistics
| Branch: | Tag: | Revision:

root / usrp / host / lib / inband / usrp_tx.h @ dd59e08d

History | View | Annotate | Download (1.4 kB)

1 b644e266 eb
/* -*- c++ -*- */
2 b644e266 eb
/*
3 b644e266 eb
 * Copyright 2007 Free Software Foundation, Inc.
4 b644e266 eb
 * 
5 b644e266 eb
 * This file is part of GNU Radio
6 b644e266 eb
 * 
7 b644e266 eb
 * GNU Radio is free software; you can redistribute it and/or modify
8 b644e266 eb
 * it under the terms of the GNU General Public License as published by
9 b644e266 eb
 * the Free Software Foundation; either version 3, or (at your option)
10 b644e266 eb
 * any later version.
11 b644e266 eb
 * 
12 b644e266 eb
 * GNU Radio is distributed in the hope that it will be useful,
13 b644e266 eb
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 b644e266 eb
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15 b644e266 eb
 * GNU General Public License for more details.
16 b644e266 eb
 * 
17 b644e266 eb
 * You should have received a copy of the GNU General Public License along
18 b644e266 eb
 * with this program; if not, write to the Free Software Foundation, Inc.,
19 b644e266 eb
 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
20 b644e266 eb
 */
21 b644e266 eb
#ifndef INCLUDED_USRP_TX_H
22 b644e266 eb
#define INCLUDED_USRP_TX_H
23 b644e266 eb
24 b644e266 eb
#include <mb_mblock.h>
25 b644e266 eb
#include <fstream>
26 b644e266 eb
27 b644e266 eb
class usrp_standard_tx;
28 b644e266 eb
29 b644e266 eb
/*!
30 b644e266 eb
 * \brief Implements the low level usb interface to the USRP
31 b644e266 eb
 */
32 b644e266 eb
class usrp_tx : public mb_mblock
33 b644e266 eb
{
34 b644e266 eb
  mb_port_sptr                d_cs;
35 b644e266 eb
  usrp_standard_tx     *d_utx;
36 b644e266 eb
  
37 b644e266 eb
  bool d_disk_write;
38 b644e266 eb
  std::ofstream d_ofile;
39 b644e266 eb
  std::ofstream d_cs_ofile;
40 b644e266 eb
  
41 b644e266 eb
 public:
42 b644e266 eb
  usrp_tx(mb_runtime *rt, const std::string &instance_name, pmt_t user_arg);
43 b644e266 eb
  ~usrp_tx();
44 b644e266 eb
  void initial_transition();
45 b644e266 eb
  void handle_message(mb_message_sptr msg);
46 b644e266 eb
47 b644e266 eb
 private:
48 b644e266 eb
  void write(pmt_t data);
49 b644e266 eb
};
50 b644e266 eb
  
51 b644e266 eb
52 b644e266 eb
#endif /* INCLUDED_USRP_TX_H */