mirror of
				https://github.com/RangeNetworks/openbts.git
				synced 2025-10-31 11:53:33 +00:00 
			
		
		
		
	Transceiver52M: UHD: Setup option to pass arguments from command line
UHD accepts optional 'args' that can be used for device descriptions such as IP address, device type, etc. Allow these to be passed in on the transceiver command line as the third argument (number of supported carriers is the second argument). This option benefits those who may have multiple UHD devices attached to a single system. This option is not yet supported by GSM core and requires starting the transceiver independently on the command line. This option has no effect when USRP1 is used. Signed-off-by: Thomas Tsou <tom@tsou.cc> git-svn-id: http://wush.net/svn/range/software/public/openbts/trunk@4315 19bc5d8c-e614-43d4-8b26-e1612bc8e597
This commit is contained in:
		| @@ -151,7 +151,7 @@ public: | ||||
| 	uhd_device(double rate, bool skip_rx); | ||||
| 	~uhd_device(); | ||||
|  | ||||
| 	bool open(); | ||||
| 	bool open(const std::string &args); | ||||
| 	bool start(); | ||||
| 	bool stop(); | ||||
| 	void restart(uhd::time_spec_t ts); | ||||
| @@ -422,16 +422,16 @@ bool uhd_device::parse_dev_type() | ||||
| 	return true; | ||||
| } | ||||
|  | ||||
| bool uhd_device::open() | ||||
| bool uhd_device::open(const std::string &args) | ||||
| { | ||||
| 	// Register msg handler | ||||
| 	uhd::msg::register_handler(&uhd_msg_handler); | ||||
|  | ||||
| 	// Find UHD devices | ||||
| 	uhd::device_addr_t args(""); | ||||
| 	uhd::device_addrs_t dev_addrs = uhd::device::find(args); | ||||
| 	uhd::device_addr_t addr(args); | ||||
| 	uhd::device_addrs_t dev_addrs = uhd::device::find(addr); | ||||
| 	if (dev_addrs.size() == 0) { | ||||
| 		LOG(ALERT) << "No UHD devices found"; | ||||
| 		LOG(ALERT) << "No UHD devices found with address '" << args << "'"; | ||||
| 		return false; | ||||
| 	} | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user