From dab6df7836a62c82a2ed0b23ebcabab000643735 Mon Sep 17 00:00:00 2001 From: Denny Date: Thu, 30 Mar 2017 19:26:35 -0400 Subject: [PATCH] Resolves #228 - traffic channel manager now allocates traffic channels even when the alias is marked as do not monitor --- .../traffic/TrafficChannelManager.java | 47 +------------------ src/module/decode/DecoderFactory.java | 4 +- 2 files changed, 3 insertions(+), 48 deletions(-) diff --git a/src/channel/traffic/TrafficChannelManager.java b/src/channel/traffic/TrafficChannelManager.java index 16cdec10..c2568de8 100644 --- a/src/channel/traffic/TrafficChannelManager.java +++ b/src/channel/traffic/TrafficChannelManager.java @@ -63,13 +63,11 @@ public class TrafficChannelManager extends Module implements ICallEventProvider, private Listener mCallEventListener; private ChannelModel mChannelModel; - private ChannelProcessingManager mChannelProcessingManager; private DecodeConfiguration mDecodeConfiguration; private RecordConfiguration mRecordConfiguration; private String mSystem; private String mSite; private String mAliasListName; - private CallEvent mPreviousDoNotMonitorCallEvent; /** * Monitors call events and allocates traffic decoder channels in response @@ -77,7 +75,6 @@ public class TrafficChannelManager extends Module implements ICallEventProvider, * traffic channel allocations. * * @param channelModel containing channels currently in use - * @param channelProcessingManager * @param decodeConfiguration - decoder configuration to use for each * traffic channel allocation. * @param recordConfiguration - recording options for each traffic channel @@ -88,7 +85,6 @@ public class TrafficChannelManager extends Module implements ICallEventProvider, * in the pool */ public TrafficChannelManager(ChannelModel channelModel, - ChannelProcessingManager channelProcessingManager, DecodeConfiguration decodeConfiguration, RecordConfiguration recordConfiguration, String system, @@ -97,7 +93,6 @@ public class TrafficChannelManager extends Module implements ICallEventProvider, int trafficChannelPoolSize) { mChannelModel = channelModel; - mChannelProcessingManager = channelProcessingManager; mDecodeConfiguration = decodeConfiguration; mRecordConfiguration = recordConfiguration; mSystem = system; @@ -120,7 +115,6 @@ public class TrafficChannelManager extends Module implements ICallEventProvider, mCallEventListener = null; mDecodeConfiguration = null; - mPreviousDoNotMonitorCallEvent = null; } /** @@ -197,21 +191,7 @@ public class TrafficChannelManager extends Module implements ICallEventProvider, long frequency = callEvent.getFrequency(); - /* Check the from/to aliases for do not monitor priority */ - if(isDoNotMonitor(callEvent)) - { - callEvent.setCallEventType(CallEventType.CALL_DO_NOT_MONITOR); - - if(isSameCallEvent(mPreviousDoNotMonitorCallEvent, callEvent)) - { - return; - } - else - { - mPreviousDoNotMonitorCallEvent = callEvent; - } - } - else if(frequency > 0) + if(frequency > 0) { Channel channel = getChannel(callEvent.getChannel(), new TunerChannel(Type.TRAFFIC, frequency, mDecodeConfiguration.getDecoderType().getChannelBandwidth())); @@ -330,31 +310,6 @@ public class TrafficChannelManager extends Module implements ICallEventProvider, return false; } - /** - * Checks for aliases that contain a do not follow/process priority. - * - * @param event - * @return - true if there is an alias that has a do not process alias id - */ - private boolean isDoNotMonitor(CallEvent event) - { - Alias to = event.getToIDAlias(); - - if(to != null && to.hasCallPriority() && to.getCallPriority() == Priority.DO_NOT_MONITOR) - { - return true; - } - - Alias from = event.getFromIDAlias(); - - if(from != null && from.hasCallPriority() && from.getCallPriority() == Priority.DO_NOT_MONITOR) - { - return true; - } - - return false; - } - @Override public Listener getDecoderStateListener() { diff --git a/src/module/decode/DecoderFactory.java b/src/module/decode/DecoderFactory.java index cce17e65..691f1055 100644 --- a/src/module/decode/DecoderFactory.java +++ b/src/module/decode/DecoderFactory.java @@ -222,7 +222,7 @@ public class DecoderFactory if(channelType == ChannelType.STANDARD) { - modules.add(new TrafficChannelManager(channelModel, channelProcessingManager, decodeConfig, + modules.add(new TrafficChannelManager(channelModel, decodeConfig, channel.getRecordConfiguration(), channel.getSystem(), channel.getSite(), (aliasList != null ? aliasList.getName() : null), mptConfig.getTrafficChannelPoolSize())); } @@ -263,7 +263,7 @@ public class DecoderFactory if(channelType == ChannelType.STANDARD) { - modules.add(new TrafficChannelManager(channelModel, channelProcessingManager, decodeConfig, + modules.add(new TrafficChannelManager(channelModel, decodeConfig, channel.getRecordConfiguration(), channel.getSystem(), channel.getSite(), (aliasList != null ? aliasList.getName() : null), p25Config.getTrafficChannelPoolSize())); }