#1575 Updates traffic channel names to be 'T-' concatenated with the parent control channel name from the channel configuration. (#1578)

Co-authored-by: Dennis Sheirer <dsheirer@github.com>
This commit is contained in:
Denny Sheirer
2023-06-24 05:15:27 -04:00
committed by GitHub
parent 366eacd234
commit e04b59ba15
3 changed files with 15 additions and 19 deletions

View File

@@ -1,6 +1,6 @@
/* /*
* ***************************************************************************** * *****************************************************************************
* Copyright (C) 2014-2022 Dennis Sheirer * Copyright (C) 2014-2023 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
@@ -55,9 +55,6 @@ import io.github.dsheirer.source.config.SourceConfigTuner;
import io.github.dsheirer.source.config.SourceConfigTunerMultipleFrequency; import io.github.dsheirer.source.config.SourceConfigTunerMultipleFrequency;
import io.github.dsheirer.source.tuner.channel.rotation.DisableChannelRotationMonitorRequest; import io.github.dsheirer.source.tuner.channel.rotation.DisableChannelRotationMonitorRequest;
import io.github.dsheirer.source.tuner.channel.rotation.FrequencyLockChangeRequest; import io.github.dsheirer.source.tuner.channel.rotation.FrequencyLockChangeRequest;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Collections; import java.util.Collections;
import java.util.List; import java.util.List;
@@ -66,6 +63,8 @@ import java.util.Objects;
import java.util.Queue; import java.util.Queue;
import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentLinkedQueue; import java.util.concurrent.ConcurrentLinkedQueue;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/** /**
* Monitors channel grant and channel grant update messages to allocate traffic channels to capture * Monitors channel grant and channel grant update messages to allocate traffic channels to capture
@@ -165,7 +164,7 @@ public class DMRTrafficChannelManager extends TrafficChannelManager implements I
{ {
for(int x = 0; x < maxTrafficChannels; x++) for(int x = 0; x < maxTrafficChannels; x++)
{ {
Channel trafficChannel = new Channel("TRAFFIC", ChannelType.TRAFFIC); Channel trafficChannel = new Channel("T-" + mParentChannel.getName(), ChannelType.TRAFFIC);
trafficChannel.setAliasListName(mParentChannel.getAliasListName()); trafficChannel.setAliasListName(mParentChannel.getAliasListName());
trafficChannel.setSystem(mParentChannel.getSystem()); trafficChannel.setSystem(mParentChannel.getSystem());
trafficChannel.setSite(mParentChannel.getSite()); trafficChannel.setSite(mParentChannel.getSite());

View File

@@ -1,7 +1,6 @@
/* /*
* ****************************************************************************** * *****************************************************************************
* sdrtrunk * Copyright (C) 2014-2023 Dennis Sheirer
* Copyright (C) 2014-2018 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
@@ -15,7 +14,7 @@
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/> * along with this program. If not, see <http://www.gnu.org/licenses/>
* ***************************************************************************** * ****************************************************************************
*/ */
package io.github.dsheirer.module.decode.mpt1327; package io.github.dsheirer.module.decode.mpt1327;
@@ -37,9 +36,6 @@ import io.github.dsheirer.module.decode.mpt1327.channel.MPT1327Channel;
import io.github.dsheirer.module.decode.traffic.TrafficChannelManager; import io.github.dsheirer.module.decode.traffic.TrafficChannelManager;
import io.github.dsheirer.sample.Listener; import io.github.dsheirer.sample.Listener;
import io.github.dsheirer.source.config.SourceConfigTuner; import io.github.dsheirer.source.config.SourceConfigTuner;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Collections; import java.util.Collections;
import java.util.List; import java.util.List;
@@ -48,6 +44,8 @@ import java.util.Objects;
import java.util.Queue; import java.util.Queue;
import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentLinkedQueue; import java.util.concurrent.ConcurrentLinkedQueue;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public class MPT1327TrafficChannelManager extends TrafficChannelManager implements IDecodeEventProvider, public class MPT1327TrafficChannelManager extends TrafficChannelManager implements IDecodeEventProvider,
IChannelEventListener, IChannelEventProvider IChannelEventListener, IChannelEventProvider
@@ -160,7 +158,7 @@ public class MPT1327TrafficChannelManager extends TrafficChannelManager implemen
for(int x = 0; x < maxTrafficChannels; x++) for(int x = 0; x < maxTrafficChannels; x++)
{ {
Channel trafficChannel = new Channel("TRAFFIC", Channel.ChannelType.TRAFFIC); Channel trafficChannel = new Channel("T-" + parentChannel.getName(), Channel.ChannelType.TRAFFIC);
trafficChannel.setAliasListName(parentChannel.getAliasListName()); trafficChannel.setAliasListName(parentChannel.getAliasListName());
trafficChannel.setSystem(parentChannel.getSystem()); trafficChannel.setSystem(parentChannel.getSystem());
trafficChannel.setSite(parentChannel.getSite()); trafficChannel.setSite(parentChannel.getSite());

View File

@@ -1,6 +1,6 @@
/* /*
* ***************************************************************************** * *****************************************************************************
* Copyright (C) 2014-2022 Dennis Sheirer * Copyright (C) 2014-2023 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
@@ -54,9 +54,6 @@ import io.github.dsheirer.module.decode.p25.reference.ServiceOptions;
import io.github.dsheirer.module.decode.traffic.TrafficChannelManager; import io.github.dsheirer.module.decode.traffic.TrafficChannelManager;
import io.github.dsheirer.sample.Listener; import io.github.dsheirer.sample.Listener;
import io.github.dsheirer.source.config.SourceConfigTuner; import io.github.dsheirer.source.config.SourceConfigTuner;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Collections; import java.util.Collections;
import java.util.List; import java.util.List;
@@ -65,6 +62,8 @@ import java.util.Objects;
import java.util.Queue; import java.util.Queue;
import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentLinkedQueue; import java.util.concurrent.ConcurrentLinkedQueue;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/** /**
* Monitors channel grant and channel grant update messages to allocate traffic channels to capture * Monitors channel grant and channel grant update messages to allocate traffic channels to capture
@@ -148,7 +147,7 @@ public class P25TrafficChannelManager extends TrafficChannelManager implements I
{ {
for(int x = 0; x < maxTrafficChannels; x++) for(int x = 0; x < maxTrafficChannels; x++)
{ {
Channel trafficChannel = new Channel("TRAFFIC", ChannelType.TRAFFIC); Channel trafficChannel = new Channel("T-" + mParentChannel.getName(), ChannelType.TRAFFIC);
trafficChannel.setAliasListName(mParentChannel.getAliasListName()); trafficChannel.setAliasListName(mParentChannel.getAliasListName());
trafficChannel.setSystem(mParentChannel.getSystem()); trafficChannel.setSystem(mParentChannel.getSystem());
trafficChannel.setSite(mParentChannel.getSite()); trafficChannel.setSite(mParentChannel.getSite());
@@ -187,7 +186,7 @@ public class P25TrafficChannelManager extends TrafficChannelManager implements I
{ {
for(int x = 0; x < maxTrafficChannels; x++) for(int x = 0; x < maxTrafficChannels; x++)
{ {
Channel trafficChannel = new Channel("TRAFFIC", ChannelType.TRAFFIC); Channel trafficChannel = new Channel("T-" + mParentChannel.getName(), ChannelType.TRAFFIC);
trafficChannel.setAliasListName(mParentChannel.getAliasListName()); trafficChannel.setAliasListName(mParentChannel.getAliasListName());
trafficChannel.setSystem(mParentChannel.getSystem()); trafficChannel.setSystem(mParentChannel.getSystem());
trafficChannel.setSite(mParentChannel.getSite()); trafficChannel.setSite(mParentChannel.getSite());