Ivan Kluchnikov | 5c2f9fb | 2012-02-05 02:27:17 +0400 | [diff] [blame] | 1 | /*GPRSSocket.h |
| 2 | * |
| 3 | * Copyright (C) 2011 Ivan Klyuchnikov |
| 4 | * |
| 5 | * This program is free software; you can redistribute it and/or |
| 6 | * modify it under the terms of the GNU General Public License |
| 7 | * as published by the Free Software Foundation; either version 2 |
| 8 | * of the License, or (at your option) any later version. |
| 9 | * |
| 10 | * This program is distributed in the hope that it will be useful, |
| 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 13 | * GNU General Public License for more details. |
| 14 | * |
| 15 | * You should have received a copy of the GNU General Public License |
| 16 | * along with this program; if not, write to the Free Software |
| 17 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
| 18 | */ |
| 19 | |
| 20 | #ifndef GPRSSOCKET_H |
| 21 | #define GPRSSOCKET_H |
| 22 | |
| 23 | #include <BitVector.h> |
Ivan Kluchnikov | 3450640 | 2012-02-20 15:24:16 +0400 | [diff] [blame^] | 24 | #include "gsm_rlcmac.h" |
| 25 | |
| 26 | |
| 27 | enum DataBlockDispatcherState { |
| 28 | WaitSequenceStart, |
| 29 | WaitNextBlock, |
| 30 | WaitNextSequence |
| 31 | }; |
| 32 | |
| 33 | void sendToGSMTAP(uint8_t * data, unsigned len); |
Ivan Kluchnikov | 5c2f9fb | 2012-02-05 02:27:17 +0400 | [diff] [blame] | 34 | |
| 35 | void sendToOpenBTS(BitVector * vector); |
| 36 | |
| 37 | void writePUack(BitVector * dest, uint8_t TFI, uint32_t TLLI, unsigned CV, unsigned BSN); |
| 38 | |
Ivan Kluchnikov | 3450640 | 2012-02-20 15:24:16 +0400 | [diff] [blame^] | 39 | void RLCMACExtractData(uint8_t* tfi, uint32_t* tlli, RlcMacUplinkDataBlock_t * dataBlock, uint8_t* rlc_data, unsigned* dataIndex); |
| 40 | |
| 41 | void sendUplinkAck(uint8_t tfi, uint32_t tlli, RlcMacUplinkDataBlock_t * dataBlock); |
| 42 | |
| 43 | void RLCMACDispatchDataBlock(BitVector *vector, uint8_t* tfi, uint32_t* tlli, uint8_t* rlc_data, unsigned* dataIndex); |
| 44 | |
| 45 | void RLCMACDispatchBlock(BitVector *vector); |
Ivan Kluchnikov | 5c2f9fb | 2012-02-05 02:27:17 +0400 | [diff] [blame] | 46 | |
| 47 | void *RLCMACSocket(void *); |
| 48 | |
| 49 | #endif // GPRSSOCKET_H |