|
|
|
@ -138,6 +138,24 @@ const uint32_t GRANT_TIMER_TIMEOUT = 15U;
|
|
|
|
// ---------------------------------------------------------------------------
|
|
|
|
// ---------------------------------------------------------------------------
|
|
|
|
// Public Class Members
|
|
|
|
// Public Class Members
|
|
|
|
// ---------------------------------------------------------------------------
|
|
|
|
// ---------------------------------------------------------------------------
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
|
|
/// Resets the data states for the RF interface.
|
|
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
|
|
void TrunkPacket::resetRF()
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
lc::TSBK tsbk = lc::TSBK(m_p25->m_siteData, m_p25->m_idenEntry, m_dumpTSBK);
|
|
|
|
|
|
|
|
m_rfTSBK = tsbk;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
|
|
/// Resets the data states for the network.
|
|
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
|
|
void TrunkPacket::resetNet()
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
lc::TSBK tsbk = lc::TSBK(m_p25->m_siteData, m_p25->m_idenEntry, m_dumpTSBK);
|
|
|
|
|
|
|
|
m_netTSBK = tsbk;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// <summary>
|
|
|
|
/// Process a data frame from the RF interface.
|
|
|
|
/// Process a data frame from the RF interface.
|
|
|
|
/// </summary>
|
|
|
|
/// </summary>
|
|
|
|
@ -168,8 +186,8 @@ bool TrunkPacket::process(uint8_t* data, uint32_t len)
|
|
|
|
|
|
|
|
|
|
|
|
m_p25->m_queue.clear();
|
|
|
|
m_p25->m_queue.clear();
|
|
|
|
|
|
|
|
|
|
|
|
m_rfTSBK = lc::TSBK(m_p25->m_siteData, m_p25->m_idenEntry, m_dumpTSBK);
|
|
|
|
resetRF();
|
|
|
|
m_netTSBK = lc::TSBK(m_p25->m_siteData, m_p25->m_idenEntry, m_dumpTSBK);
|
|
|
|
resetNet();
|
|
|
|
|
|
|
|
|
|
|
|
bool ret = m_rfTSBK.decode(data + 2U);
|
|
|
|
bool ret = m_rfTSBK.decode(data + 2U);
|
|
|
|
if (!ret) {
|
|
|
|
if (!ret) {
|
|
|
|
@ -480,8 +498,8 @@ bool TrunkPacket::processNetwork(uint8_t* data, uint32_t len, lc::LC& control, d
|
|
|
|
switch (duid) {
|
|
|
|
switch (duid) {
|
|
|
|
case P25_DUID_TSDU:
|
|
|
|
case P25_DUID_TSDU:
|
|
|
|
if (m_p25->m_netState == RS_NET_IDLE) {
|
|
|
|
if (m_p25->m_netState == RS_NET_IDLE) {
|
|
|
|
m_rfTSBK = lc::TSBK(m_p25->m_siteData, m_p25->m_idenEntry, m_dumpTSBK);
|
|
|
|
resetRF();
|
|
|
|
m_netTSBK = lc::TSBK(m_p25->m_siteData, m_p25->m_idenEntry, m_dumpTSBK);
|
|
|
|
resetNet();
|
|
|
|
|
|
|
|
|
|
|
|
bool ret = m_netTSBK.decode(data);
|
|
|
|
bool ret = m_netTSBK.decode(data);
|
|
|
|
if (!ret) {
|
|
|
|
if (!ret) {
|
|
|
|
@ -667,8 +685,8 @@ void TrunkPacket::writeAdjSSNetwork()
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
m_rfTSBK = lc::TSBK(m_p25->m_siteData, m_p25->m_idenEntry, m_dumpTSBK);
|
|
|
|
resetRF();
|
|
|
|
m_netTSBK = lc::TSBK(m_p25->m_siteData, m_p25->m_idenEntry, m_dumpTSBK);
|
|
|
|
resetNet();
|
|
|
|
|
|
|
|
|
|
|
|
if (m_network != NULL) {
|
|
|
|
if (m_network != NULL) {
|
|
|
|
if (m_verbose) {
|
|
|
|
if (m_verbose) {
|
|
|
|
@ -1195,7 +1213,7 @@ void TrunkPacket::writeRF_ControlData(uint8_t frameCnt, uint8_t n, bool adjSS)
|
|
|
|
|
|
|
|
|
|
|
|
do
|
|
|
|
do
|
|
|
|
{
|
|
|
|
{
|
|
|
|
m_rfTSBK = lc::TSBK(m_p25->m_siteData, m_p25->m_idenEntry, m_dumpTSBK);
|
|
|
|
resetRF();
|
|
|
|
|
|
|
|
|
|
|
|
if (m_debug) {
|
|
|
|
if (m_debug) {
|
|
|
|
LogDebug(LOG_P25, "writeRF_ControlData, mbfCnt = %u, frameCnt = %u, seq = %u, adjSS = %u", m_mbfCnt, frameCnt, n, adjSS);
|
|
|
|
LogDebug(LOG_P25, "writeRF_ControlData, mbfCnt = %u, frameCnt = %u, seq = %u, adjSS = %u", m_mbfCnt, frameCnt, n, adjSS);
|
|
|
|
@ -1528,7 +1546,7 @@ void TrunkPacket::queueRF_TSBK_Ctrl_MBF(uint8_t lco)
|
|
|
|
if (!m_p25->m_control)
|
|
|
|
if (!m_p25->m_control)
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
|
|
m_rfTSBK = lc::TSBK(m_p25->m_siteData, m_p25->m_idenEntry, m_dumpTSBK);
|
|
|
|
resetRF();
|
|
|
|
|
|
|
|
|
|
|
|
switch (lco) {
|
|
|
|
switch (lco) {
|
|
|
|
case TSBK_OSP_IDEN_UP:
|
|
|
|
case TSBK_OSP_IDEN_UP:
|
|
|
|
|