mirror of
https://github.com/DSheirer/sdrtrunk.git
synced 2026-11-20 04:27:48 -05:00
Resolves #188 - cleanup of the P25 and MPT activity summaries. Resolves an issue in the SNDCP downlink/uplink channel frequencies.
This commit is contained in:
@@ -38,7 +38,7 @@ public class ChannelDetailPanel extends JPanel implements Listener<ProcessingCha
|
|||||||
private JLabel mSystemLabel;
|
private JLabel mSystemLabel;
|
||||||
private JLabel mSiteLabel;
|
private JLabel mSiteLabel;
|
||||||
private JLabel mNameLabel;
|
private JLabel mNameLabel;
|
||||||
private JTextPane mDetailTextPane;
|
private JTextArea mDetailTextPane;
|
||||||
|
|
||||||
private ChannelProcessingManager mChannelProcessingManager;
|
private ChannelProcessingManager mChannelProcessingManager;
|
||||||
private ProcessingChain mProcessingChain;
|
private ProcessingChain mProcessingChain;
|
||||||
@@ -82,9 +82,7 @@ public class ChannelDetailPanel extends JPanel implements Listener<ProcessingCha
|
|||||||
|
|
||||||
add(buttonPanel, "wrap");
|
add(buttonPanel, "wrap");
|
||||||
|
|
||||||
mDetailTextPane = new JTextPane();
|
mDetailTextPane = new JTextArea(EMPTY_DETAILS);
|
||||||
mDetailTextPane.setContentType("text/html");
|
|
||||||
mDetailTextPane.setText(EMPTY_DETAILS);
|
|
||||||
DefaultCaret caret = (DefaultCaret)mDetailTextPane.getCaret();
|
DefaultCaret caret = (DefaultCaret)mDetailTextPane.getCaret();
|
||||||
caret.setUpdatePolicy(DefaultCaret.NEVER_UPDATE);
|
caret.setUpdatePolicy(DefaultCaret.NEVER_UPDATE);
|
||||||
add(new JScrollPane(mDetailTextPane));
|
add(new JScrollPane(mDetailTextPane));
|
||||||
|
|||||||
@@ -23,6 +23,9 @@ public abstract class DecoderState extends Module implements ActivitySummaryProv
|
|||||||
IAttributeChangeRequestProvider, ICallEventProvider, IDecoderStateEventListener,
|
IAttributeChangeRequestProvider, ICallEventProvider, IDecoderStateEventListener,
|
||||||
IDecoderStateEventProvider, IMessageListener
|
IDecoderStateEventProvider, IMessageListener
|
||||||
{
|
{
|
||||||
|
protected String DIVIDER1 = "======================================================\n";
|
||||||
|
protected String DIVIDER2 = "------------------------------------------------------\n";
|
||||||
|
|
||||||
/* This has to be a broadcaster in order for references to persist */
|
/* This has to be a broadcaster in order for references to persist */
|
||||||
private Broadcaster<CallEvent> mCallEventBroadcaster = new Broadcaster<>();
|
private Broadcaster<CallEvent> mCallEventBroadcaster = new Broadcaster<>();
|
||||||
private Broadcaster<AttributeChangeRequest> mAttributeChangeRequestBroadcaster = new Broadcaster<>();
|
private Broadcaster<AttributeChangeRequest> mAttributeChangeRequestBroadcaster = new Broadcaster<>();
|
||||||
|
|||||||
@@ -389,9 +389,9 @@ public class MPT1327DecoderState extends DecoderState
|
|||||||
{
|
{
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
|
|
||||||
sb.append("Activity Summary\n");
|
sb.append("Activity Summary - Decoder: MPT-1327\n");
|
||||||
sb.append("Decoder:\tMPT-1327\n");
|
sb.append(DIVIDER1);
|
||||||
sb.append("Site:\t");
|
sb.append("Site: ");
|
||||||
|
|
||||||
if(mSite != null)
|
if(mSite != null)
|
||||||
{
|
{
|
||||||
@@ -403,9 +403,7 @@ public class MPT1327DecoderState extends DecoderState
|
|||||||
|
|
||||||
if(siteAlias != null)
|
if(siteAlias != null)
|
||||||
{
|
{
|
||||||
sb.append(" ");
|
sb.append(" ").append(siteAlias.getName()).append("\n");
|
||||||
sb.append(siteAlias.getName());
|
|
||||||
sb.append("\n");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -414,13 +412,11 @@ public class MPT1327DecoderState extends DecoderState
|
|||||||
sb.append("Unknown\n");
|
sb.append("Unknown\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
sb.append("\n\n");
|
sb.append(DIVIDER2).append("Talkgroups: ");
|
||||||
|
|
||||||
sb.append("Talkgroups\n\n");
|
|
||||||
|
|
||||||
if(mGroups.isEmpty())
|
if(mGroups.isEmpty())
|
||||||
{
|
{
|
||||||
sb.append(" None\n");
|
sb.append("None\n");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -429,8 +425,7 @@ public class MPT1327DecoderState extends DecoderState
|
|||||||
|
|
||||||
for(String talkgroup : talkgroups)
|
for(String talkgroup : talkgroups)
|
||||||
{
|
{
|
||||||
sb.append(" ");
|
sb.append("\n ").append(talkgroup);
|
||||||
sb.append(talkgroup);
|
|
||||||
|
|
||||||
if(hasAliasList())
|
if(hasAliasList())
|
||||||
{
|
{
|
||||||
@@ -450,7 +445,7 @@ public class MPT1327DecoderState extends DecoderState
|
|||||||
|
|
||||||
for(String member : members)
|
for(String member : members)
|
||||||
{
|
{
|
||||||
sb.append(" >");
|
sb.append(" >");
|
||||||
sb.append(member);
|
sb.append(member);
|
||||||
|
|
||||||
if(hasAliasList())
|
if(hasAliasList())
|
||||||
@@ -466,27 +461,26 @@ public class MPT1327DecoderState extends DecoderState
|
|||||||
|
|
||||||
sb.append("\n");
|
sb.append("\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
sb.append("\n");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
sb.append("\n");
|
sb.append(DIVIDER2).append("All Idents: ");
|
||||||
|
|
||||||
sb.append("Individual Idents\n");
|
|
||||||
if(mIdents.isEmpty())
|
if(mIdents.isEmpty())
|
||||||
{
|
{
|
||||||
sb.append(" None\n");
|
sb.append("None\n");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
sb.append("\n");
|
||||||
|
|
||||||
Iterator<String> it = mIdents.iterator();
|
Iterator<String> it = mIdents.iterator();
|
||||||
|
|
||||||
while(it.hasNext())
|
while(it.hasNext())
|
||||||
{
|
{
|
||||||
String ident = it.next();
|
String ident = it.next();
|
||||||
|
|
||||||
sb.append(" ");
|
sb.append("");
|
||||||
sb.append(ident);
|
sb.append(ident);
|
||||||
sb.append(" ");
|
sb.append(" ");
|
||||||
|
|
||||||
|
|||||||
@@ -148,6 +148,7 @@ public class P25DecoderState extends DecoderState
|
|||||||
private static final DecimalFormat mFrequencyFormatter =
|
private static final DecimalFormat mFrequencyFormatter =
|
||||||
new DecimalFormat("0.000000");
|
new DecimalFormat("0.000000");
|
||||||
|
|
||||||
|
|
||||||
private module.decode.p25.message.tsbk.osp.control.NetworkStatusBroadcast mNetworkStatus;
|
private module.decode.p25.message.tsbk.osp.control.NetworkStatusBroadcast mNetworkStatus;
|
||||||
private NetworkStatusBroadcastExtended mNetworkStatusExtended;
|
private NetworkStatusBroadcastExtended mNetworkStatusExtended;
|
||||||
private ProtectionParameterBroadcast mProtectionParameterBroadcast;
|
private ProtectionParameterBroadcast mProtectionParameterBroadcast;
|
||||||
@@ -3343,9 +3344,9 @@ public class P25DecoderState extends DecoderState
|
|||||||
{
|
{
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
|
|
||||||
sb.append("<html><h2>Activity Summary - Decoder:P25 ").append(getModulation().name()).append("</h2>");
|
sb.append("Activity Summary - Decoder:P25 ").append(getModulation().getLabel()).append("\n");
|
||||||
sb.append("<hr>");
|
sb.append(DIVIDER1);
|
||||||
sb.append("<b>SITE:</b> ");
|
sb.append("SITE ");
|
||||||
|
|
||||||
if(mNetworkStatus != null)
|
if(mNetworkStatus != null)
|
||||||
{
|
{
|
||||||
@@ -3387,38 +3388,43 @@ public class P25DecoderState extends DecoderState
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sb.append("\n").append(DIVIDER2);
|
||||||
|
|
||||||
if(mNetworkStatus != null)
|
if(mNetworkStatus != null)
|
||||||
{
|
{
|
||||||
sb.append("<br><b>SERVICES:<b>" + SystemService.toString(mNetworkStatus.getSystemServiceClass()));
|
sb.append("SERVICES: " + SystemService.toString(mNetworkStatus.getSystemServiceClass())).append("\n");
|
||||||
sb.append("<br>PCCH:DOWNLINK ")
|
sb.append(DIVIDER2);
|
||||||
|
sb.append("PCCH DOWNLINK ")
|
||||||
.append(mFrequencyFormatter.format((double)mNetworkStatus.getDownlinkFrequency() / 1E6d))
|
.append(mFrequencyFormatter.format((double)mNetworkStatus.getDownlinkFrequency() / 1E6d))
|
||||||
.append(" [").append(mNetworkStatus.getIdentifier()).append("-").append(mNetworkStatus.getChannel())
|
.append(" [").append(mNetworkStatus.getIdentifier()).append("-").append(mNetworkStatus.getChannel())
|
||||||
.append("] UPLINK ")
|
.append("] UPLINK ")
|
||||||
.append(mFrequencyFormatter.format((double)mNetworkStatus.getUplinkFrequency() / 1E6d))
|
.append(mFrequencyFormatter.format((double)mNetworkStatus.getUplinkFrequency() / 1E6d))
|
||||||
.append(" [").append(mNetworkStatus.getIdentifier()).append("-").append(mNetworkStatus.getChannel())
|
.append(" [").append(mNetworkStatus.getIdentifier()).append("-").append(mNetworkStatus.getChannel())
|
||||||
.append("]<br>");
|
.append("]\n");
|
||||||
}
|
}
|
||||||
else if(mNetworkStatusExtended != null)
|
else if(mNetworkStatusExtended != null)
|
||||||
{
|
{
|
||||||
sb.append("<br><b>SERVICES:</b>").append(SystemService.toString(mNetworkStatusExtended.getSystemServiceClass()));
|
sb.append("\nSERVICES:").append(SystemService.toString(mNetworkStatusExtended.getSystemServiceClass()))
|
||||||
sb.append("<br><b>PCCH:</b> DOWNLINK ")
|
.append("\n");
|
||||||
|
sb.append(DIVIDER2);
|
||||||
|
sb.append("PCCH DOWNLINK ")
|
||||||
.append(mFrequencyFormatter.format((double)mNetworkStatusExtended.getDownlinkFrequency() / 1E6d))
|
.append(mFrequencyFormatter.format((double)mNetworkStatusExtended.getDownlinkFrequency() / 1E6d))
|
||||||
.append(" [").append(mNetworkStatusExtended.getTransmitIdentifier()).append("-")
|
.append(" [").append(mNetworkStatusExtended.getTransmitIdentifier()).append("-")
|
||||||
.append(mNetworkStatusExtended.getTransmitChannel()).append("] UPLINK ")
|
.append(mNetworkStatusExtended.getTransmitChannel()).append("] UPLINK ")
|
||||||
.append(mFrequencyFormatter.format((double)mNetworkStatusExtended.getUplinkFrequency() / 1E6d))
|
.append(mFrequencyFormatter.format((double)mNetworkStatusExtended.getUplinkFrequency() / 1E6d))
|
||||||
.append(" [").append(mNetworkStatusExtended.getReceiveIdentifier()).append("-")
|
.append(" [").append(mNetworkStatusExtended.getReceiveIdentifier()).append("-")
|
||||||
.append(mNetworkStatusExtended.getReceiveChannel()).append("]");
|
.append(mNetworkStatusExtended.getReceiveChannel()).append("]\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
if(mSecondaryControlChannels.isEmpty())
|
if(mSecondaryControlChannels.isEmpty())
|
||||||
{
|
{
|
||||||
sb.append("<br><b>SCCH:</b> NONE");
|
sb.append("SCCH: NONE\n");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
for(module.decode.p25.message.tsbk.osp.control.SecondaryControlChannelBroadcast sec : mSecondaryControlChannels)
|
for(module.decode.p25.message.tsbk.osp.control.SecondaryControlChannelBroadcast sec : mSecondaryControlChannels)
|
||||||
{
|
{
|
||||||
sb.append("<br><b>SCCH:</b> DOWNLINK ")
|
sb.append("SCCH DOWNLINK ")
|
||||||
.append(mFrequencyFormatter.format((double)sec.getDownlinkFrequency1() / 1E6d))
|
.append(mFrequencyFormatter.format((double)sec.getDownlinkFrequency1() / 1E6d))
|
||||||
.append(" [").append(sec.getIdentifier1()).append("-").append(sec.getChannel1()).append("] UPLINK ")
|
.append(" [").append(sec.getIdentifier1()).append("-").append(sec.getChannel1()).append("] UPLINK ")
|
||||||
.append(mFrequencyFormatter.format((double)sec.getUplinkFrequency1() / 1E6d))
|
.append(mFrequencyFormatter.format((double)sec.getUplinkFrequency1() / 1E6d))
|
||||||
@@ -3426,62 +3432,69 @@ public class P25DecoderState extends DecoderState
|
|||||||
|
|
||||||
if(sec.hasChannel2())
|
if(sec.hasChannel2())
|
||||||
{
|
{
|
||||||
sb.append("<br><b>SCCH:</b> DOWNLINK ")
|
sb.append(" SCCH 2 DOWNLINK ")
|
||||||
.append(mFrequencyFormatter.format((double)sec.getDownlinkFrequency2() / 1E6d))
|
.append(mFrequencyFormatter.format((double)sec.getDownlinkFrequency2() / 1E6d))
|
||||||
.append(" [").append(sec.getIdentifier2()).append("-").append(sec.getChannel2())
|
.append(" [").append(sec.getIdentifier2()).append("-").append(sec.getChannel2())
|
||||||
.append("] UPLINK ").append(mFrequencyFormatter.format((double)sec.getUplinkFrequency2() / 1E6d))
|
.append("] UPLINK ").append(mFrequencyFormatter.format((double)sec.getUplinkFrequency2() / 1E6d))
|
||||||
.append(" [").append(sec.getIdentifier2()).append("-").append(sec.getChannel2()).append("]");
|
.append(" [").append(sec.getIdentifier2()).append("-").append(sec.getChannel2()).append("]");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sb.append("\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if(mSNDCPDataChannel != null)
|
if(mSNDCPDataChannel != null)
|
||||||
{
|
{
|
||||||
sb.append("<br><b>SNDCP:</b> DOWNLINK ")
|
sb.append("SNDCP DOWNLINK ")
|
||||||
.append(mFrequencyFormatter.format((double)mSNDCPDataChannel.getDownlinkFrequency() / 1E6D))
|
.append(mFrequencyFormatter.format((double)mSNDCPDataChannel.getDownlinkFrequency() / 1E6D))
|
||||||
.append(" [").append(mSNDCPDataChannel.getTransmitChannel()).append("]").append(" UPLINK ")
|
.append(" [").append(mSNDCPDataChannel.getTransmitChannel()).append("]").append(" UPLINK ")
|
||||||
.append(mFrequencyFormatter.format((double)mSNDCPDataChannel.getUplinkFrequency() / 1E6D))
|
.append(mFrequencyFormatter.format((double)mSNDCPDataChannel.getUplinkFrequency() / 1E6D))
|
||||||
.append(" [").append(mSNDCPDataChannel.getReceiveChannel()).append("]");
|
.append(" [").append(mSNDCPDataChannel.getReceiveChannel()).append("]\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
if(mProtectionParameterBroadcast != null)
|
if(mProtectionParameterBroadcast != null)
|
||||||
{
|
{
|
||||||
sb.append("<br><b>ENCRYPTION:</b> TYPE:").append(mProtectionParameterBroadcast.getEncryptionType().name());
|
sb.append(DIVIDER2);
|
||||||
|
sb.append("ENCRYPTION TYPE:").append(mProtectionParameterBroadcast.getEncryptionType().name());
|
||||||
sb.append(" ALGORITHM:").append(mProtectionParameterBroadcast.getAlgorithmID());
|
sb.append(" ALGORITHM:").append(mProtectionParameterBroadcast.getAlgorithmID());
|
||||||
sb.append(" KEY:").append(mProtectionParameterBroadcast.getKeyID());
|
sb.append(" KEY:").append(mProtectionParameterBroadcast.getKeyID());
|
||||||
sb.append(" INBOUND IV:").append(mProtectionParameterBroadcast.getInboundInitializationVector());
|
sb.append(" INBOUND IV:").append(mProtectionParameterBroadcast.getInboundInitializationVector());
|
||||||
sb.append(" OUTBOUND IV:").append(mProtectionParameterBroadcast.getOutboundInitializationVector());
|
sb.append(" OUTBOUND IV:").append(mProtectionParameterBroadcast.getOutboundInitializationVector());
|
||||||
|
sb.append("\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
List<Integer> identifiers = new ArrayList<>(mBands.keySet());
|
List<Integer> identifiers = new ArrayList<>(mBands.keySet());
|
||||||
|
|
||||||
Collections.sort(identifiers);
|
Collections.sort(identifiers);
|
||||||
|
|
||||||
sb.append("<br><b>FREQUENCY BANDS:</b>");
|
sb.append(DIVIDER2).append("FREQUENCY BANDS:\n");
|
||||||
for(Integer id : identifiers)
|
for(Integer id : identifiers)
|
||||||
{
|
{
|
||||||
IBandIdentifier band = mBands.get(id);
|
IBandIdentifier band = mBands.get(id);
|
||||||
|
sb.append(band.toString()).append("\n");
|
||||||
sb.append("<br> <b>").append(id).append("</b>");
|
// sb.append(" ").append(id);
|
||||||
sb.append(" - BASE: " + mFrequencyFormatter.format(
|
// sb.append(" - BASE: " + mFrequencyFormatter.format(
|
||||||
(double)band.getBaseFrequency() / 1E6d));
|
// (double)band.getBaseFrequency() / 1E6d));
|
||||||
sb.append(" CHANNEL SIZE: " + mFrequencyFormatter.format(
|
// sb.append(" CHANNEL SIZE: " + mFrequencyFormatter.format(
|
||||||
(double)band.getChannelSpacing() / 1E6d));
|
// (double)band.getChannelSpacing() / 1E6d));
|
||||||
sb.append(" UPLINK OFFSET: " + mFrequencyFormatter.format(
|
// sb.append(" UPLINK OFFSET: " + mFrequencyFormatter.format(
|
||||||
(double)band.getTransmitOffset() / 1E6D));
|
// (double)band.getTransmitOffset() / 1E6D));
|
||||||
|
// sb.append("\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
sb.append("<br><b>NEIGHBORS:</b>");
|
sb.append(DIVIDER2).append("NEIGHBOR SITES: ");
|
||||||
|
|
||||||
if(mNeighborMap.isEmpty())
|
if(mNeighborMap.isEmpty())
|
||||||
{
|
{
|
||||||
sb.append("<li>NONE</li>");
|
sb.append("NONE\n");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
for(IAdjacentSite neighbor : mNeighborMap.values())
|
for(IAdjacentSite neighbor : mNeighborMap.values())
|
||||||
{
|
{
|
||||||
sb.append("<li>NAC:").append(((P25Message)neighbor).getNAC());
|
sb.append("\n");
|
||||||
|
sb.append("NAC:").append(((P25Message)neighbor).getNAC());
|
||||||
sb.append("h SYSTEM:" + neighbor.getSystemID());
|
sb.append("h SYSTEM:" + neighbor.getSystemID());
|
||||||
sb.append("h LRA:" + neighbor.getLRA());
|
sb.append("h LRA:" + neighbor.getLRA());
|
||||||
|
|
||||||
@@ -3500,18 +3513,15 @@ public class P25DecoderState extends DecoderState
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
sb.append("<br> PCCH: DOWNLINK ")
|
sb.append("\n PCCH: DOWNLINK ")
|
||||||
.append(mFrequencyFormatter.format((double)neighbor.getDownlinkFrequency() / 1E6d))
|
.append(mFrequencyFormatter.format((double)neighbor.getDownlinkFrequency() / 1E6d))
|
||||||
.append(" [").append(neighbor.getDownlinkChannel()).append("] UPLINK:")
|
.append(" [").append(neighbor.getDownlinkChannel()).append("] UPLINK:")
|
||||||
.append(mFrequencyFormatter.format((double)neighbor.getUplinkFrequency() / 1E6d))
|
.append(mFrequencyFormatter.format((double)neighbor.getUplinkFrequency() / 1E6d))
|
||||||
.append(" [").append(neighbor.getDownlinkChannel()).append("] SERVICES: ")
|
.append(" [").append(neighbor.getDownlinkChannel()).append("] SERVICES: ")
|
||||||
.append(neighbor.getSystemServiceClass());
|
.append(neighbor.getSystemServiceClass());
|
||||||
sb.append("</li");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
sb.append("</html>");
|
|
||||||
|
|
||||||
return sb.toString();
|
return sb.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -31,15 +31,19 @@ public class IdentifierUpdateNonVUHF extends IdentifierUpdate
|
|||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
|
|
||||||
sb.append( getMessageStub() );
|
sb.append( getMessageStub() );
|
||||||
|
sb.append(toString());
|
||||||
|
|
||||||
sb.append( " IDEN:" + getIdentifier() );
|
return sb.toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
public String toString()
|
||||||
|
{
|
||||||
|
StringBuilder sb = new StringBuilder();
|
||||||
|
|
||||||
|
sb.append( " ID:" + getIdentifier() );
|
||||||
sb.append( " BASE:" + getBaseFrequency() );
|
sb.append( " BASE:" + getBaseFrequency() );
|
||||||
|
sb.append( " BANDWIDTH:" + getBandwidth() );
|
||||||
sb.append( " BW:" + getBandwidth() );
|
|
||||||
|
|
||||||
sb.append( " SPACING:" + getChannelSpacing() );
|
sb.append( " SPACING:" + getChannelSpacing() );
|
||||||
|
|
||||||
sb.append( " OFFSET:" + getTransmitOffset() );
|
sb.append( " OFFSET:" + getTransmitOffset() );
|
||||||
|
|
||||||
return sb.toString();
|
return sb.toString();
|
||||||
|
|||||||
@@ -30,18 +30,26 @@ public class IdentifierUpdateTDMA extends IdentifierUpdate
|
|||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
|
|
||||||
sb.append( getMessageStub() );
|
sb.append( getMessageStub() );
|
||||||
|
sb.append(toString());
|
||||||
sb.append( " IDEN:" + getIdentifier() );
|
|
||||||
sb.append( " BASE:" + getBaseFrequency() );
|
|
||||||
sb.append( " BW:" + getBandwidth() );
|
|
||||||
sb.append( " SPACING:" + getChannelSpacing() );
|
|
||||||
sb.append( " OFFSET:" + getTransmitOffset() );
|
|
||||||
sb.append( " TYPE:" + getChannelType().toString() );
|
|
||||||
|
|
||||||
return sb.toString();
|
return sb.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
public ChannelType getChannelType()
|
public String toString()
|
||||||
|
{
|
||||||
|
StringBuilder sb = new StringBuilder();
|
||||||
|
|
||||||
|
sb.append( " ID:" + getIdentifier() );
|
||||||
|
sb.append( " BASE:" + getBaseFrequency() );
|
||||||
|
sb.append( " BW:" + getBandwidth() );
|
||||||
|
sb.append( " SPACING:" + getChannelSpacing() );
|
||||||
|
sb.append( " OFFSET:" + getTransmitOffset() );
|
||||||
|
sb.append( " TYPE:" + getChannelType().toString() );
|
||||||
|
|
||||||
|
return sb.toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
public ChannelType getChannelType()
|
||||||
{
|
{
|
||||||
return ChannelType.fromValue( mMessage.getInt( CHANNEL_TYPE) );
|
return ChannelType.fromValue( mMessage.getInt( CHANNEL_TYPE) );
|
||||||
}
|
}
|
||||||
@@ -109,7 +117,7 @@ public class IdentifierUpdateTDMA extends IdentifierUpdate
|
|||||||
}
|
}
|
||||||
|
|
||||||
sb.append( mAccessType.name() );
|
sb.append( mAccessType.name() );
|
||||||
sb.append( " BW:" + mBandwidth );
|
sb.append( " BANDWIDTH:" + mBandwidth );
|
||||||
sb.append( " SLOT/CARRIER:" + mSlotsPerCarrier );
|
sb.append( " SLOT/CARRIER:" + mSlotsPerCarrier );
|
||||||
sb.append( " VOCODER:" + mVocoder.name() );
|
sb.append( " VOCODER:" + mVocoder.name() );
|
||||||
|
|
||||||
|
|||||||
@@ -32,15 +32,19 @@ public class IdentifierUpdateVUHF extends IdentifierUpdate
|
|||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
|
|
||||||
sb.append( getMessageStub() );
|
sb.append( getMessageStub() );
|
||||||
|
sb.append(toString());
|
||||||
|
|
||||||
sb.append( " IDEN:" + getIdentifier() );
|
return sb.toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
public String toString()
|
||||||
|
{
|
||||||
|
StringBuilder sb = new StringBuilder();
|
||||||
|
|
||||||
|
sb.append( " ID:" + getIdentifier() );
|
||||||
sb.append( " BASE:" + getBaseFrequency() );
|
sb.append( " BASE:" + getBaseFrequency() );
|
||||||
|
sb.append( " BANDWIDTH:" + getBandwidth() );
|
||||||
sb.append( " BW:" + getBandwidth() );
|
|
||||||
|
|
||||||
sb.append( " SPACING:" + getChannelSpacing() );
|
sb.append( " SPACING:" + getChannelSpacing() );
|
||||||
|
|
||||||
sb.append( " OFFSET:" + getTransmitOffset() );
|
sb.append( " OFFSET:" + getTransmitOffset() );
|
||||||
|
|
||||||
return sb.toString();
|
return sb.toString();
|
||||||
|
|||||||
@@ -1,44 +1,49 @@
|
|||||||
package module.decode.p25.message.tsbk.osp.control;
|
package module.decode.p25.message.tsbk.osp.control;
|
||||||
|
|
||||||
|
import alias.AliasList;
|
||||||
|
import bits.BinaryMessage;
|
||||||
import module.decode.p25.message.IBandIdentifier;
|
import module.decode.p25.message.IBandIdentifier;
|
||||||
import module.decode.p25.message.IdentifierReceiver;
|
import module.decode.p25.message.IdentifierReceiver;
|
||||||
import module.decode.p25.message.tsbk.TSBKMessage;
|
import module.decode.p25.message.tsbk.TSBKMessage;
|
||||||
import module.decode.p25.reference.DataUnitID;
|
import module.decode.p25.reference.DataUnitID;
|
||||||
import module.decode.p25.reference.Opcode;
|
import module.decode.p25.reference.Opcode;
|
||||||
|
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
import alias.AliasList;
|
|
||||||
import bits.BinaryMessage;
|
|
||||||
|
|
||||||
public class SecondaryControlChannelBroadcast extends TSBKMessage
|
public class SecondaryControlChannelBroadcast extends TSBKMessage
|
||||||
implements IdentifierReceiver, Comparable<SecondaryControlChannelBroadcast>
|
implements IdentifierReceiver, Comparable<SecondaryControlChannelBroadcast>
|
||||||
{
|
{
|
||||||
private final static Logger mLog =
|
private final static Logger mLog =
|
||||||
LoggerFactory.getLogger( SecondaryControlChannelBroadcast.class );
|
LoggerFactory.getLogger(SecondaryControlChannelBroadcast.class);
|
||||||
|
|
||||||
public static final int[] RFSS_ID = { 80,81,82,83,84,85,86,87 };
|
public static final int[] RFSS_ID = {80, 81, 82, 83, 84, 85, 86, 87};
|
||||||
public static final int[] SITE_ID = { 88,89,90,91,92,93,94,95 };
|
public static final int[] SITE_ID = {88, 89, 90, 91, 92, 93, 94, 95};
|
||||||
public static final int[] IDENTIFIER_1 = { 96,97,98,99 };
|
public static final int[] IDENTIFIER_1 = {96, 97, 98, 99};
|
||||||
public static final int[] CHANNEL_1 = { 100,101,102,103,104,105,106,107,108,
|
public static final int[] CHANNEL_1 = {100, 101, 102, 103, 104, 105, 106, 107, 108,
|
||||||
109,110,111 };
|
109, 110, 111};
|
||||||
public static final int[] SYSTEM_SERVICE_CLASS_1 = { 112,113,114,115,116,
|
public static final int[] SYSTEM_SERVICE_CLASS_1 = {112, 113, 114, 115, 116,
|
||||||
117,118,119 };
|
117, 118, 119};
|
||||||
public static final int[] IDENTIFIER_2 = { 120,121,122,123 };
|
public static final int[] IDENTIFIER_2 = {120, 121, 122, 123};
|
||||||
public static final int[] CHANNEL_2 = { 124,125,126,127,128,129,130,131,132,
|
public static final int[] CHANNEL_2 = {124, 125, 126, 127, 128, 129, 130, 131, 132,
|
||||||
133,134,135 };
|
133, 134, 135};
|
||||||
public static final int[] SYSTEM_SERVICE_CLASS_2 = { 136,137,138,139,140,
|
public static final int[] SYSTEM_SERVICE_CLASS_2 = {136, 137, 138, 139, 140,
|
||||||
141,142,143 };
|
141, 142, 143};
|
||||||
|
|
||||||
private IBandIdentifier mIdentifierUpdate1;
|
private IBandIdentifier mIdentifierUpdate1;
|
||||||
private IBandIdentifier mIdentifierUpdate2;
|
private IBandIdentifier mIdentifierUpdate2;
|
||||||
|
|
||||||
public SecondaryControlChannelBroadcast( BinaryMessage message,
|
private int mRFSS;
|
||||||
DataUnitID duid,
|
private int mSite;
|
||||||
AliasList aliasList )
|
private int mIdent1;
|
||||||
|
private int mIdent2;
|
||||||
|
private int mChan1;
|
||||||
|
private int mChan2;
|
||||||
|
|
||||||
|
public SecondaryControlChannelBroadcast(BinaryMessage message,
|
||||||
|
DataUnitID duid,
|
||||||
|
AliasList aliasList)
|
||||||
{
|
{
|
||||||
super( message, duid, aliasList );
|
super(message, duid, aliasList);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -51,29 +56,29 @@ public class SecondaryControlChannelBroadcast extends TSBKMessage
|
|||||||
{
|
{
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
|
|
||||||
sb.append( getMessageStub() );
|
sb.append(getMessageStub());
|
||||||
|
|
||||||
sb.append( " SITE:" + getRFSS() + "-" + getSiteID() );
|
sb.append(" SITE:" + getRFSS() + "-" + getSiteID());
|
||||||
|
|
||||||
sb.append( " CHAN1:" + getIdentifier1() + "-" + getChannel1() );
|
sb.append(" CHAN1:" + getIdentifier1() + "-" + getChannel1());
|
||||||
|
|
||||||
sb.append( " DN1:" + getDownlinkFrequency1() );
|
sb.append(" DN1:" + getDownlinkFrequency1());
|
||||||
|
|
||||||
sb.append( " UP1:" + getUplinkFrequency1() );
|
sb.append(" UP1:" + getUplinkFrequency1());
|
||||||
|
|
||||||
sb.append( " SVC1:" +
|
sb.append(" SVC1:" +
|
||||||
SystemService.toString( getSystemServiceClass1() ) );
|
SystemService.toString(getSystemServiceClass1()));
|
||||||
|
|
||||||
if( hasChannel2() )
|
if(hasChannel2())
|
||||||
{
|
{
|
||||||
sb.append( " CHAN2:" + getIdentifier2() + "-" + getChannel2() );
|
sb.append(" CHAN2:" + getIdentifier2() + "-" + getChannel2());
|
||||||
|
|
||||||
sb.append( " DN2:" + getDownlinkFrequency2() );
|
sb.append(" DN2:" + getDownlinkFrequency2());
|
||||||
|
|
||||||
sb.append( " UP2:" + getUplinkFrequency2() );
|
sb.append(" UP2:" + getUplinkFrequency2());
|
||||||
|
|
||||||
sb.append( " SVC2:" +
|
sb.append(" SVC2:" +
|
||||||
SystemService.toString( getSystemServiceClass2() ) );
|
SystemService.toString(getSystemServiceClass2()));
|
||||||
}
|
}
|
||||||
|
|
||||||
return sb.toString();
|
return sb.toString();
|
||||||
@@ -81,127 +86,162 @@ public class SecondaryControlChannelBroadcast extends TSBKMessage
|
|||||||
|
|
||||||
public String getRFSS()
|
public String getRFSS()
|
||||||
{
|
{
|
||||||
return mMessage.getHex( RFSS_ID, 2 );
|
return mMessage.getHex(RFSS_ID, 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getSiteID()
|
public String getSiteID()
|
||||||
{
|
{
|
||||||
return mMessage.getHex( SITE_ID, 2 );
|
return mMessage.getHex(SITE_ID, 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getIdentifier1()
|
public int getIdentifier1()
|
||||||
{
|
{
|
||||||
return mMessage.getInt( IDENTIFIER_1 );
|
return mMessage.getInt(IDENTIFIER_1);
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getChannel1()
|
public int getChannel1()
|
||||||
{
|
{
|
||||||
return mMessage.getInt( CHANNEL_1 );
|
return mMessage.getInt(CHANNEL_1);
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getSystemServiceClass1()
|
public int getSystemServiceClass1()
|
||||||
{
|
{
|
||||||
return mMessage.getInt( SYSTEM_SERVICE_CLASS_1 );
|
return mMessage.getInt(SYSTEM_SERVICE_CLASS_1);
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getIdentifier2()
|
public int getIdentifier2()
|
||||||
{
|
{
|
||||||
return mMessage.getInt( IDENTIFIER_2 );
|
return mMessage.getInt(IDENTIFIER_2);
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getChannel2()
|
public int getChannel2()
|
||||||
{
|
{
|
||||||
return mMessage.getInt( CHANNEL_2 );
|
return mMessage.getInt(CHANNEL_2);
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getSystemServiceClass2()
|
public int getSystemServiceClass2()
|
||||||
{
|
{
|
||||||
return mMessage.getInt( SYSTEM_SERVICE_CLASS_2 );
|
return mMessage.getInt(SYSTEM_SERVICE_CLASS_2);
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean hasChannel2()
|
public boolean hasChannel2()
|
||||||
{
|
{
|
||||||
return getSystemServiceClass2() != 0;
|
return getSystemServiceClass2() != 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public long getDownlinkFrequency1()
|
public long getDownlinkFrequency1()
|
||||||
{
|
{
|
||||||
return calculateDownlink( mIdentifierUpdate1, getChannel1() );
|
return calculateDownlink(mIdentifierUpdate1, getChannel1());
|
||||||
}
|
}
|
||||||
|
|
||||||
public long getUplinkFrequency1()
|
public long getUplinkFrequency1()
|
||||||
{
|
{
|
||||||
return calculateUplink( mIdentifierUpdate1, getChannel1() );
|
return calculateUplink(mIdentifierUpdate1, getChannel1());
|
||||||
}
|
}
|
||||||
|
|
||||||
public long getDownlinkFrequency2()
|
public long getDownlinkFrequency2()
|
||||||
{
|
{
|
||||||
return calculateDownlink( mIdentifierUpdate2, getChannel2() );
|
return calculateDownlink(mIdentifierUpdate2, getChannel2());
|
||||||
}
|
}
|
||||||
|
|
||||||
public long getUplinkFrequency2()
|
public long getUplinkFrequency2()
|
||||||
{
|
{
|
||||||
return calculateUplink( mIdentifierUpdate2, getChannel2() );
|
return calculateUplink(mIdentifierUpdate2, getChannel2());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setIdentifierMessage( int identifier, IBandIdentifier message )
|
public void setIdentifierMessage(int identifier, IBandIdentifier message)
|
||||||
{
|
{
|
||||||
if( identifier == getIdentifier1() )
|
if(identifier == getIdentifier1())
|
||||||
{
|
{
|
||||||
mIdentifierUpdate1 = message;
|
mIdentifierUpdate1 = message;
|
||||||
}
|
}
|
||||||
|
|
||||||
if( identifier == getIdentifier2() )
|
if(identifier == getIdentifier2())
|
||||||
{
|
{
|
||||||
mIdentifierUpdate2 = message;
|
mIdentifierUpdate2 = message;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public int[] getIdentifiers()
|
public int[] getIdentifiers()
|
||||||
{
|
|
||||||
int[] idens;
|
|
||||||
|
|
||||||
if( hasChannel2() )
|
|
||||||
{
|
|
||||||
idens = new int[ 2 ];
|
|
||||||
|
|
||||||
idens[ 0 ] = getIdentifier1();
|
|
||||||
idens[ 1 ] = getIdentifier2();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
idens = new int[ 1 ];
|
|
||||||
|
|
||||||
idens[ 0 ] = getIdentifier1();
|
|
||||||
}
|
|
||||||
|
|
||||||
return idens;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public int compareTo( SecondaryControlChannelBroadcast other )
|
|
||||||
{
|
{
|
||||||
if( other.getSiteID().contentEquals( getSiteID() ) &&
|
int[] idens;
|
||||||
other.getIdentifier1() == getIdentifier1() &&
|
|
||||||
other.getChannel1() == getChannel1() &&
|
if(hasChannel2())
|
||||||
other.getChannel2() == getChannel2() &&
|
{
|
||||||
other.getIdentifier2() == getIdentifier2() &&
|
idens = new int[2];
|
||||||
other.getDownlinkFrequency1() == getDownlinkFrequency1() &&
|
|
||||||
other.getUplinkFrequency1() == getUplinkFrequency1() &&
|
idens[0] = getIdentifier1();
|
||||||
other.getDownlinkFrequency2() == getDownlinkFrequency2() &&
|
idens[1] = getIdentifier2();
|
||||||
other.getUplinkFrequency2() == getUplinkFrequency2() )
|
}
|
||||||
{
|
else
|
||||||
return 0;
|
{
|
||||||
}
|
idens = new int[1];
|
||||||
else if( other.getIdentifier1() < getIdentifier1() )
|
|
||||||
{
|
idens[0] = getIdentifier1();
|
||||||
return -1;
|
}
|
||||||
}
|
|
||||||
else
|
return idens;
|
||||||
{
|
}
|
||||||
return 1;
|
|
||||||
}
|
@Override
|
||||||
|
public int compareTo(SecondaryControlChannelBroadcast other)
|
||||||
|
{
|
||||||
|
if(other.getRFSS().contentEquals(getRFSS()) &&
|
||||||
|
other.getSiteID().contentEquals(getSiteID()) &&
|
||||||
|
other.getIdentifier1() == getIdentifier1() &&
|
||||||
|
other.getChannel1() == getChannel1())
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
else if(other.getIdentifier1() < getIdentifier1())
|
||||||
|
{
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean equals(Object o)
|
||||||
|
{
|
||||||
|
if(this == o)
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if(!(o instanceof SecondaryControlChannelBroadcast))
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
SecondaryControlChannelBroadcast that = (SecondaryControlChannelBroadcast)o;
|
||||||
|
|
||||||
|
if(getRFSS() != that.getRFSS())
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if(getSiteID() != that.getSiteID())
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if(getIdentifier1() != that.getIdentifier1())
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return getChannel1() == that.getChannel1();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int hashCode()
|
||||||
|
{
|
||||||
|
int result = getRFSS() != null ? getRFSS().hashCode() : 0;
|
||||||
|
result = 31 * result + getSiteID() != null ? getSiteID().hashCode() : 0;
|
||||||
|
result = 31 * result + getIdentifier1();
|
||||||
|
result = 31 * result + getChannel1();
|
||||||
|
return result;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,28 +6,21 @@ import module.decode.p25.reference.DataUnitID;
|
|||||||
import alias.AliasList;
|
import alias.AliasList;
|
||||||
import bits.BinaryMessage;
|
import bits.BinaryMessage;
|
||||||
|
|
||||||
public class SNDCPDataChannelAnnouncementExplicit extends SNDCPData
|
public class SNDCPDataChannelAnnouncementExplicit extends SNDCPData implements IdentifierReceiver
|
||||||
implements IdentifierReceiver
|
|
||||||
{
|
{
|
||||||
public static final int AUTONOMOUS_ACCESS_AVAILABLE_INDICATOR = 88;
|
public static final int AUTONOMOUS_ACCESS_AVAILABLE_INDICATOR = 88;
|
||||||
public static final int REQUESTED_ACCESS_AVAILABLE_INDICATOR = 89;
|
public static final int REQUESTED_ACCESS_AVAILABLE_INDICATOR = 89;
|
||||||
|
|
||||||
public static final int[] TRANSMIT_IDENTIFIER = { 96,97,98,99 };
|
public static final int[] TRANSMIT_IDENTIFIER = { 96,97,98,99 };
|
||||||
public static final int[] TRANSMIT_NUMBER = { 100,101,102,103,104,105,106,
|
public static final int[] TRANSMIT_NUMBER = { 100,101,102,103,104,105,106, 107,108,109,110,111 };
|
||||||
107,108,109,110,111 };
|
|
||||||
public static final int[] RECEIVE_IDENTIFIER = { 112,113,114,115 };
|
public static final int[] RECEIVE_IDENTIFIER = { 112,113,114,115 };
|
||||||
public static final int[] RECEIVE_NUMBER = { 116,117,118,119,120,121,122,
|
public static final int[] RECEIVE_NUMBER = { 116,117,118,119,120,121,122, 123,124,125,126,127 };
|
||||||
123,124,125,126,127 };
|
public static final int[] DATA_ACCESS_CONTROL = { 128,129,130,131,132,133, 134,135,136,137,138,139,140,141,142,143 };
|
||||||
|
|
||||||
public static final int[] DATA_ACCESS_CONTROL = { 128,129,130,131,132,133,
|
|
||||||
134,135,136,137,138,139,140,141,142,143 };
|
|
||||||
|
|
||||||
private IBandIdentifier mIdentifierUpdateTransmit;
|
private IBandIdentifier mIdentifierUpdateTransmit;
|
||||||
private IBandIdentifier mIdentifierUpdateReceive;
|
private IBandIdentifier mIdentifierUpdateReceive;
|
||||||
|
|
||||||
public SNDCPDataChannelAnnouncementExplicit( BinaryMessage message,
|
public SNDCPDataChannelAnnouncementExplicit( BinaryMessage message, DataUnitID duid, AliasList aliasList )
|
||||||
DataUnitID duid,
|
|
||||||
AliasList aliasList )
|
|
||||||
{
|
{
|
||||||
super( message, duid, aliasList );
|
super( message, duid, aliasList );
|
||||||
}
|
}
|
||||||
@@ -148,11 +141,11 @@ public class SNDCPDataChannelAnnouncementExplicit extends SNDCPData
|
|||||||
|
|
||||||
public long getDownlinkFrequency()
|
public long getDownlinkFrequency()
|
||||||
{
|
{
|
||||||
return calculateDownlink( mIdentifierUpdateTransmit, getReceiveChannelNumber() );
|
return calculateDownlink( mIdentifierUpdateTransmit, getTransmitChannelNumber() );
|
||||||
}
|
}
|
||||||
|
|
||||||
public long getUplinkFrequency()
|
public long getUplinkFrequency()
|
||||||
{
|
{
|
||||||
return calculateUplink( mIdentifierUpdateReceive, getTransmitChannelNumber() );
|
return calculateUplink( mIdentifierUpdateReceive, getReceiveChannelNumber() );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user