diff options
author | Alexander Chemeris <Alexander.Chemeris@gmail.com> | 2013-07-14 22:45:40 +0400 |
---|---|---|
committer | Alexander Chemeris <Alexander.Chemeris@gmail.com> | 2013-07-16 07:36:17 +0400 |
commit | f1c5b4f76567334a8da7cd2bf36ba854db5e341a (patch) | |
tree | 6a3889c252652ebf1c84be0e008010667ea4adf6 /Transceiver52M/radioInterface.h | |
parent | 19ae715e7126e6c333874d415f56959eac0e6654 (diff) |
Transceiver52M: Introduce usage counting for DriveLoop and RadioInterface.
The reason is to allow them to be started from any TRX. I.e. they are started
when the first TRX starts and stopped when the last TRX stops.
Diffstat (limited to 'Transceiver52M/radioInterface.h')
-rw-r--r-- | Transceiver52M/radioInterface.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Transceiver52M/radioInterface.h b/Transceiver52M/radioInterface.h index 83413cf..c2c4255 100644 --- a/Transceiver52M/radioInterface.h +++ b/Transceiver52M/radioInterface.h @@ -59,6 +59,7 @@ protected: int receiveOffset; ///< offset b/w transmit and receive GSM timestamps, in timeslots bool mOn; ///< indicates radio is on + int mUseCount; ///< Use counter double powerScaling; @@ -90,8 +91,9 @@ private: public: - /** start the interface */ + /** Increase usage counter and start the interface if not started yet */ bool start(); + /** Decrease usage counter and stop the interface if no users left */ bool stop(); bool started() { return mOn; }; |