blob: 8e709a3057559fcde188a2e409bdc29861bc3452 [file] [log] [blame]
Holger Hans Peter Freytherb78adcd2013-10-17 20:12:37 +02001/* poll_controller.h
2 *
3 * Copyright (C) 2013 by Holger Hans Peter Freyther
4 *
5 * All Rights Reserved
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU Affero General Public License as published by
9 * the Free Software Foundation; either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU Affero General Public License
18 * along with this program. If not, see <http://www.gnu.org/licenses/>.
19 *
20 */
21
22#pragma once
23
Pau Espin Pedrol2182e622021-01-14 16:48:38 +010024struct gprs_rlcmac_bts;
Holger Hans Peter Freytherb78adcd2013-10-17 20:12:37 +020025
26/**
27 * I belong to a BTS and I am responsible for finding TBFs and
28 * SBAs that should have been polled and execute the timeout
29 * action on them.
30 */
Pau Espin Pedrol2182e622021-01-14 16:48:38 +010031struct PollController {
Holger Hans Peter Freytherb78adcd2013-10-17 20:12:37 +020032public:
Pau Espin Pedrol2182e622021-01-14 16:48:38 +010033 PollController(struct gprs_rlcmac_bts& bts);
Holger Hans Peter Freytherb78adcd2013-10-17 20:12:37 +020034
Jacob Erlbeckac49d092015-08-27 13:18:24 +020035 /* check for poll timeout */
36 void expireTimedout(int frame_number, unsigned max_delay);
Holger Hans Peter Freytherb78adcd2013-10-17 20:12:37 +020037
38private:
Pau Espin Pedrol2182e622021-01-14 16:48:38 +010039 struct gprs_rlcmac_bts& m_bts;
Holger Hans Peter Freytherb78adcd2013-10-17 20:12:37 +020040
41private:
42 /* disable copying to avoid slicing */
43 PollController(const PollController&);
44 PollController& operator=(const PollController&);
45};