P25 work in progress - final check-in of channel state and activity summary processing of TSBK and PDU messages and event generation.

This commit is contained in:
dennis.sheirer
2014-12-21 14:30:06 +00:00
parent ba053457bd
commit 1d77f28958
36 changed files with 1952 additions and 438 deletions

View File

@@ -38,7 +38,7 @@ public class ThreadPoolManager
{
}
public ScheduledFuture<?> schedule( ThreadType type,
public ScheduledFuture<?> scheduleFixedRate( ThreadType type,
Runnable command,
long period,
TimeUnit unit )
@@ -66,6 +66,25 @@ public class ThreadPoolManager
}
public void scheduleOnce( Runnable command, long delay, TimeUnit unit )
throws RejectedExecutionException
{
if( mExecutor == null )
{
mExecutor = Executors.newScheduledThreadPool( THREAD_POOL_SIZE );
}
if( mTasks.size() <= MAX_TASK_COUNT )
{
mExecutor.schedule( command, delay, unit );
}
else
{
throw new RejectedExecutionException( "Cannot schedule task - at "
+ "max task count [" + mTasks.size() + "]" );
}
}
public void cancel( ScheduledFuture<?> task )
{
task.cancel( true );

View File

@@ -209,24 +209,29 @@ public abstract class CallEvent
public enum CallEventType
{
ACKNOWLEDGE( "Acknowledge" ),
CALL( "Call" ),
CALL_ALERT( "Call Alert" ),
CALL_END( "Call End" ),
CALL_DETECT( "Call Detect" ),
CALL_UNIQUE_ID( "UID Call" ),
CALL_NO_TUNER( "Call - No Tuner" ),
CALL_TIMEOUT( "Call Timeout" ),
COMMAND( "Command" ),
DATA_CALL( "Data Call" ),
DEREGISTER( "Deregister" ),
EMERGENCY( "EMERGENCY" ),
FUNCTION( "Function" ),
GPS( "GPS" ),
ID_ANI( "ANI" ),
ID_UNIQUE( "Unique ID" ),
PAGE( "Page" ),
QUERY( "Query" ),
REGISTER( "Register" ),
REGISTER_ESN( "ESN" ),
REQUEST( "Request" ),
SDM( "SDM" ),
RESPONSE( "Response" ),
SDM( "Short Data Message" ),
STATUS( "Status" ),
TELEPHONE_CALL( "Telephone Call" ),
UNKNOWN( "Unknown" ),
INVALID( "Invalid" );

View File

@@ -283,7 +283,7 @@ public class ProcessingChain implements Listener<Message>
{
mProcessorTask =
mResourceManager.getThreadPoolManager()
.schedule( ThreadType.DECODER,
.scheduleFixedRate( ThreadType.DECODER,
new ComplexProcessor(),
50, TimeUnit.MILLISECONDS );
@@ -305,7 +305,7 @@ public class ProcessingChain implements Listener<Message>
{
mProcessorTask =
mResourceManager.getThreadPoolManager()
.schedule( ThreadType.DECODER,
.scheduleFixedRate( ThreadType.DECODER,
new RealProcessor(),
50, TimeUnit.MILLISECONDS );