SoDaRadio-12.2.0-cut_dependencies:6c82803
Loading...
Searching...
No Matches
USRPTRControl.hxx
Go to the documentation of this file.
1/*
2 Copyright (c) 2015, Matthew H. Reilly (kb1vc)
3 All rights reserved.
4
5 Redistribution and use in source and binary forms, with or without
6 modification, are permitted provided that the following conditions are
7 met:
8
9 Redistributions of source code must retain the above copyright
10 notice, this list of conditions and the following disclaimer.
11 Redistributions in binary form must reproduce the above copyright
12 notice, this list of conditions and the following disclaimer in
13 the documentation and/or other materials provided with the
14 distribution.
15
16 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
17 "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
18 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
19 A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
20 HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
21 SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
22 LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23 DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24 THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27*/
28
29#ifndef USRP_TR_CONTROL_HDR
30#define USRP_TR_CONTROL_HDR
31
32#include <uhd/usrp/multi_usrp.hpp>
33
34namespace SoDa {
35
52 public:
54 }
55
60 virtual bool setTXOn() = 0;
61
66 virtual bool setTXOff() = 0;
67
72 virtual bool getTX() = 0;
73
82 virtual bool setBand(unsigned int band, bool state) { (void) band; (void) state; return false; }
83
90 virtual bool getBand(unsigned int band) { (void) band; return false; }
91
99 virtual bool setServo(unsigned int servo_sel, double val) { (void) servo_sel; (void) val; return false; }
100
105 static USRPTRControl * makeUSRPTRControl(uhd::usrp::multi_usrp::sptr usrp, int mboard = 0);
106
107 };
108
112 class NoopControl : public USRPTRControl {
113 public:
116 bool setTXOn() { return true; }
117 bool setTXOff() { return true; }
118 bool getTX() { return true; }
119
120 };
121
122
123}
124
125#endif // USRP_TR_CONTROL_HDR
bool setTXOff()
activate external controls to disable transmit mode.
bool setTXOn()
activate external controls to enable transmit mode.
bool getTX()
report state of transmit-enable.
virtual bool setServo(unsigned int servo_sel, double val)
set state of selected servo
virtual bool getBand(unsigned int band)
query state of signal path for selected band
virtual bool setTXOn()=0
activate external controls to enable transmit mode.
virtual bool setBand(unsigned int band, bool state)
turn on/off signal path for selected band note that multiple bands can be enabled at one time(!...
virtual bool getTX()=0
report state of transmit-enable.
virtual bool setTXOff()=0
activate external controls to disable transmit mode.
static USRPTRControl * makeUSRPTRControl(uhd::usrp::multi_usrp::sptr usrp, int mboard=0)
make the appropriate TR control widget given a pointer to a USRP device.