mirror of
https://github.com/DSheirer/sdrtrunk.git
synced 2026-11-12 16:47:31 -05:00
* P25 Phase 2 now supports control channel decoding and decoder was enhanced to improve decodes. * Radio reference site editor updated for phase 2 sites to allow user to select FDMA or TDMA control. * Decode events are now minimized and de-duplicated. * Fully parsing all phase 1/2 messages from the latest ICD. * Vendor specific messaging recoveries (Moto & Harris). * Patch group management enhancements with stale patch detection. * Tuner editor now fully resets the min/max frequency values * Default traffic channel count increased to 20 (from 3). * ISSI roaming radio and talkgroup values now displayed and aliasable as fully qualified values (e.g. 1234(123.456.7890) * Moto emergency alarm activation messaging support * Expanded list of P25 encryption algorithms * Message (bits) viewer enhanced for P25 phase 1 and phase 2 * IPV4 addresses and UDP ports no longer classified as user values - won't display in event views. * New framework for describing message binary fields that should reduce overall memory footprint and enhance code readability Co-authored-by: Dennis Sheirer <dsheirer@github.com>
This commit is contained in:
@@ -1,23 +1,20 @@
|
||||
/*
|
||||
* *****************************************************************************
|
||||
* Copyright (C) 2014-2024 Dennis Sheirer
|
||||
*
|
||||
* * ******************************************************************************
|
||||
* * Copyright (C) 2014-2019 Dennis Sheirer
|
||||
* *
|
||||
* * 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 3 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, see <http://www.gnu.org/licenses/>
|
||||
* * *****************************************************************************
|
||||
* 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 3 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, see <http://www.gnu.org/licenses/>
|
||||
* ****************************************************************************
|
||||
*/
|
||||
|
||||
package io.github.dsheirer.identifier.talkgroup;
|
||||
@@ -31,23 +28,67 @@ public abstract class FullyQualifiedTalkgroupIdentifier extends TalkgroupIdentif
|
||||
{
|
||||
private int mWacn;
|
||||
private int mSystem;
|
||||
private int mTalkgroup;
|
||||
|
||||
/**
|
||||
* Constructs an instance
|
||||
* @param wacn
|
||||
* @param system
|
||||
* @param id
|
||||
* @param localAddress used on the local system as an alias to the fully qualified talkgroup.
|
||||
* @param wacn for the talkgroup home system.
|
||||
* @param system for the talkgroup home system.
|
||||
* @param id for the talkgroup within the home system.
|
||||
* @param role played by the talkgroup.
|
||||
*/
|
||||
public FullyQualifiedTalkgroupIdentifier(int wacn, int system, int id, Role role)
|
||||
public FullyQualifiedTalkgroupIdentifier(int localAddress, int wacn, int system, int id, Role role)
|
||||
{
|
||||
super(id, role);
|
||||
super(localAddress > 0 ? localAddress : id, role);
|
||||
mWacn = wacn;
|
||||
mSystem = system;
|
||||
mTalkgroup = id;
|
||||
}
|
||||
|
||||
public int getWacn()
|
||||
{
|
||||
return mWacn;
|
||||
}
|
||||
|
||||
public int getSystem()
|
||||
{
|
||||
return mSystem;
|
||||
}
|
||||
|
||||
public int getTalkgroup()
|
||||
{
|
||||
return mTalkgroup;
|
||||
}
|
||||
|
||||
/**
|
||||
* Fully qualified talkgroup identity.
|
||||
* @return talkgroup identity
|
||||
*/
|
||||
public String getFullyQualifiedTalkgroupAddress()
|
||||
{
|
||||
return mWacn + "." + mSystem + "." + mTalkgroup;
|
||||
}
|
||||
|
||||
/**
|
||||
* Indicates if the talkgroup identify is aliased with a persona value that is different from the talkgroup ID.
|
||||
* @return true if aliased.
|
||||
*/
|
||||
public boolean isAliased()
|
||||
{
|
||||
return getValue() != mTalkgroup;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString()
|
||||
{
|
||||
return mWacn + "." + mSystem + "." + super.toString();
|
||||
if(isAliased())
|
||||
{
|
||||
return super.toString() + "(" + getFullyQualifiedTalkgroupAddress() + ")";
|
||||
}
|
||||
else
|
||||
{
|
||||
return getFullyQualifiedTalkgroupAddress();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -27,8 +27,19 @@ import io.github.dsheirer.identifier.IdentifierClass;
|
||||
import io.github.dsheirer.identifier.Role;
|
||||
import io.github.dsheirer.identifier.integer.IntegerIdentifier;
|
||||
|
||||
/**
|
||||
* Talkgroup identifier.
|
||||
*
|
||||
* Note: this class overrides the .equals method to ensure that all talkgroups and subclasses can be compared using
|
||||
* the talkgroup value, regardless if it is a simple talkgroup or a fully qualified talkgroup identifier.
|
||||
*/
|
||||
public abstract class TalkgroupIdentifier extends IntegerIdentifier
|
||||
{
|
||||
/**
|
||||
* Constructs an instance
|
||||
* @param value for the talkgroup
|
||||
* @param role for the talkgroup
|
||||
*/
|
||||
public TalkgroupIdentifier(Integer value, Role role)
|
||||
{
|
||||
super(value, IdentifierClass.USER, Form.TALKGROUP, role);
|
||||
@@ -39,4 +50,28 @@ public abstract class TalkgroupIdentifier extends IntegerIdentifier
|
||||
{
|
||||
return getValue() > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Overrides to compare just the talkgroup value, class, form, role and protocol. This allows a fully qualified
|
||||
* talkgroup identifier to be equivalent to a standard talkgroup identifier for the traffic channel manager.
|
||||
*/
|
||||
@Override
|
||||
public boolean equals(Object o)
|
||||
{
|
||||
if(this == o)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
if(o instanceof TalkgroupIdentifier tg)
|
||||
{
|
||||
return (getValue().intValue() == tg.getValue().intValue()) &&
|
||||
getIdentifierClass() == tg.getIdentifierClass() &&
|
||||
getForm() == tg.getForm() &&
|
||||
getRole() == tg.getRole() &&
|
||||
getProtocol() == tg.getProtocol();
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user