USRP Hardware Driver and USRP Manual  Version: 003.008.002-0-ge9d11b35
UHD and USRP Manual
usrprio_rpc_client.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_CLIENT_HPP
19 #define INCLUDED_USRPRIO_RPC_CLIENT_HPP
20 
25 
26 namespace uhd { namespace usrprio_rpc {
27 
29 public:
31  std::string server,
32  std::string port);
34 
35  inline void set_rpc_timeout(boost::posix_time::milliseconds timeout_in_ms) {
36  _timeout = timeout_in_ms;
37  }
38 
40  return _ctor_status;
41  }
42 
43  nirio_status niusrprio_enumerate(
45  nirio_status niusrprio_open_session(
47  nirio_status niusrprio_close_session(
49  nirio_status niusrprio_reset_device(
51  nirio_status niusrprio_download_bitstream_to_fpga(
53  nirio_status niusrprio_get_interface_path(
55  nirio_status niusrprio_download_fpga_to_flash(
57 
58  static const boost::int64_t DEFAULT_TIMEOUT_IN_MS = 5000;
59 
60 private:
61  static nirio_status _boost_error_to_nirio_status(const boost::system::error_code& err);
62 
63  rpc_client _rpc_client;
64  boost::posix_time::milliseconds _timeout;
65  nirio_status _ctor_status;
66 };
67 
68 }}
69 
70 #endif /* INCLUDED_USRPRIO_RPC_CLIENT_HPP */
Definition: rpc_client.hpp:30
#define NIUSRPRIO_DOWNLOAD_FPGA_TO_FLASH_ARGS
Definition: usrprio_rpc_common.hpp:80
#define NIUSRPRIO_OPEN_SESSION_ARGS
Definition: usrprio_rpc_common.hpp:61
nirio_status get_ctor_status()
Definition: usrprio_rpc_client.hpp:39
#define UHD_API
Definition: config.hpp:79
Definition: convert.hpp:28
#define NIUSRPRIO_DOWNLOAD_BITSTREAM_TO_FPGA_ARGS
Definition: usrprio_rpc_common.hpp:73
int32_t nirio_status
Definition: status.h:31
#define NIUSRPRIO_RESET_SESSION_ARGS
Definition: usrprio_rpc_common.hpp:70
void set_rpc_timeout(boost::posix_time::milliseconds timeout_in_ms)
Definition: usrprio_rpc_client.hpp:35
#define NIUSRPRIO_CLOSE_SESSION_ARGS
Definition: usrprio_rpc_common.hpp:67
#define NIUSRPRIO_GET_INTERFACE_PATH_ARGS
Definition: usrprio_rpc_common.hpp:76
Definition: usrprio_rpc_client.hpp:28
#define NIUSRPRIO_ENUMERATE_ARGS
Definition: usrprio_rpc_common.hpp:58