#66 resolves issue with baseband recorders and loggers not being removed from channel processing chains when processing stops. This is now handled in the channel processing manager where baseband recorders and message/event loggers are added at processing start and removed at processing stop.

This commit is contained in:
Denny
2017-01-08 05:21:42 -05:00
parent a55296eb45
commit 7865e813de
3 changed files with 17 additions and 20 deletions

View File

@@ -218,8 +218,7 @@ public class ChannelProcessingManager implements ChannelEventListener
}
/* Setup event logging */
List<Module> loggers = mEventLogManager.getLoggers(
channel.getEventLogConfiguration(), channel.getName());
List<Module> loggers = mEventLogManager.getLoggers(channel.getEventLogConfiguration(), channel.getName());
if (!loggers.isEmpty())
{
@@ -232,19 +231,15 @@ public class ChannelProcessingManager implements ChannelEventListener
if (!recorders.isEmpty())
{
/* Add baseband recorder */
if ((recorders.contains(RecorderType.BASEBAND) &&
channel.getChannelType() == ChannelType.STANDARD))
if ((recorders.contains(RecorderType.BASEBAND) && channel.getChannelType() == ChannelType.STANDARD))
{
processingChain.addModule(mRecorderManager.getBasebandRecorder(
channel.toString()));
processingChain.addModule(mRecorderManager.getBasebandRecorder(channel.toString()));
}
/* Add traffic channel baseband recorder */
if (recorders.contains(RecorderType.TRAFFIC_BASEBAND) &&
channel.getChannelType() == ChannelType.TRAFFIC)
if (recorders.contains(RecorderType.TRAFFIC_BASEBAND) && channel.getChannelType() == ChannelType.TRAFFIC)
{
processingChain.addModule(mRecorderManager
.getBasebandRecorder(channel.toString()));
processingChain.addModule(mRecorderManager.getBasebandRecorder(channel.toString()));
}
}
@@ -275,9 +270,14 @@ public class ChannelProcessingManager implements ChannelEventListener
if (mProcessingChains.containsKey(channel.getChannelID()))
{
ProcessingChain chain = mProcessingChains.get(channel.getChannelID());
ProcessingChain processingChain = mProcessingChains.get(channel.getChannelID());
processingChain.stop();
processingChain.removeEventLoggingModules();
processingChain.removeRecordingModules();
chain.stop();
mChannelModel.broadcast(new ChannelEvent(channel, Event.NOTIFICATION_PROCESSING_STOP));
@@ -285,7 +285,7 @@ public class ChannelProcessingManager implements ChannelEventListener
{
mProcessingChains.remove(channel.getChannelID());
chain.dispose();
processingChain.dispose();
}
}
}