aboutsummaryrefslogtreecommitdiffstats
path: root/Transceiver52M/device/usrp1/USRPDevice.h
diff options
context:
space:
mode:
Diffstat (limited to 'Transceiver52M/device/usrp1/USRPDevice.h')
-rw-r--r--Transceiver52M/device/usrp1/USRPDevice.h50
1 files changed, 26 insertions, 24 deletions
diff --git a/Transceiver52M/device/usrp1/USRPDevice.h b/Transceiver52M/device/usrp1/USRPDevice.h
index 6dfa5f0..4957ee6 100644
--- a/Transceiver52M/device/usrp1/USRPDevice.h
+++ b/Transceiver52M/device/usrp1/USRPDevice.h
@@ -82,6 +82,15 @@ private:
double rxGain;
double txGain;
+ int writeSamplesControl(std::vector<short *> &bufs, int len, bool *underrun,
+ TIMESTAMP timestamp = 0xffffffff, bool isControl = false);
+
+ /** sets the transmit chan gain, returns the gain setting **/
+ double setTxGain(double dB, size_t chan = 0);
+
+ /** get transmit gain */
+ double getTxGain(size_t chan = 0) { return txGain; }
+
#ifdef SWLOOPBACK
short loopbackBuffer[1000000];
int loopbackBufferSize;
@@ -95,20 +104,21 @@ private:
public:
/** Object constructor */
- USRPDevice(size_t tx_sps, size_t rx_sps, InterfaceType iface, size_t chans, double lo_offset,
- const std::vector<std::string>& tx_paths,
- const std::vector<std::string>& rx_paths);
+ USRPDevice(InterfaceType iface, const struct trx_cfg *cfg);
- /** Instantiate the USRP */
- int open(const std::string &, int, bool);
+ /** Instantiate the USRP */
+ int open();
- /** Start the USRP */
- bool start();
+ /** Start the USRP */
+ bool start();
- /** Stop the USRP */
- bool stop();
+ /** Stop the USRP */
+ bool stop();
- enum TxWindowType getWindowType() { return TX_WINDOW_USRP1; }
+ enum TxWindowType getWindowType()
+ {
+ return TX_WINDOW_USRP1;
+ }
/**
Read samples from the USRP.
@@ -117,23 +127,20 @@ private:
@param overrun Set if read buffer has been overrun, e.g. data not being read fast enough
@param timestamp The timestamp of the first samples to be read
@param underrun Set if USRP does not have data to transmit, e.g. data not being sent fast enough
- @param RSSI The received signal strength of the read result
@return The number of samples actually read
*/
int readSamples(std::vector<short *> &buf, int len, bool *overrun,
- TIMESTAMP timestamp = 0xffffffff, bool *underrun = NULL,
- unsigned *RSSI = NULL);
+ TIMESTAMP timestamp = 0xffffffff, bool *underrun = NULL);
/**
Write samples to the USRP.
@param buf Contains the data to be written.
@param len number of samples to write.
@param underrun Set if USRP does not have data to transmit, e.g. data not being sent fast enough
@param timestamp The timestamp of the first sample of the data buffer.
- @param isControl Set if data is a control packet, e.g. a ping command
@return The number of samples actually written
*/
int writeSamples(std::vector<short *> &bufs, int len, bool *underrun,
- TIMESTAMP timestamp = 0xffffffff, bool isControl = false);
+ TIMESTAMP timestamp = 0xffffffff);
/** Update the alignment between the read and write timestamps */
bool updateAlignment(TIMESTAMP timestamp);
@@ -168,17 +175,12 @@ private:
/** return minimum Rx Gain **/
double minRxGain(void);
- /** sets the transmit chan gain, returns the gain setting **/
- double setTxGain(double dB, size_t chan = 0);
+ double rssiOffset(size_t chan) { return 0.0f; } /* FIXME: not implemented */
- /** get transmit gain */
- double getTxGain(size_t chan = 0) { return txGain; }
-
- /** return maximum Tx Gain **/
- double maxTxGain(void);
+ double setPowerAttenuation(int atten, size_t chan);
+ double getPowerAttenuation(size_t chan=0);
- /** return minimum Rx Gain **/
- double minTxGain(void);
+ int getNominalTxPower(size_t chan = 0);
/** sets the RX path to use, returns true if successful and false otherwise */
bool setRxAntenna(const std::string &ant, size_t chan = 0);