SoDaRadio-12.2.0-cut_dependencies:6c82803
Loading...
Searching...
No Matches
B200Control.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 B200Serial_HDR
30#define B200Serial_HDR
31
32#include "USRPTRControl.hxx"
33#include "IPSockets.hxx"
34#include <string>
35#include <list>
36#include <iostream>
37#include <uhd/usrp/multi_usrp.hpp>
38
39
40namespace SoDa {
55 typedef enum {
56 eB200, // e = enum; B200 seems to be defined somewhere else
62
74 class B200Control : public USRPTRControl {
75 public:
82 B200Control(uhd::usrp::multi_usrp::sptr usrp, int mboard = 0);
87 bool setTXOn();
88
93 bool setTXOff();
94
99 bool getTX();
100
109 bool setBand(unsigned int band, bool state);
110
117 bool getBand(unsigned int band);
118
119 private:
120 bool sendCommand(const std::string & cmd, int retry_count);
121
122 uhd::usrp::multi_usrp::sptr usrp;
123
124 int mboard;
125 SoDa_B200_type_t B200_type; //see comment above
126 std::string modelname; //is redundant, but used for simpler programming
127 };
128}
129#endif
std::string modelname
B200Control(uhd::usrp::multi_usrp::sptr usrp, int mboard=0)
constructor
SoDa_B200_type_t B200_type
bool getTX()
report state of transmit-enable.
bool sendCommand(const std::string &cmd, int retry_count)
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(!...
bool setTXOff()
activate external controls to disable transmit mode.
uhd::usrp::multi_usrp::sptr usrp
bool setTXOn()
activate external controls to enable transmit mode.
bool getBand(unsigned int band)
query state of signal path for selected band
SoDa_B200_type_t
B2xxy-z subtypes for simplified usage (DD0VS)
@ eB200mini_i
@ eB200mini
@ eB205mini_i