mirror of
https://github.com/g4klx/MMDVMHost
synced 2025-12-24 01:25:41 +08:00
Start adding P25 frame (dis)assembly and repeater logic.
This commit is contained in:
58
P25Control.h
Normal file
58
P25Control.h
Normal file
@@ -0,0 +1,58 @@
|
||||
/*
|
||||
* Copyright (C) 2016 by Jonathan Naylor G4KLX
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
#if !defined(P25Control_H)
|
||||
#define P25Control_H
|
||||
|
||||
#include "RingBuffer.h"
|
||||
#include "Defines.h"
|
||||
#include "Display.h"
|
||||
#include "Modem.h"
|
||||
#include "Timer.h"
|
||||
|
||||
class CP25Control {
|
||||
public:
|
||||
CP25Control(unsigned int id, CDisplay* display, unsigned int timeout, bool duplex, int rssiMultiplier, int rssiOffset);
|
||||
~CP25Control();
|
||||
|
||||
bool writeModem(unsigned char* data, unsigned int len);
|
||||
|
||||
unsigned int readModem(unsigned char* data);
|
||||
|
||||
void clock(unsigned int ms);
|
||||
|
||||
private:
|
||||
unsigned int m_id;
|
||||
CDisplay* m_display;
|
||||
bool m_duplex;
|
||||
int m_rssiMultiplier;
|
||||
int m_rssiOffset;
|
||||
CRingBuffer<unsigned char> m_queue;
|
||||
RPT_RF_STATE m_rfState;
|
||||
RPT_NET_STATE m_netState;
|
||||
CTimer m_rfTimeout;
|
||||
CTimer m_netTimeout;
|
||||
unsigned int m_rfFrames;
|
||||
unsigned int m_rfBits;
|
||||
unsigned int m_rfErrs;
|
||||
|
||||
void writeQueueRF(const unsigned char* data, unsigned int length);
|
||||
void addBusyBits(unsigned char* data, unsigned int length, bool b1, bool b2);
|
||||
};
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user