Eric | b7253c6 | 2022-11-28 19:21:08 +0100 | [diff] [blame] | 1 | #pragma once |
| 2 | /* |
| 3 | * (C) 2022 by sysmocom s.f.m.c. GmbH <info@sysmocom.de> |
| 4 | * All Rights Reserved |
| 5 | * |
| 6 | * Author: Eric Wild <ewild@sysmocom.de> |
| 7 | * |
| 8 | * This program is free software; you can redistribute it and/or modify |
| 9 | * it under the terms of the GNU Affero General Public License as published by |
| 10 | * the Free Software Foundation; either version 3 of the License, or |
| 11 | * (at your option) any later version. |
| 12 | * |
| 13 | * This program is distributed in the hope that it will be useful, |
| 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 16 | * GNU Affero General Public License for more details. |
| 17 | * |
| 18 | * You should have received a copy of the GNU Affero General Public License |
| 19 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 20 | * |
| 21 | */ |
| 22 | #include <netdb.h> |
| 23 | #include <sys/socket.h> |
| 24 | #include <arpa/inet.h> |
| 25 | |
| 26 | #include "GSMCommon.h" |
Eric | b7253c6 | 2022-11-28 19:21:08 +0100 | [diff] [blame] | 27 | #include "ms.h" |
| 28 | |
| 29 | class upper_trx : public ms_trx { |
Eric | d372eb2 | 2023-08-29 23:23:24 +0200 | [diff] [blame^] | 30 | volatile bool mOn; |
Eric | b7253c6 | 2022-11-28 19:21:08 +0100 | [diff] [blame] | 31 | char demodded_softbits[444]; |
| 32 | |
| 33 | // void driveControl(); |
Eric | b7253c6 | 2022-11-28 19:21:08 +0100 | [diff] [blame] | 34 | bool pullRadioVector(GSM::Time &wTime, int &RSSI, int &timingOffset); |
| 35 | |
Eric | d372eb2 | 2023-08-29 23:23:24 +0200 | [diff] [blame^] | 36 | pthread_t thr_control, thr_tx; |
Eric | b7253c6 | 2022-11-28 19:21:08 +0100 | [diff] [blame] | 37 | |
| 38 | public: |
| 39 | void start_threads(); |
Eric | c3e515a | 2023-05-08 12:56:56 +0200 | [diff] [blame] | 40 | void main_loop(); |
Eric | b3157b9 | 2023-05-23 11:32:34 +0200 | [diff] [blame] | 41 | void stop_upper_threads(); |
Eric | b7253c6 | 2022-11-28 19:21:08 +0100 | [diff] [blame] | 42 | |
Eric | d372eb2 | 2023-08-29 23:23:24 +0200 | [diff] [blame^] | 43 | bool driveControl(); |
| 44 | void driveReceiveFIFO(); |
| 45 | void driveTx(); |
| 46 | |
Eric | b7253c6 | 2022-11-28 19:21:08 +0100 | [diff] [blame] | 47 | upper_trx(){}; |
| 48 | }; |