aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/usrp/dboard_base.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'host/lib/usrp/dboard_base.cpp')
-rw-r--r--host/lib/usrp/dboard_base.cpp77
1 files changed, 45 insertions, 32 deletions
diff --git a/host/lib/usrp/dboard_base.cpp b/host/lib/usrp/dboard_base.cpp
index 612392b69..eb9bfe880 100644
--- a/host/lib/usrp/dboard_base.cpp
+++ b/host/lib/usrp/dboard_base.cpp
@@ -15,83 +15,96 @@ using namespace uhd::usrp;
/***********************************************************************
* dboard_base dboard dboard_base class
**********************************************************************/
-struct dboard_base::impl{
+struct dboard_base::impl
+{
dboard_ctor_args_t args;
};
-dboard_base::dboard_base(ctor_args_t args){
- _impl = UHD_PIMPL_MAKE(impl, ());
+dboard_base::dboard_base(ctor_args_t args)
+{
+ _impl = UHD_PIMPL_MAKE(impl, ());
_impl->args = dboard_ctor_args_t::cast(args);
}
-std::string dboard_base::get_subdev_name(void){
+std::string dboard_base::get_subdev_name(void)
+{
return _impl->args.sd_name;
}
-dboard_iface::sptr dboard_base::get_iface(void){
+dboard_iface::sptr dboard_base::get_iface(void)
+{
return _impl->args.db_iface;
}
-dboard_id_t dboard_base::get_rx_id(void){
+dboard_id_t dboard_base::get_rx_id(void)
+{
return _impl->args.rx_eeprom.id;
}
-dboard_id_t dboard_base::get_tx_id(void){
+dboard_id_t dboard_base::get_tx_id(void)
+{
return _impl->args.tx_eeprom.id;
}
-dboard_eeprom_t dboard_base::get_rx_eeprom(void){
+dboard_eeprom_t dboard_base::get_rx_eeprom(void)
+{
return _impl->args.rx_eeprom;
}
-dboard_eeprom_t dboard_base::get_tx_eeprom(void){
+dboard_eeprom_t dboard_base::get_tx_eeprom(void)
+{
return _impl->args.tx_eeprom;
}
-property_tree::sptr dboard_base::get_rx_subtree(void){
+property_tree::sptr dboard_base::get_rx_subtree(void)
+{
return _impl->args.rx_subtree;
}
-property_tree::sptr dboard_base::get_tx_subtree(void){
+property_tree::sptr dboard_base::get_tx_subtree(void)
+{
return _impl->args.tx_subtree;
}
/***********************************************************************
* xcvr dboard dboard_base class
**********************************************************************/
-xcvr_dboard_base::xcvr_dboard_base(ctor_args_t args) : dboard_base(args){
- if (get_rx_id() == dboard_id_t::none()){
- throw uhd::runtime_error(str(boost::format(
- "cannot create xcvr board when the rx id is \"%s\""
- ) % dboard_id_t::none().to_pp_string()));
+xcvr_dboard_base::xcvr_dboard_base(ctor_args_t args) : dboard_base(args)
+{
+ if (get_rx_id() == dboard_id_t::none()) {
+ throw uhd::runtime_error(
+ str(boost::format("cannot create xcvr board when the rx id is \"%s\"")
+ % dboard_id_t::none().to_pp_string()));
}
- if (get_tx_id() == dboard_id_t::none()){
- throw uhd::runtime_error(str(boost::format(
- "cannot create xcvr board when the tx id is \"%s\""
- ) % dboard_id_t::none().to_pp_string()));
+ if (get_tx_id() == dboard_id_t::none()) {
+ throw uhd::runtime_error(
+ str(boost::format("cannot create xcvr board when the tx id is \"%s\"")
+ % dboard_id_t::none().to_pp_string()));
}
}
/***********************************************************************
* rx dboard dboard_base class
**********************************************************************/
-rx_dboard_base::rx_dboard_base(ctor_args_t args) : dboard_base(args){
- if (get_tx_id() != dboard_id_t::none()){
- throw uhd::runtime_error(str(boost::format(
- "cannot create rx board when the tx id is \"%s\""
- " -> expected a tx id of \"%s\""
- ) % get_tx_id().to_pp_string() % dboard_id_t::none().to_pp_string()));
+rx_dboard_base::rx_dboard_base(ctor_args_t args) : dboard_base(args)
+{
+ if (get_tx_id() != dboard_id_t::none()) {
+ throw uhd::runtime_error(
+ str(boost::format("cannot create rx board when the tx id is \"%s\""
+ " -> expected a tx id of \"%s\"")
+ % get_tx_id().to_pp_string() % dboard_id_t::none().to_pp_string()));
}
}
/***********************************************************************
* tx dboard dboard_base class
**********************************************************************/
-tx_dboard_base::tx_dboard_base(ctor_args_t args) : dboard_base(args){
- if (get_rx_id() != dboard_id_t::none()){
- throw uhd::runtime_error(str(boost::format(
- "cannot create tx board when the rx id is \"%s\""
- " -> expected a rx id of \"%s\""
- ) % get_rx_id().to_pp_string() % dboard_id_t::none().to_pp_string()));
+tx_dboard_base::tx_dboard_base(ctor_args_t args) : dboard_base(args)
+{
+ if (get_rx_id() != dboard_id_t::none()) {
+ throw uhd::runtime_error(
+ str(boost::format("cannot create tx board when the rx id is \"%s\""
+ " -> expected a rx id of \"%s\"")
+ % get_rx_id().to_pp_string() % dboard_id_t::none().to_pp_string()));
}
}