#2202 DMR talker aliases now show in channel activity summary. Added 'TA-' prefix to talker aliases (DMR & P25) to visually highlight what the value represents. (#2203)

Co-authored-by: Dennis Sheirer <dsheirer@github.com>
This commit is contained in:
Denny Sheirer
2025-03-21 07:27:33 -04:00
committed by GitHub
parent a4bcdfa769
commit 49b95a9445
4 changed files with 32 additions and 7 deletions

View File

@@ -50,7 +50,7 @@ public class DmrTalkerAliasIdentifier extends TalkerAliasIdentifier
@Override @Override
public String toString() public String toString()
{ {
return "A-" + super.toString(); return "TA-" + super.toString();
} }
public static DmrTalkerAliasIdentifier create(String value) public static DmrTalkerAliasIdentifier create(String value)

View File

@@ -1,6 +1,6 @@
/* /*
* ***************************************************************************** * *****************************************************************************
* Copyright (C) 2014-2023 Dennis Sheirer * Copyright (C) 2014-2025 Dennis Sheirer
* *
* This program is free software: you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
@@ -47,6 +47,12 @@ public class P25TalkerAliasIdentifier extends TalkerAliasIdentifier
return Protocol.APCO25; return Protocol.APCO25;
} }
@Override
public String toString()
{
return "TA-" + super.toString();
}
public static P25TalkerAliasIdentifier create(String value) public static P25TalkerAliasIdentifier create(String value)
{ {
return new P25TalkerAliasIdentifier(value); return new P25TalkerAliasIdentifier(value);

View File

@@ -1,6 +1,6 @@
/* /*
* ***************************************************************************** * *****************************************************************************
* Copyright (C) 2014-2024 Dennis Sheirer * Copyright (C) 2014-2025 Dennis Sheirer
* *
* This program is free software: you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
@@ -123,6 +123,7 @@ public class TalkerAliasManager
{ {
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
sb.append("Active System Radio Aliases\n"); sb.append("Active System Radio Aliases\n");
sb.append(" Radio\tTalker Alias (TA-)\n");
List<Integer> radios = new ArrayList<>(mAliasMap.keySet()); List<Integer> radios = new ArrayList<>(mAliasMap.keySet());
if(radios.size() > 0) if(radios.size() > 0)
@@ -131,7 +132,7 @@ public class TalkerAliasManager
for(Integer radio : radios) for(Integer radio : radios)
{ {
sb.append(" ").append(radio); sb.append(" ").append(radio);
sb.append("\t").append(mAliasMap.get(radio).getValue()); sb.append("\t").append(mAliasMap.get(radio));
sb.append("\n"); sb.append("\n");
} }
} }

View File

@@ -35,6 +35,7 @@ import io.github.dsheirer.identifier.MutableIdentifierCollection;
import io.github.dsheirer.identifier.Role; import io.github.dsheirer.identifier.Role;
import io.github.dsheirer.identifier.alias.DmrTalkerAliasIdentifier; import io.github.dsheirer.identifier.alias.DmrTalkerAliasIdentifier;
import io.github.dsheirer.identifier.integer.IntegerIdentifier; import io.github.dsheirer.identifier.integer.IntegerIdentifier;
import io.github.dsheirer.identifier.radio.RadioIdentifier;
import io.github.dsheirer.identifier.talkgroup.TalkgroupIdentifier; import io.github.dsheirer.identifier.talkgroup.TalkgroupIdentifier;
import io.github.dsheirer.log.LoggingSuppressor; import io.github.dsheirer.log.LoggingSuppressor;
import io.github.dsheirer.message.EmptyTimeslotPlaceholderMessage; import io.github.dsheirer.message.EmptyTimeslotPlaceholderMessage;
@@ -354,7 +355,7 @@ public class DMRDecoderState extends TimeslotDecoderState
//Only respond if this is a standard/control channel (not a traffic channel). //Only respond if this is a standard/control channel (not a traffic channel).
if(mChannel.isStandardChannel() && getCurrentFrequency() > 0 && if(mChannel.isStandardChannel() && getCurrentFrequency() > 0 &&
restChannel.getDownlinkFrequency() > 0 && restChannel.getDownlinkFrequency() > 0 &&
restChannel.getDownlinkFrequency() != getCurrentFrequency() && mTrafficChannelManager != null) restChannel.getDownlinkFrequency() != getCurrentFrequency() && hasTrafficChannelManager())
{ {
mTrafficChannelManager.convertToTrafficChannel(mChannel, getCurrentFrequency(), restChannel, mTrafficChannelManager.convertToTrafficChannel(mChannel, getCurrentFrequency(), restChannel,
mNetworkConfigurationMonitor); mNetworkConfigurationMonitor);
@@ -1206,6 +1207,13 @@ public class DMRDecoderState extends TimeslotDecoderState
DmrTalkerAliasIdentifier updated = DmrTalkerAliasIdentifier DmrTalkerAliasIdentifier updated = DmrTalkerAliasIdentifier
.create(alias.getTalkerAliasIdentifier().getValue() + talkerAlias.getValue()); .create(alias.getTalkerAliasIdentifier().getValue() + talkerAlias.getValue());
getIdentifierCollection().update(updated); getIdentifierCollection().update(updated);
Identifier fromRadio = getIdentifierCollection().getFromIdentifier();
if(hasTrafficChannelManager() && fromRadio instanceof RadioIdentifier radio)
{
mTrafficChannelManager.getTalkerAliasManager().update(radio, updated);
}
} }
else else
{ {
@@ -1232,6 +1240,13 @@ public class DMRDecoderState extends TimeslotDecoderState
DmrTalkerAliasIdentifier updated = DmrTalkerAliasIdentifier.create(talkerAlias.getValue() + DmrTalkerAliasIdentifier updated = DmrTalkerAliasIdentifier.create(talkerAlias.getValue() +
alias.getTalkerAliasIdentifier().getValue()); alias.getTalkerAliasIdentifier().getValue());
getIdentifierCollection().update(updated); getIdentifierCollection().update(updated);
Identifier fromRadio = getIdentifierCollection().getFromIdentifier();
if(hasTrafficChannelManager() && fromRadio instanceof RadioIdentifier radio)
{
mTrafficChannelManager.getTalkerAliasManager().update(radio, updated);
}
} }
else else
{ {
@@ -1492,10 +1507,13 @@ public class DMRDecoderState extends TimeslotDecoderState
{ {
if(networkAdded) if(networkAdded)
{ {
sb.append("\n\n"); sb.append("\n");
} }
sb.append(mTrafficChannelManager.getTalkerAliasManager().getAliasSummary()); if(hasTrafficChannelManager())
{
sb.append(mTrafficChannelManager.getTalkerAliasManager().getAliasSummary());
}
} }
return sb.toString(); return sb.toString();