aboutsummaryrefslogtreecommitdiffstats
path: root/Transceiver52M/Transceiver.cpp
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2019-06-04 12:39:28 +0200
committerPau Espin Pedrol <pespin@sysmocom.de>2019-06-05 12:50:38 +0200
commitb426e4abb43c6a6d779858baad4760c2401f9732 (patch)
tree5d483cc266adc28b98cfc48fc35e2b431b15c642 /Transceiver52M/Transceiver.cpp
parent4456b6f132437a95833e3a3d3353836331b9c8a0 (diff)
Rename and move STOP signal from Transceiver to main
The callback actually belongs there, since it's the code/thread in main the one actually in charge of stopping everything. It simplifies current code, and more important, allows for new clients of this signal to use it. This callback will also be used in forthcoming commits by code controlling rate_ctr thresholds to stop the process if the VTY configured threshold is used. Change-Id: Id4159e64225c6606fef34a74b24f37c3a071aceb
Diffstat (limited to 'Transceiver52M/Transceiver.cpp')
-rw-r--r--Transceiver52M/Transceiver.cpp15
1 files changed, 2 insertions, 13 deletions
diff --git a/Transceiver52M/Transceiver.cpp b/Transceiver52M/Transceiver.cpp
index 54b9ddd..9c55d02 100644
--- a/Transceiver52M/Transceiver.cpp
+++ b/Transceiver52M/Transceiver.cpp
@@ -119,7 +119,7 @@ Transceiver::Transceiver(int wBasePort,
: mBasePort(wBasePort), mLocalAddr(TRXAddress), mRemoteAddr(GSMcoreAddress),
mClockSocket(TRXAddress, wBasePort, GSMcoreAddress, wBasePort + 100),
mTransmitLatency(wTransmitLatency), mRadioInterface(wRadioInterface),
- rssiOffset(wRssiOffset), sig_cbfn(NULL),
+ rssiOffset(wRssiOffset),
mSPSTx(tx_sps), mSPSRx(rx_sps), mChans(chans), mEdge(false), mOn(false), mForceClockInterface(false),
mTxFreq(0.0), mRxFreq(0.0), mTSC(0), mMaxExpectedDelayAB(0), mMaxExpectedDelayNB(0),
mWriteBurstToDiskMask(0)
@@ -225,17 +225,6 @@ bool Transceiver::init(FillerType filler, size_t rtsc, unsigned rach_delay,
return true;
}
-void Transceiver::setSignalHandler(osmo_signal_cbfn cbfn)
-{
- if (this->sig_cbfn)
- osmo_signal_unregister_handler(SS_TRANSC, this->sig_cbfn, NULL);
-
- if (cbfn) {
- this->sig_cbfn = cbfn;
- osmo_signal_register_handler(SS_TRANSC, this->sig_cbfn, NULL);
- }
-}
-
/*
* Start the transceiver
*
@@ -910,7 +899,7 @@ void Transceiver::driveReceiveRadio()
usleep(100000);
} else if (rc < 0) {
LOG(FATAL) << "radio Interface receive failed, requesting stop.";
- osmo_signal_dispatch(SS_TRANSC, S_TRANSC_STOP_REQUIRED, this);
+ osmo_signal_dispatch(SS_MAIN, S_MAIN_STOP_REQUIRED, NULL);
} else if (mForceClockInterface || mTransmitDeadlineClock > mLastClockUpdateTime + GSM::Time(216,0)) {
mForceClockInterface = false;
writeClockInterface();