USRP Hardware Driver and USRP Manual  Version: 003.008.002-0-ge9d11b35
UHD and USRP Manual
usrprio_rpc_common.hpp
Go to the documentation of this file.
1 //
2 // Copyright 2013 Ettus Research LLC
3 //
4 // This program is free software: you can redistribute it and/or modify
5 // it under the terms of the GNU General Public License as published by
6 // the Free Software Foundation, either version 3 of the License, or
7 // (at your option) any later version.
8 //
9 // This program is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 // GNU General Public License for more details.
13 //
14 // You should have received a copy of the GNU General Public License
15 // along with this program. If not, see <http://www.gnu.org/licenses/>.
16 //
17 
18 #ifndef INCLUDED_USRPRIO_RPC_COMMON_HPP
19 #define INCLUDED_USRPRIO_RPC_COMMON_HPP
20 
22 
23 namespace uhd { namespace usrprio_rpc {
24 
25 //Function IDs
26 
27 static const func_id_t NIUSRPRIO_FUNC_BASE = 0x100;
28 
29 static const func_id_t NIUSRPRIO_ENUMERATE = NIUSRPRIO_FUNC_BASE + 0;
30 static const func_id_t NIUSRPRIO_OPEN_SESSION = NIUSRPRIO_FUNC_BASE + 1;
31 static const func_id_t NIUSRPRIO_CLOSE_SESSION = NIUSRPRIO_FUNC_BASE + 2;
32 static const func_id_t NIUSRPRIO_RESET_SESSION = NIUSRPRIO_FUNC_BASE + 3;
33 static const func_id_t NIUSRPRIO_DOWNLOAD_BITSTREAM_TO_FPGA = NIUSRPRIO_FUNC_BASE + 4;
34 static const func_id_t NIUSRPRIO_GET_INTERFACE_PATH = NIUSRPRIO_FUNC_BASE + 5;
35 static const func_id_t NIUSRPRIO_DOWNLOAD_FPGA_TO_FLASH = NIUSRPRIO_FUNC_BASE + 6;
36 
37 //Function Args
38 
40  boost::uint32_t interface_num;
41  std::string resource_name;
42  std::string pcie_serial_num;
43  std::string interface_path;
44 
45  template <typename Archive>
46  void serialize(Archive& ar, const unsigned int version)
47  {
48  if (version || !version) { //Suppress unused warning
49  ar & interface_num;
50  ar & resource_name;
51  ar & pcie_serial_num;
52  ar & interface_path;
53  }
54  }
55 };
56 typedef std::vector<usrprio_device_info> usrprio_device_info_vtr;
57 
58 #define NIUSRPRIO_ENUMERATE_ARGS \
59  usrprio_device_info_vtr& device_info_vtr
60 
61 #define NIUSRPRIO_OPEN_SESSION_ARGS \
62  const std::string& resource, \
63  const std::string& path, \
64  const std::string& signature, \
65  const boost::uint16_t& download_fpga
66 
67 #define NIUSRPRIO_CLOSE_SESSION_ARGS \
68  const std::string& resource
69 
70 #define NIUSRPRIO_RESET_SESSION_ARGS \
71  const std::string& resource
72 
73 #define NIUSRPRIO_DOWNLOAD_BITSTREAM_TO_FPGA_ARGS \
74  const std::string& resource
75 
76 #define NIUSRPRIO_GET_INTERFACE_PATH_ARGS \
77  const std::string& resource, \
78  std::string& interface_path
79 
80 #define NIUSRPRIO_DOWNLOAD_FPGA_TO_FLASH_ARGS \
81  const std::string& resource, \
82  const std::string& bitstream_path
83 }}
84 
85 #endif /* INCLUDED_USRPRIO_RPC_COMMON_HPP */
Definition: usrprio_rpc_common.hpp:39
boost::uint32_t interface_num
Definition: usrprio_rpc_common.hpp:40
void serialize(Archive &ar, const unsigned int version)
Definition: usrprio_rpc_common.hpp:46
Definition: convert.hpp:28
std::string pcie_serial_num
Definition: usrprio_rpc_common.hpp:42
boost::int32_t func_id_t
Definition: rpc_common.hpp:38
std::vector< usrprio_device_info > usrprio_device_info_vtr
Definition: usrprio_rpc_common.hpp:56
std::string resource_name
Definition: usrprio_rpc_common.hpp:41
std::string interface_path
Definition: usrprio_rpc_common.hpp:43