Created
October 4, 2009 02:45
-
-
Save codebutler/201076 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff -ru openbts-2.4Kinder/apps/sendSimple.cpp openbts-2.4Kinder-modified/apps/sendSimple.cpp | |
--- openbts-2.4Kinder/apps/sendSimple.cpp 2009-06-18 10:04:36.000000000 -0700 | |
+++ openbts-2.4Kinder-modified/apps/sendSimple.cpp 2009-09-30 20:37:03.363140713 -0700 | |
@@ -26,7 +26,7 @@ | |
#include <iostream> | |
#include <Sockets.h> | |
#include <Threads.h> | |
- | |
+#include <cstdio> | |
UDPSocket sock(5063,"127.0.0.1",5062); | |
diff -ru openbts-2.4Kinder/CommonLibs/F16.h openbts-2.4Kinder-modified/CommonLibs/F16.h | |
--- openbts-2.4Kinder/CommonLibs/F16.h 2009-06-18 10:04:36.000000000 -0700 | |
+++ openbts-2.4Kinder-modified/CommonLibs/F16.h 2009-09-30 20:09:39.955133300 -0700 | |
@@ -28,8 +28,8 @@ | |
#include <ostream> | |
- | |
- | |
+#include <stdio.h> | |
+#include <stdint.h> | |
/** Round a float to the appropriate F16 value. */ | |
inline int32_t _f16_round(float f) | |
diff -ru openbts-2.4Kinder/CommonLibs/Logger.cpp openbts-2.4Kinder-modified/CommonLibs/Logger.cpp | |
--- openbts-2.4Kinder/CommonLibs/Logger.cpp 2009-06-18 10:04:36.000000000 -0700 | |
+++ openbts-2.4Kinder-modified/CommonLibs/Logger.cpp 2009-09-30 20:08:22.307122831 -0700 | |
@@ -25,7 +25,7 @@ | |
#include "Logger.h" | |
#include "Timeval.h" | |
#include <string.h> | |
- | |
+#include <cstdio> | |
using namespace std; | |
diff -ru openbts-2.4Kinder/CommonLibs/Sockets.cpp openbts-2.4Kinder-modified/CommonLibs/Sockets.cpp | |
--- openbts-2.4Kinder/CommonLibs/Sockets.cpp 2009-06-18 10:04:36.000000000 -0700 | |
+++ openbts-2.4Kinder-modified/CommonLibs/Sockets.cpp 2009-09-30 20:05:26.059116058 -0700 | |
@@ -29,8 +29,7 @@ | |
#include "Sockets.h" | |
#include <unistd.h> | |
#include <fcntl.h> | |
- | |
- | |
+#include <cstdio> | |
diff -ru openbts-2.4Kinder/CommonLibs/Timeval.h openbts-2.4Kinder-modified/CommonLibs/Timeval.h | |
--- openbts-2.4Kinder/CommonLibs/Timeval.h 2009-06-18 10:04:36.000000000 -0700 | |
+++ openbts-2.4Kinder-modified/CommonLibs/Timeval.h 2009-09-30 20:07:57.271144109 -0700 | |
@@ -28,7 +28,7 @@ | |
#include "sys/time.h" | |
#include <iostream> | |
- | |
+#include <stdint.h> | |
inline void msleep(long v) { usleep((v+500)/1000); } | |
diff -ru openbts-2.4Kinder/SMS/SMSMessages.cpp openbts-2.4Kinder-modified/SMS/SMSMessages.cpp | |
--- openbts-2.4Kinder/SMS/SMSMessages.cpp 2009-06-18 10:04:36.000000000 -0700 | |
+++ openbts-2.4Kinder-modified/SMS/SMSMessages.cpp 2009-09-30 23:05:35.147365935 -0700 | |
@@ -26,6 +26,7 @@ | |
#include "SMSMessages.h" | |
#include <Logger.h> | |
+#include <cstdio> | |
using namespace std; | |
using namespace GSM; | |
@@ -379,11 +380,14 @@ | |
void TLValidityPeriod::text(ostream& os) const | |
{ | |
+ cout << "TLValidityPeriod::text START" << endl; | |
char str[27]; | |
time_t seconds = mExpiration.sec(); | |
ctime_r(&seconds,str); | |
str[24]='\0'; | |
+ cout << "TLValidityPeriod::text " << str << endl; | |
os << "expiration=(" << str << ")"; | |
+ cout << "TLValidityPeriod::text END" << endl; | |
} | |
@@ -449,7 +453,7 @@ | |
default: | |
{ | |
rp += numChar; | |
- sprintf(mData,"unsupported DCS 0x%x", mDCS); | |
+ std::sprintf(mData,"unsupported DCS 0x%x", mDCS); | |
LOG(NOTICE) << mData; | |
SMS_READ_ERROR; | |
} | |
@@ -537,7 +541,7 @@ | |
os << " DA=(" << mDA << ")"; | |
os << " PI=" << mPI; | |
os << " DCS=" << mDCS; | |
- os << " VP=(" << mVP << ")"; | |
+ //os << " VP=(" << mVP << ")"; | |
os << " UD=\"" << mUD << "\""; | |
} | |
diff -ru openbts-2.4Kinder/Transceiver/Transceiver.cpp openbts-2.4Kinder-modified/Transceiver/Transceiver.cpp | |
--- openbts-2.4Kinder/Transceiver/Transceiver.cpp 2009-06-18 10:04:37.000000000 -0700 | |
+++ openbts-2.4Kinder-modified/Transceiver/Transceiver.cpp 2009-09-30 20:13:46.355133460 -0700 | |
@@ -32,6 +32,7 @@ | |
#define NDEBUG | |
#include "Transceiver.h" | |
#include <Logger.h> | |
+#include <cstdio> | |
diff -ru openbts-2.4Kinder/Transceiver/USRPDevice.cpp openbts-2.4Kinder-modified/Transceiver/USRPDevice.cpp | |
--- openbts-2.4Kinder/Transceiver/USRPDevice.cpp 2009-06-18 10:04:37.000000000 -0700 | |
+++ openbts-2.4Kinder-modified/Transceiver/USRPDevice.cpp 2009-09-30 20:27:59.807669209 -0700 | |
@@ -35,6 +35,8 @@ | |
#include <stdlib.h> | |
#include "Threads.h" | |
#include "USRPDevice.h" | |
+#include <cstdio> | |
+#include <stdint.h> | |
#include <Logger.h> | |
@@ -142,8 +144,8 @@ | |
double masterClockRate = (double) 64.0e6; | |
decimRate = (unsigned int) round(masterClockRate/_desiredSampleRate); | |
actualSampleRate = masterClockRate/decimRate; | |
- m_uRx = NULL; | |
- m_uTx = NULL; | |
+// m_uRx = NULL; | |
+// m_uTx = NULL; | |
#ifdef SWLOOPBACK | |
samplePeriod = 1.0e6/actualSampleRate; | |
@@ -161,7 +163,7 @@ | |
#ifndef SWLOOPBACK | |
string rbf = "std_inband.rbf"; | |
//string rbf = "inband_1rxhb_1tx.rbf"; | |
- m_uRx = NULL; | |
+ m_uRx.reset(); | |
if (!skipRx) { | |
try { | |
m_uRx = (usrp_standard_rx::make(0,decimRate,1,-1, | |
@@ -171,7 +173,7 @@ | |
catch(...) { | |
LOG(ERROR) << "make failed on Rx"; | |
- delete m_uRx; | |
+ m_uRx.reset(); | |
return false; | |
} | |
} | |
@@ -183,7 +185,7 @@ | |
catch(...) { | |
LOG(ERROR) << "make failed on Tx"; | |
- delete m_uTx; | |
+ m_uTx.reset(); | |
return false; | |
} | |
diff -ru openbts-2.4Kinder/Transceiver/USRPDevice.h openbts-2.4Kinder-modified/Transceiver/USRPDevice.h | |
--- openbts-2.4Kinder/Transceiver/USRPDevice.h 2009-06-18 10:04:37.000000000 -0700 | |
+++ openbts-2.4Kinder-modified/Transceiver/USRPDevice.h 2009-09-30 20:30:21.607144536 -0700 | |
@@ -42,8 +42,8 @@ | |
private: | |
double desiredSampleRate; ///< the desired sampling rate | |
- usrp_standard_rx* m_uRx; ///< the USRP receiver | |
- usrp_standard_tx* m_uTx; ///< the USRP transmitter | |
+ usrp_standard_rx_sptr m_uRx; ///< the USRP receiver | |
+ usrp_standard_tx_sptr m_uTx; ///< the USRP transmitter | |
double actualSampleRate; ///< the actual USRP sampling rate | |
unsigned int decimRate; ///< the USRP decimation rate | |
diff -ru openbts-2.4Kinder/Transceiver52M/Transceiver.cpp openbts-2.4Kinder-modified/Transceiver52M/Transceiver.cpp | |
--- openbts-2.4Kinder/Transceiver52M/Transceiver.cpp 2009-06-18 10:04:37.000000000 -0700 | |
+++ openbts-2.4Kinder-modified/Transceiver52M/Transceiver.cpp 2009-09-30 20:32:03.459121221 -0700 | |
@@ -32,6 +32,7 @@ | |
#define NDEBUG | |
#include "Transceiver.h" | |
#include <Logger.h> | |
+#include <cstdio> | |
diff -ru openbts-2.4Kinder/Transceiver52M/USRPDevice.cpp openbts-2.4Kinder-modified/Transceiver52M/USRPDevice.cpp | |
--- openbts-2.4Kinder/Transceiver52M/USRPDevice.cpp 2009-06-18 10:04:37.000000000 -0700 | |
+++ openbts-2.4Kinder-modified/Transceiver52M/USRPDevice.cpp 2009-09-30 20:35:37.151108126 -0700 | |
@@ -38,6 +38,8 @@ | |
#include <Logger.h> | |
+#include <cstdio> | |
+#include <stdint.h> | |
using namespace std; | |
@@ -142,8 +144,8 @@ | |
double masterClockRate = (double) 52.0e6; | |
decimRate = (unsigned int) round(masterClockRate/_desiredSampleRate); | |
actualSampleRate = masterClockRate/decimRate; | |
- m_uRx = NULL; | |
- m_uTx = NULL; | |
+ //m_uRx = NULL; | |
+ //m_uTx = NULL; | |
#ifdef SWLOOPBACK | |
samplePeriod = 1.0e6/actualSampleRate; | |
@@ -161,7 +163,7 @@ | |
#ifndef SWLOOPBACK | |
string rbf = "std_inband.rbf"; | |
//string rbf = "inband_1rxhb_1tx.rbf"; | |
- m_uRx = NULL; | |
+ m_uRx.reset(); | |
if (!skipRx) { | |
try { | |
m_uRx = (usrp_standard_rx::make(0,decimRate,1,-1, | |
@@ -171,7 +173,7 @@ | |
catch(...) { | |
LOG(ERROR) << "make failed on Rx"; | |
- delete m_uRx; | |
+ m_uRx.reset(); | |
return false; | |
} | |
} | |
@@ -183,7 +185,7 @@ | |
catch(...) { | |
LOG(ERROR) << "make failed on Tx"; | |
- delete m_uTx; | |
+ m_uTx.reset(); | |
return false; | |
} | |
diff -ru openbts-2.4Kinder/Transceiver52M/USRPDevice.h openbts-2.4Kinder-modified/Transceiver52M/USRPDevice.h | |
--- openbts-2.4Kinder/Transceiver52M/USRPDevice.h 2009-06-18 10:04:37.000000000 -0700 | |
+++ openbts-2.4Kinder-modified/Transceiver52M/USRPDevice.h 2009-09-30 20:32:59.299153350 -0700 | |
@@ -42,8 +42,8 @@ | |
private: | |
double desiredSampleRate; ///< the desired sampling rate | |
- usrp_standard_rx* m_uRx; ///< the USRP receiver | |
- usrp_standard_tx* m_uTx; ///< the USRP transmitter | |
+ usrp_standard_rx_sptr m_uRx; ///< the USRP receiver | |
+ usrp_standard_tx_sptr m_uTx; ///< the USRP transmitter | |
double actualSampleRate; ///< the actual USRP sampling rate | |
unsigned int decimRate; ///< the USRP decimation rate |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment