mirror of
https://github.com/DSheirer/sdrtrunk.git
synced 2026-11-09 23:27:24 -05:00
Updated LTR Standard decoder state to new architecture to support
per-call recording and accurate state tracking. Resolved issue with ThreadPoolManager limiting total number of scheduled tasks (removed limiter - original intent is now OBE) Updated ChannelState to better handle auxiliary decoder decode events, so that when a fleetsync ident is at the end of the transmission, the decode doesn't kick the channel back into a call state after it has faded, causing static bursts and additional empty recordings. Updated recording file name to include millisecond level precision, to further avoid duplicate recording names
This commit is contained in:
@@ -32,7 +32,6 @@ public class ThreadPoolManager
|
||||
private final static Logger mLog = LoggerFactory.getLogger( ThreadPoolManager.class );
|
||||
|
||||
private int THREAD_POOL_SIZE = 2;
|
||||
private int MAX_TASK_COUNT = 24;
|
||||
|
||||
private HashMap<ScheduledFuture<?>,ThreadType> mTasks =
|
||||
new HashMap<ScheduledFuture<?>,ThreadType>();
|
||||
@@ -55,21 +54,12 @@ public class ThreadPoolManager
|
||||
new NamingThreadFactory( "sdrtrunk" ) );
|
||||
}
|
||||
|
||||
if( mTasks.size() <= MAX_TASK_COUNT )
|
||||
{
|
||||
ScheduledFuture<?> task =
|
||||
mExecutor.scheduleAtFixedRate( command, 0, period, unit );
|
||||
|
||||
mTasks.put( task, type );
|
||||
|
||||
return task;
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new RejectedExecutionException( "Cannot schedule task - at "
|
||||
+ "max task count [" + mTasks.size() + "]" );
|
||||
}
|
||||
ScheduledFuture<?> task =
|
||||
mExecutor.scheduleAtFixedRate( command, 0, period, unit );
|
||||
|
||||
mTasks.put( task, type );
|
||||
|
||||
return task;
|
||||
}
|
||||
|
||||
public void scheduleOnce( Runnable command, long delay, TimeUnit unit )
|
||||
@@ -81,22 +71,14 @@ public class ThreadPoolManager
|
||||
new NamingThreadFactory( "sdrtrunk" ) );
|
||||
}
|
||||
|
||||
if( mTasks.size() <= MAX_TASK_COUNT )
|
||||
{
|
||||
mExecutor.schedule( command, delay, unit );
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new RejectedExecutionException( "Cannot schedule task - at "
|
||||
+ "max task count [" + mTasks.size() + "]" );
|
||||
}
|
||||
mExecutor.schedule( command, delay, unit );
|
||||
}
|
||||
|
||||
public void cancel( ScheduledFuture<?> task )
|
||||
{
|
||||
task.cancel( true );
|
||||
|
||||
ThreadType type = mTasks.remove( task );
|
||||
mTasks.remove( task );
|
||||
}
|
||||
|
||||
public int getTaskCount( ThreadType type )
|
||||
|
||||
Reference in New Issue
Block a user