P25 Work in progress. Adds CRC checking to NID/DUID. Adds limiter to trellis decoder to prevent it from decoding an excessive error message. Updates channel state with initial handling/generation of call events.

This commit is contained in:
dennis.sheirer
2014-12-14 02:34:19 +00:00
parent 0d8da161e1
commit 170688b95e
42 changed files with 1099 additions and 390 deletions

View File

@@ -58,7 +58,7 @@ public class BaseNode extends DefaultMutableTreeNode
return null;
}
public Color getForegroundColor()
public Color getBackgroundColor()
{
return null;
}

View File

@@ -54,11 +54,32 @@ public class ControllerTreeCellRenderer extends DefaultTreeCellRenderer
setIcon( icon );
Color foreground = node.getForegroundColor();
Color background = node.getBackgroundColor();
if( foreground != null )
if( background != null )
{
setForeground( foreground );
setBackground( background );
setOpaque( true );
if( selected )
{
if( background == Color.CYAN )
{
setForeground( Color.ORANGE );
}
else if( background == Color.GREEN )
{
setForeground( Color.MAGENTA );
}
else if( background == Color.RED )
{
setForeground( Color.YELLOW );
}
}
}
else
{
setOpaque( false );
}
}

View File

@@ -127,7 +127,7 @@ public abstract class CallEvent
public abstract Alias getToIDAlias();
public abstract int getChannel();
public abstract String getChannel();
public abstract long getFrequency();
@@ -216,6 +216,7 @@ public abstract class CallEvent
CALL_UNIQUE_ID( "UID Call" ),
CALL_NO_TUNER( "Call - No Tuner" ),
CALL_TIMEOUT( "Call Timeout" ),
DEREGISTER( "Deregister" ),
EMERGENCY( "EMERGENCY" ),
GPS( "GPS" ),
ID_ANI( "ANI" ),

View File

@@ -296,16 +296,7 @@ public class CallEventModel extends AbstractTableModel
case TO_ALIAS:
return mEvents.get( rowIndex ).getToIDAlias();
case CHANNEL:
int channel = mEvents.get( rowIndex ).getChannel();
if( channel != 0 )
{
return channel;
}
else
{
return null;
}
return mEvents.get( rowIndex ).getChannel();
case FREQUENCY:
long frequency = mEvents.get( rowIndex ).getFrequency();

View File

@@ -104,7 +104,7 @@ public class ChannelNode extends ConfigurableNode implements ChannelEventListene
}
@Override
public Color getForegroundColor()
public Color getBackgroundColor()
{
if( getChannel().getEnabled() )
{

View File

@@ -64,7 +64,7 @@ public class SiteNode extends ConfigurableNode
}
@Override
public Color getForegroundColor()
public Color getBackgroundColor()
{
@SuppressWarnings( "unchecked" )
Enumeration<DefaultMutableTreeNode> nodes = children();
@@ -73,9 +73,9 @@ public class SiteNode extends ConfigurableNode
{
ChannelNode child = (ChannelNode)nodes.nextElement();
if( child.getForegroundColor() != null )
if( child.getBackgroundColor() != null )
{
return Color.BLUE;
return Color.CYAN;
}
}

View File

@@ -64,7 +64,7 @@ public class SystemNode extends ConfigurableNode
}
@Override
public Color getForegroundColor()
public Color getBackgroundColor()
{
@SuppressWarnings( "unchecked" )
Enumeration<DefaultMutableTreeNode> nodes = children();
@@ -73,9 +73,9 @@ public class SystemNode extends ConfigurableNode
{
SiteNode child = (SiteNode)nodes.nextElement();
if( child.getForegroundColor() != null )
if( child.getBackgroundColor() != null )
{
return Color.BLUE;
return Color.CYAN;
}
}