mirror of
https://github.com/DSheirer/sdrtrunk.git
synced 2026-11-14 17:47:32 -05:00
Compare commits
35 Commits
v0.3.0-bet
...
v0.3.0-bet
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
980ad72d4d | ||
|
|
9b746cc032 | ||
|
|
f51ae0b5da | ||
|
|
561078e9bf | ||
|
|
e052b01f9b | ||
|
|
09cf4fcfd7 | ||
|
|
5e731d0e9f | ||
|
|
670a02b0ba | ||
|
|
9ef156b061 | ||
|
|
d9cf1b19f3 | ||
|
|
a4a339b505 | ||
|
|
119370c46e | ||
|
|
4eb66e6045 | ||
|
|
8827ecd0e9 | ||
|
|
8660002f93 | ||
|
|
2058fcbc1d | ||
|
|
9515dfa380 | ||
|
|
9e9a604c6a | ||
|
|
234e313b7a | ||
|
|
e1e7169029 | ||
|
|
f3605db0ed | ||
|
|
c0a6d578c7 | ||
|
|
79b4b30ec7 | ||
|
|
17c7466c6b | ||
|
|
8162d6ffd6 | ||
|
|
cd60251337 | ||
|
|
5647879b37 | ||
|
|
6916d95cdf | ||
|
|
a0c32f6fe0 | ||
|
|
c3d60dc174 | ||
|
|
e55a2226a2 | ||
|
|
9f01678b00 | ||
|
|
46425e9cae | ||
|
|
3726401563 | ||
|
|
a3e50acfe3 |
1
.idea/dictionaries/denny.xml
generated
1
.idea/dictionaries/denny.xml
generated
@@ -18,6 +18,7 @@
|
|||||||
<w>talkgroup</w>
|
<w>talkgroup</w>
|
||||||
<w>tgid</w>
|
<w>tgid</w>
|
||||||
<w>ultravox</w>
|
<w>ultravox</w>
|
||||||
|
<w>wacn</w>
|
||||||
<w>xtea</w>
|
<w>xtea</w>
|
||||||
</words>
|
</words>
|
||||||
</dictionary>
|
</dictionary>
|
||||||
|
|||||||
@@ -18,6 +18,7 @@
|
|||||||
buffers. Bounded queues have ability to enter/exit overflow state when queue
|
buffers. Bounded queues have ability to enter/exit overflow state when queue
|
||||||
size reaches overflow threshold and reset when queue size falls below the reset
|
size reaches overflow threshold and reset when queue size falls below the reset
|
||||||
threshold. Channel state will show OVERFLOW in red/yellow.
|
threshold. Channel state will show OVERFLOW in red/yellow.
|
||||||
|
- Improves handling of P25 TDMA channels (NO Phase 2 decoder support yet)
|
||||||
- Updated airspy controller for airspy-mini specific sample rate handling.
|
- Updated airspy controller for airspy-mini specific sample rate handling.
|
||||||
- New developer remez filter designer tool and internal usage
|
- New developer remez filter designer tool and internal usage
|
||||||
|
|
||||||
|
|||||||
16
README.md
16
README.md
@@ -2,18 +2,10 @@
|
|||||||
A cross-platform java application for decoding, monitoring, recording and streaming trunked mobile and related radio protocols using Software Defined Radios (SDR).
|
A cross-platform java application for decoding, monitoring, recording and streaming trunked mobile and related radio protocols using Software Defined Radios (SDR).
|
||||||
|
|
||||||
* [Getting Started](https://github.com/DSheirer/sdrtrunk/wiki/GettingStarted)
|
* [Getting Started](https://github.com/DSheirer/sdrtrunk/wiki/GettingStarted)
|
||||||
* [User's Manual](https://github.com/DSheirer/sdrtrunk/wiki/UserManual)
|
* [User's Manual Version 0.2.0](https://github.com/DSheirer/sdrtrunk/wiki/UserManual)
|
||||||
|
* [User's Manual Version 0.3.0](https://github.com/DSheirer/sdrtrunk/wiki/UserManual_Version0.3.0)
|
||||||
* [Download](https://github.com/DSheirer/sdrtrunk/releases)
|
* [Download](https://github.com/DSheirer/sdrtrunk/releases)
|
||||||
* [Support](https://groups.google.com/forum/#!forum/sdrtrunk)
|
* [Support](https://groups.google.com/forum/#!forum/sdrtrunk)
|
||||||
|
|
||||||

|

|
||||||
<script>
|
**Figure 1:** sdrtrunk **Version 0.3.0** Application Screenshot
|
||||||
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
|
|
||||||
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
|
|
||||||
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
|
|
||||||
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
|
|
||||||
|
|
||||||
ga('create', 'UA-67489234-1', 'auto');
|
|
||||||
ga('send', 'pageview');
|
|
||||||
|
|
||||||
</script>
|
|
||||||
@@ -7,7 +7,7 @@
|
|||||||
<property name="major" value="0"/>
|
<property name="major" value="0"/>
|
||||||
<property name="minor" value="3"/>
|
<property name="minor" value="3"/>
|
||||||
<property name="patch" value="0"/>
|
<property name="patch" value="0"/>
|
||||||
<property name="release" value="-beta4"/>
|
<property name="release" value="-beta7"/>
|
||||||
<property name="filename" value="sdrtrunk_${major}.${minor}.${patch}${release}"/>
|
<property name="filename" value="sdrtrunk_${major}.${minor}.${patch}${release}"/>
|
||||||
|
|
||||||
<!-- Build properties -->
|
<!-- Build properties -->
|
||||||
|
|||||||
@@ -185,27 +185,6 @@ public class Alias
|
|||||||
*/
|
*/
|
||||||
public void validate()
|
public void validate()
|
||||||
{
|
{
|
||||||
//Check for duplicate broadcast channels
|
|
||||||
List<BroadcastChannel> broadcastChannels = getBroadcastChannels();
|
|
||||||
|
|
||||||
if(broadcastChannels.size() > 0)
|
|
||||||
{
|
|
||||||
Set<String> channelNames = new TreeSet<>();
|
|
||||||
|
|
||||||
for(BroadcastChannel broadcastChannel: broadcastChannels)
|
|
||||||
{
|
|
||||||
String channelName = broadcastChannel.getChannelName();
|
|
||||||
|
|
||||||
if(channelName == null || channelName.isEmpty() || channelNames.contains(channelName))
|
|
||||||
{
|
|
||||||
removeAliasID(broadcastChannel);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
channelNames.add(channelName);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Returns the priority level of this alias, if defined, or the default priority
|
* Returns the priority level of this alias, if defined, or the default priority
|
||||||
@@ -336,9 +315,9 @@ public class Alias
|
|||||||
* List of broadcast channels specified for this alias.
|
* List of broadcast channels specified for this alias.
|
||||||
*/
|
*/
|
||||||
@XmlTransient
|
@XmlTransient
|
||||||
public List<BroadcastChannel> getBroadcastChannels()
|
public Set<BroadcastChannel> getBroadcastChannels()
|
||||||
{
|
{
|
||||||
List<BroadcastChannel> broadcastChannels = new ArrayList<>();
|
Set<BroadcastChannel> broadcastChannels = new TreeSet<>();
|
||||||
|
|
||||||
for(AliasID id: getId())
|
for(AliasID id: getId())
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -17,6 +17,12 @@
|
|||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
package alias;
|
package alias;
|
||||||
|
|
||||||
|
import alias.AliasEvent.Event;
|
||||||
|
import alias.id.broadcast.BroadcastChannel;
|
||||||
|
import sample.Broadcaster;
|
||||||
|
import sample.Listener;
|
||||||
|
|
||||||
|
import javax.swing.table.AbstractTableModel;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
@@ -24,13 +30,6 @@ import java.util.List;
|
|||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.concurrent.CopyOnWriteArrayList;
|
import java.util.concurrent.CopyOnWriteArrayList;
|
||||||
|
|
||||||
import javax.swing.table.AbstractTableModel;
|
|
||||||
|
|
||||||
import alias.id.broadcast.BroadcastChannel;
|
|
||||||
import sample.Broadcaster;
|
|
||||||
import sample.Listener;
|
|
||||||
import alias.AliasEvent.Event;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Alias Model
|
* Alias Model
|
||||||
*/
|
*/
|
||||||
@@ -72,16 +71,18 @@ public class AliasModel extends AbstractTableModel
|
|||||||
|
|
||||||
public AliasList getAliasList(String name)
|
public AliasList getAliasList(String name)
|
||||||
{
|
{
|
||||||
if( mAliasListMap.containsKey( name ) )
|
if(name != null && mAliasListMap.containsKey(name))
|
||||||
{
|
{
|
||||||
return mAliasListMap.get(name);
|
return mAliasListMap.get(name);
|
||||||
}
|
}
|
||||||
|
|
||||||
AliasList aliasList = new AliasList(name);
|
AliasList aliasList = new AliasList(name);
|
||||||
|
|
||||||
|
if(name != null)
|
||||||
|
{
|
||||||
for(Alias alias : mAliases)
|
for(Alias alias : mAliases)
|
||||||
{
|
{
|
||||||
if( alias.getList().equalsIgnoreCase( name ) )
|
if(alias.hasList() && alias.getList().equalsIgnoreCase(name))
|
||||||
{
|
{
|
||||||
aliasList.addAlias(alias);
|
aliasList.addAlias(alias);
|
||||||
}
|
}
|
||||||
@@ -91,6 +92,7 @@ public class AliasModel extends AbstractTableModel
|
|||||||
|
|
||||||
//Register the new alias list to receive updates from this model
|
//Register the new alias list to receive updates from this model
|
||||||
addListener(aliasList);
|
addListener(aliasList);
|
||||||
|
}
|
||||||
|
|
||||||
return aliasList;
|
return aliasList;
|
||||||
}
|
}
|
||||||
@@ -213,6 +215,7 @@ public class AliasModel extends AbstractTableModel
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Renames any broadcast channels that have the previous name.
|
* Renames any broadcast channels that have the previous name.
|
||||||
|
*
|
||||||
* @param previousName to rename
|
* @param previousName to rename
|
||||||
* @param newName to assign to the broadcast channel
|
* @param newName to assign to the broadcast channel
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -40,10 +40,11 @@ public class AliasNameEditor extends Editor<Alias>
|
|||||||
{
|
{
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
private static ComboBoxModel<String> EMPTY_MODEL = new DefaultComboBoxModel<>();
|
private static ComboBoxModel<String> EMPTY_LIST_MODEL = new DefaultComboBoxModel<>();
|
||||||
|
private static ComboBoxModel<String> EMPTY_GROUP_MODEL = new DefaultComboBoxModel<>();
|
||||||
|
|
||||||
private JComboBox<String> mListCombo = new JComboBox<>(EMPTY_MODEL);
|
private JComboBox<String> mListCombo = new JComboBox<>(EMPTY_LIST_MODEL);
|
||||||
private JComboBox<String> mGroupCombo = new JComboBox<>(EMPTY_MODEL);
|
private JComboBox<String> mGroupCombo = new JComboBox<>(EMPTY_GROUP_MODEL);
|
||||||
private JComboBox<Icon> mIconCombo;
|
private JComboBox<Icon> mIconCombo;
|
||||||
private JTextField mName;
|
private JTextField mName;
|
||||||
private JButton mButtonColor;
|
private JButton mButtonColor;
|
||||||
@@ -110,7 +111,7 @@ public class AliasNameEditor extends Editor<Alias>
|
|||||||
|
|
||||||
if(groups.isEmpty())
|
if(groups.isEmpty())
|
||||||
{
|
{
|
||||||
mGroupCombo.setModel(EMPTY_MODEL);
|
mGroupCombo.setModel(EMPTY_GROUP_MODEL);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -238,7 +239,7 @@ public class AliasNameEditor extends Editor<Alias>
|
|||||||
|
|
||||||
if(listNames.isEmpty())
|
if(listNames.isEmpty())
|
||||||
{
|
{
|
||||||
mListCombo.setModel(EMPTY_MODEL);
|
mListCombo.setModel(EMPTY_LIST_MODEL);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -253,7 +254,7 @@ public class AliasNameEditor extends Editor<Alias>
|
|||||||
|
|
||||||
if(groupNames.isEmpty())
|
if(groupNames.isEmpty())
|
||||||
{
|
{
|
||||||
mGroupCombo.setModel(EMPTY_MODEL);
|
mGroupCombo.setModel(EMPTY_GROUP_MODEL);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -285,8 +286,8 @@ public class AliasNameEditor extends Editor<Alias>
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
mListCombo.setModel(EMPTY_MODEL);
|
mListCombo.setModel(EMPTY_LIST_MODEL);
|
||||||
mGroupCombo.setModel(EMPTY_MODEL);
|
mGroupCombo.setModel(EMPTY_GROUP_MODEL);
|
||||||
mName.setText(null);
|
mName.setText(null);
|
||||||
|
|
||||||
mButtonColor.setBackground(getBackground());
|
mButtonColor.setBackground(getBackground());
|
||||||
|
|||||||
@@ -24,12 +24,20 @@ import alias.id.AliasIDType;
|
|||||||
import alias.id.broadcast.BroadcastChannel;
|
import alias.id.broadcast.BroadcastChannel;
|
||||||
import alias.id.priority.Priority;
|
import alias.id.priority.Priority;
|
||||||
import alias.id.talkgroup.TalkgroupID;
|
import alias.id.talkgroup.TalkgroupID;
|
||||||
|
import gui.SDRTrunk;
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
import playlist.version1.System;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Set;
|
||||||
|
import java.util.TreeSet;
|
||||||
|
|
||||||
public class PatchGroupAlias extends Alias
|
public class PatchGroupAlias extends Alias
|
||||||
{
|
{
|
||||||
|
private final static Logger mLog = LoggerFactory.getLogger(PatchGroupAlias.class);
|
||||||
|
|
||||||
private Alias mPatchGroupAlias;
|
private Alias mPatchGroupAlias;
|
||||||
private List<Alias> mPatchedAliases = new ArrayList<>();
|
private List<Alias> mPatchedAliases = new ArrayList<>();
|
||||||
private List<String> mPatchedTalkgroupIDs = new ArrayList<>();
|
private List<String> mPatchedTalkgroupIDs = new ArrayList<>();
|
||||||
@@ -295,9 +303,9 @@ public class PatchGroupAlias extends Alias
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<BroadcastChannel> getBroadcastChannels()
|
public Set<BroadcastChannel> getBroadcastChannels()
|
||||||
{
|
{
|
||||||
List<BroadcastChannel> broadcastChannels = new ArrayList<>();
|
Set<BroadcastChannel> broadcastChannels = new TreeSet<>();
|
||||||
|
|
||||||
if(hasPatchGroupAlias())
|
if(hasPatchGroupAlias())
|
||||||
{
|
{
|
||||||
@@ -308,13 +316,7 @@ public class PatchGroupAlias extends Alias
|
|||||||
{
|
{
|
||||||
if(!(alias instanceof PatchGroupAlias))
|
if(!(alias instanceof PatchGroupAlias))
|
||||||
{
|
{
|
||||||
for(BroadcastChannel broadcastChannel: alias.getBroadcastChannels())
|
broadcastChannels.addAll(alias.getBroadcastChannels());
|
||||||
{
|
|
||||||
if(!broadcastChannels.contains(broadcastChannel))
|
|
||||||
{
|
|
||||||
broadcastChannels.add(broadcastChannel);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -339,4 +341,41 @@ public class PatchGroupAlias extends Alias
|
|||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static void main(String[] args)
|
||||||
|
{
|
||||||
|
Alias a1 = new Alias("Alias 1");
|
||||||
|
a1.addAliasID(new BroadcastChannel("Channel 1"));
|
||||||
|
a1.addAliasID(new BroadcastChannel("Channel 2"));
|
||||||
|
a1.addAliasID(new BroadcastChannel("Channel 3"));
|
||||||
|
a1.addAliasID(new BroadcastChannel("Channel 4"));
|
||||||
|
|
||||||
|
Alias a2 = new Alias("Alias 1");
|
||||||
|
a1.addAliasID(new BroadcastChannel("Channel 1"));
|
||||||
|
a1.addAliasID(new BroadcastChannel("Channel 2"));
|
||||||
|
a1.addAliasID(new BroadcastChannel("Channel 3"));
|
||||||
|
a1.addAliasID(new BroadcastChannel("Channel 4"));
|
||||||
|
|
||||||
|
Alias a3 = new Alias("Alias 1");
|
||||||
|
a1.addAliasID(new BroadcastChannel("Channel 1"));
|
||||||
|
a1.addAliasID(new BroadcastChannel("Channel 2"));
|
||||||
|
a1.addAliasID(new BroadcastChannel("Channel 3"));
|
||||||
|
a1.addAliasID(new BroadcastChannel("Channel 4"));
|
||||||
|
|
||||||
|
Alias a4 = new Alias("Alias 1");
|
||||||
|
a1.addAliasID(new BroadcastChannel("Channel 1"));
|
||||||
|
a1.addAliasID(new BroadcastChannel("Channel 2"));
|
||||||
|
a1.addAliasID(new BroadcastChannel("Channel 3"));
|
||||||
|
a1.addAliasID(new BroadcastChannel("Channel 4"));
|
||||||
|
|
||||||
|
PatchGroupAlias pga = new PatchGroupAlias();
|
||||||
|
pga.setPatchGroupAlias(a1);
|
||||||
|
pga.addPatchedAlias(a2);
|
||||||
|
pga.addPatchedAlias(a3);
|
||||||
|
pga.addPatchedAlias(a4);
|
||||||
|
|
||||||
|
Set<BroadcastChannel> bc = pga.getBroadcastChannels();
|
||||||
|
|
||||||
|
mLog.debug("Channels:" + bc);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,6 +18,8 @@
|
|||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
package alias.id;
|
package alias.id;
|
||||||
|
|
||||||
|
import org.apache.commons.lang3.Validate;
|
||||||
|
|
||||||
import java.util.regex.Pattern;
|
import java.util.regex.Pattern;
|
||||||
|
|
||||||
public class WildcardID implements Comparable<WildcardID>
|
public class WildcardID implements Comparable<WildcardID>
|
||||||
@@ -45,7 +47,7 @@ public class WildcardID implements Comparable<WildcardID>
|
|||||||
*/
|
*/
|
||||||
public WildcardID(String value)
|
public WildcardID(String value)
|
||||||
{
|
{
|
||||||
assert(value != null && value.contains(WILDCARD) && value.length() < 10);
|
Validate.isTrue(value != null && value.contains(WILDCARD) && value.length() < 10);
|
||||||
|
|
||||||
mValue = value;
|
mValue = value;
|
||||||
|
|
||||||
|
|||||||
@@ -707,9 +707,7 @@ public class BroadcastModel extends AbstractTableModel implements Listener<Audio
|
|||||||
|
|
||||||
if(metadata != null && metadata.isStreamable())
|
if(metadata != null && metadata.isStreamable())
|
||||||
{
|
{
|
||||||
List<BroadcastChannel> broadcastChannels = metadata.getBroadcastChannels();
|
for(BroadcastChannel broadcastChannel : metadata.getBroadcastChannels())
|
||||||
|
|
||||||
for(BroadcastChannel broadcastChannel : broadcastChannels)
|
|
||||||
{
|
{
|
||||||
String channelName = broadcastChannel.getChannelName();
|
String channelName = broadcastChannel.getChannelName();
|
||||||
|
|
||||||
|
|||||||
@@ -156,6 +156,8 @@ public class IcecastHTTPAudioBroadcaster extends IcecastAudioBroadcaster
|
|||||||
|
|
||||||
disconnect();
|
disconnect();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
mConnecting.set(false);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -176,8 +178,6 @@ public class IcecastHTTPAudioBroadcaster extends IcecastAudioBroadcaster
|
|||||||
{
|
{
|
||||||
mStreamingSession.closeNow();
|
mStreamingSession.closeNow();
|
||||||
}
|
}
|
||||||
|
|
||||||
mConnecting.set(false);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -256,6 +256,7 @@ public class IcecastHTTPAudioBroadcaster extends IcecastAudioBroadcaster
|
|||||||
mSocketConnector = null;
|
mSocketConnector = null;
|
||||||
|
|
||||||
mConnecting.set(false);
|
mConnecting.set(false);
|
||||||
|
|
||||||
super.sessionClosed(session);
|
super.sessionClosed(session);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -25,6 +25,7 @@ import org.apache.mina.core.RuntimeIoException;
|
|||||||
import org.apache.mina.core.future.ConnectFuture;
|
import org.apache.mina.core.future.ConnectFuture;
|
||||||
import org.apache.mina.core.service.IoHandlerAdapter;
|
import org.apache.mina.core.service.IoHandlerAdapter;
|
||||||
import org.apache.mina.core.session.IoSession;
|
import org.apache.mina.core.session.IoSession;
|
||||||
|
import org.apache.mina.core.write.WriteTimeoutException;
|
||||||
import org.apache.mina.filter.codec.ProtocolCodecFilter;
|
import org.apache.mina.filter.codec.ProtocolCodecFilter;
|
||||||
import org.apache.mina.transport.socket.nio.NioSocketConnector;
|
import org.apache.mina.transport.socket.nio.NioSocketConnector;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
@@ -146,6 +147,8 @@ public class IcecastTCPAudioBroadcaster extends IcecastAudioBroadcaster
|
|||||||
|
|
||||||
disconnect();
|
disconnect();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
mConnecting.set(false);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -254,7 +257,7 @@ public class IcecastTCPAudioBroadcaster extends IcecastAudioBroadcaster
|
|||||||
disconnect();
|
disconnect();
|
||||||
connect();
|
connect();
|
||||||
}
|
}
|
||||||
if(reason.startsWith("Connection reset"))
|
else if(reason.startsWith("Connection reset"))
|
||||||
{
|
{
|
||||||
mLog.info("Streaming connection reset by remote server - reestablishing connection");
|
mLog.info("Streaming connection reset by remote server - reestablishing connection");
|
||||||
disconnect();
|
disconnect();
|
||||||
@@ -273,6 +276,12 @@ public class IcecastTCPAudioBroadcaster extends IcecastAudioBroadcaster
|
|||||||
mLog.error("Unrecognized IO error: " + reason + ". Streaming halted.", cause);
|
mLog.error("Unrecognized IO error: " + reason + ". Streaming halted.", cause);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if(ioe instanceof WriteTimeoutException)
|
||||||
|
{
|
||||||
|
mLog.info("Network write timeout error - resetting connection");
|
||||||
|
disconnect();
|
||||||
|
connect();
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
setBroadcastState(BroadcastState.ERROR);
|
setBroadcastState(BroadcastState.ERROR);
|
||||||
@@ -286,8 +295,6 @@ public class IcecastTCPAudioBroadcaster extends IcecastAudioBroadcaster
|
|||||||
setBroadcastState(BroadcastState.ERROR);
|
setBroadcastState(BroadcastState.ERROR);
|
||||||
disconnect();
|
disconnect();
|
||||||
}
|
}
|
||||||
|
|
||||||
mConnecting.set(false);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -168,6 +168,8 @@ public class ShoutcastV1AudioBroadcaster extends AudioBroadcaster
|
|||||||
|
|
||||||
disconnect();
|
disconnect();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
mConnecting.set(false);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -50,6 +50,7 @@ import properties.SystemProperties;
|
|||||||
import util.ThreadPool;
|
import util.ThreadPool;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
import java.io.UnsupportedEncodingException;
|
||||||
import java.net.ConnectException;
|
import java.net.ConnectException;
|
||||||
import java.net.InetSocketAddress;
|
import java.net.InetSocketAddress;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
@@ -203,6 +204,8 @@ public class ShoutcastV2AudioBroadcaster extends AudioBroadcaster implements IBr
|
|||||||
|
|
||||||
disconnect();
|
disconnect();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
mConnecting.set(false);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -244,6 +247,8 @@ public class ShoutcastV2AudioBroadcaster extends AudioBroadcaster implements IBr
|
|||||||
|
|
||||||
sb.append("<?xml version=\"1.0\" encoding=\"UTF-8\" ?><metadata>");
|
sb.append("<?xml version=\"1.0\" encoding=\"UTF-8\" ?><metadata>");
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
sb.append(UltravoxMetadata.ALBUM_TITLE.asXML(getConfiguration().getName()));
|
sb.append(UltravoxMetadata.ALBUM_TITLE.asXML(getConfiguration().getName()));
|
||||||
|
|
||||||
sb.append(UltravoxMetadata.BROADCAST_CLIENT_APPLICATION.asXML(SystemProperties.getInstance().getApplicationName()));
|
sb.append(UltravoxMetadata.BROADCAST_CLIENT_APPLICATION.asXML(SystemProperties.getInstance().getApplicationName()));
|
||||||
@@ -282,6 +287,11 @@ public class ShoutcastV2AudioBroadcaster extends AudioBroadcaster implements IBr
|
|||||||
{
|
{
|
||||||
sb.append(UltravoxMetadata.TITLE_2.asXML("Scanning ..."));
|
sb.append(UltravoxMetadata.TITLE_2.asXML("Scanning ..."));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
catch(UnsupportedEncodingException uee)
|
||||||
|
{
|
||||||
|
mLog.error("UTF-8 Encoding is not supported - shoutcast/ultravox metadata will not be updated");
|
||||||
|
}
|
||||||
|
|
||||||
sb.append("</metadata>");
|
sb.append("</metadata>");
|
||||||
|
|
||||||
|
|||||||
@@ -21,6 +21,7 @@ package audio.broadcast.shoutcast.v2;
|
|||||||
import audio.broadcast.BroadcastConfiguration;
|
import audio.broadcast.BroadcastConfiguration;
|
||||||
import audio.broadcast.BroadcastFormat;
|
import audio.broadcast.BroadcastFormat;
|
||||||
import audio.broadcast.BroadcastServerType;
|
import audio.broadcast.BroadcastServerType;
|
||||||
|
import org.apache.commons.lang3.Validate;
|
||||||
|
|
||||||
import javax.xml.bind.annotation.XmlAttribute;
|
import javax.xml.bind.annotation.XmlAttribute;
|
||||||
|
|
||||||
@@ -90,7 +91,7 @@ public class ShoutcastV2Configuration extends BroadcastConfiguration
|
|||||||
*/
|
*/
|
||||||
public void setStreamID(int streamID)
|
public void setStreamID(int streamID)
|
||||||
{
|
{
|
||||||
assert(1 <= streamID && streamID <= Integer.MAX_VALUE);
|
Validate.isTrue(1 <= streamID && streamID <= Integer.MAX_VALUE);
|
||||||
mStreamID = streamID;
|
mStreamID = streamID;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -18,6 +18,8 @@
|
|||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
package audio.broadcast.shoutcast.v2.ultravox;
|
package audio.broadcast.shoutcast.v2.ultravox;
|
||||||
|
|
||||||
|
import org.apache.commons.lang3.Validate;
|
||||||
|
|
||||||
public class NegotiateMaxPayloadSize extends UltravoxMessage
|
public class NegotiateMaxPayloadSize extends UltravoxMessage
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
@@ -47,8 +49,8 @@ public class NegotiateMaxPayloadSize extends UltravoxMessage
|
|||||||
*/
|
*/
|
||||||
public void setMaximumPayloadSize(int desiredMaximum, int minimum)
|
public void setMaximumPayloadSize(int desiredMaximum, int minimum)
|
||||||
{
|
{
|
||||||
assert(desiredMaximum <= 16377);
|
Validate.isTrue(desiredMaximum <= 16377);
|
||||||
assert(minimum <= 16377);
|
Validate.isTrue(minimum <= 16377);
|
||||||
|
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
sb.append(desiredMaximum).append(":").append(minimum);
|
sb.append(desiredMaximum).append(":").append(minimum);
|
||||||
|
|||||||
@@ -19,6 +19,7 @@
|
|||||||
package audio.broadcast.shoutcast.v2.ultravox;
|
package audio.broadcast.shoutcast.v2.ultravox;
|
||||||
|
|
||||||
import bits.BinaryMessage;
|
import bits.BinaryMessage;
|
||||||
|
import org.apache.commons.lang3.Validate;
|
||||||
|
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
|
||||||
@@ -154,7 +155,7 @@ public abstract class UltravoxMessage
|
|||||||
*/
|
*/
|
||||||
public void setSendQueuePriority(int priority)
|
public void setSendQueuePriority(int priority)
|
||||||
{
|
{
|
||||||
assert(0 <= priority && priority <= 7);
|
Validate.isTrue(0 <= priority && priority <= 7);
|
||||||
|
|
||||||
mMessage.setInt(priority, SEND_QUEUE_PRIORITY);
|
mMessage.setInt(priority, SEND_QUEUE_PRIORITY);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,6 +18,9 @@
|
|||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
package audio.broadcast.shoutcast.v2.ultravox;
|
package audio.broadcast.shoutcast.v2.ultravox;
|
||||||
|
|
||||||
|
import java.io.UnsupportedEncodingException;
|
||||||
|
import java.net.URLEncoder;
|
||||||
|
|
||||||
public enum UltravoxMetadata
|
public enum UltravoxMetadata
|
||||||
{
|
{
|
||||||
ALBUM_TITLE("TALB"),
|
ALBUM_TITLE("TALB"),
|
||||||
@@ -58,11 +61,11 @@ public enum UltravoxMetadata
|
|||||||
* @param value to enclose in XML tags
|
* @param value to enclose in XML tags
|
||||||
* @return xml tag wrapped value
|
* @return xml tag wrapped value
|
||||||
*/
|
*/
|
||||||
public String asXML(String value)
|
public String asXML(String value) throws UnsupportedEncodingException
|
||||||
{
|
{
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
sb.append("<").append(getXMLTag()).append(">");
|
sb.append("<").append(getXMLTag()).append(">");
|
||||||
sb.append(value);
|
sb.append(new String(value.getBytes(), "UTF-8"));
|
||||||
sb.append("</").append(getXMLTag()).append(">");
|
sb.append("</").append(getXMLTag()).append(">");
|
||||||
|
|
||||||
return sb.toString();
|
return sb.toString();
|
||||||
|
|||||||
@@ -22,6 +22,7 @@ import java.util.BitSet;
|
|||||||
import java.util.logging.LogManager;
|
import java.util.logging.LogManager;
|
||||||
|
|
||||||
import edac.CRC;
|
import edac.CRC;
|
||||||
|
import org.apache.commons.lang3.Validate;
|
||||||
|
|
||||||
public class BinaryMessage extends BitSet
|
public class BinaryMessage extends BitSet
|
||||||
{
|
{
|
||||||
@@ -456,7 +457,7 @@ public class BinaryMessage extends BitSet
|
|||||||
*/
|
*/
|
||||||
public byte getByte(int index)
|
public byte getByte(int index)
|
||||||
{
|
{
|
||||||
assert((index + 7) <= size());
|
Validate.isTrue((index + 7) <= size());
|
||||||
|
|
||||||
int value = 0;
|
int value = 0;
|
||||||
|
|
||||||
@@ -481,7 +482,7 @@ public class BinaryMessage extends BitSet
|
|||||||
*/
|
*/
|
||||||
public void setByte(int index, byte value)
|
public void setByte(int index, byte value)
|
||||||
{
|
{
|
||||||
assert((index + 8) <= size());
|
Validate.isTrue((index + 8) <= size());
|
||||||
|
|
||||||
int mask = 0x80;
|
int mask = 0x80;
|
||||||
|
|
||||||
|
|||||||
@@ -17,6 +17,8 @@
|
|||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
package bits;
|
package bits;
|
||||||
|
|
||||||
|
import org.apache.commons.lang3.Validate;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@@ -39,7 +41,7 @@ public class MultiSyncPatternMatcher
|
|||||||
|
|
||||||
public MultiSyncPatternMatcher( int syncSize )
|
public MultiSyncPatternMatcher( int syncSize )
|
||||||
{
|
{
|
||||||
assert( syncSize < 64 );
|
Validate.isTrue(syncSize < 64);
|
||||||
|
|
||||||
//Setup a bit mask of all ones the length of the sync pattern
|
//Setup a bit mask of all ones the length of the sync pattern
|
||||||
mMask = (long)( ( Math.pow( 2, syncSize ) ) - 1 );
|
mMask = (long)( ( Math.pow( 2, syncSize ) ) - 1 );
|
||||||
|
|||||||
@@ -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 JTextArea mDetailTextArea;
|
private JTextArea mDetailTextPane;
|
||||||
|
|
||||||
private ChannelProcessingManager mChannelProcessingManager;
|
private ChannelProcessingManager mChannelProcessingManager;
|
||||||
private ProcessingChain mProcessingChain;
|
private ProcessingChain mProcessingChain;
|
||||||
@@ -82,10 +82,10 @@ public class ChannelDetailPanel extends JPanel implements Listener<ProcessingCha
|
|||||||
|
|
||||||
add(buttonPanel, "wrap");
|
add(buttonPanel, "wrap");
|
||||||
|
|
||||||
mDetailTextArea = new JTextArea(EMPTY_DETAILS);
|
mDetailTextPane = new JTextArea(EMPTY_DETAILS);
|
||||||
DefaultCaret caret = (DefaultCaret)mDetailTextArea.getCaret();
|
DefaultCaret caret = (DefaultCaret)mDetailTextPane.getCaret();
|
||||||
caret.setUpdatePolicy(DefaultCaret.NEVER_UPDATE);
|
caret.setUpdatePolicy(DefaultCaret.NEVER_UPDATE);
|
||||||
add(new JScrollPane(mDetailTextArea));
|
add(new JScrollPane(mDetailTextPane));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -126,7 +126,7 @@ public class ChannelDetailPanel extends JPanel implements Listener<ProcessingCha
|
|||||||
mSystemLabel.setText(system);
|
mSystemLabel.setText(system);
|
||||||
mSiteLabel.setText(site);
|
mSiteLabel.setText(site);
|
||||||
mNameLabel.setText(name);
|
mNameLabel.setText(name);
|
||||||
mDetailTextArea.setText(details);
|
mDetailTextPane.setText(details);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -19,8 +19,6 @@
|
|||||||
package channel.metadata;
|
package channel.metadata;
|
||||||
|
|
||||||
import alias.Alias;
|
import alias.Alias;
|
||||||
import org.slf4j.Logger;
|
|
||||||
import org.slf4j.LoggerFactory;
|
|
||||||
import sample.Listener;
|
import sample.Listener;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
@@ -30,8 +28,6 @@ import java.util.Map;
|
|||||||
|
|
||||||
public class AttributeMonitor<T>
|
public class AttributeMonitor<T>
|
||||||
{
|
{
|
||||||
private final static Logger mLog = LoggerFactory.getLogger(AttributeMonitor.class);
|
|
||||||
|
|
||||||
private Attribute mAttribute;
|
private Attribute mAttribute;
|
||||||
private Listener<AttributeChangeRequest> mListener;
|
private Listener<AttributeChangeRequest> mListener;
|
||||||
private boolean mHeuristicsEnabled = true;
|
private boolean mHeuristicsEnabled = true;
|
||||||
@@ -50,8 +46,8 @@ public class AttributeMonitor<T>
|
|||||||
* an internal mapping of values to occurrence counts is updated and a change is emitted once a value that is
|
* an internal mapping of values to occurrence counts is updated and a change is emitted once a value that is
|
||||||
* different from the current value, has a higher occurrence count than the current value. If heuristics are
|
* different from the current value, has a higher occurrence count than the current value. If heuristics are
|
||||||
* disabled, then a change is emitted at each change in the value.
|
* disabled, then a change is emitted at each change in the value.
|
||||||
* @param t
|
|
||||||
*
|
*
|
||||||
|
* @param t type
|
||||||
* @return true if the value was changed after processing
|
* @return true if the value was changed after processing
|
||||||
*/
|
*/
|
||||||
public boolean process(T t)
|
public boolean process(T t)
|
||||||
@@ -155,35 +151,4 @@ public class AttributeMonitor<T>
|
|||||||
{
|
{
|
||||||
return mCurrentValue != null;
|
return mCurrentValue != null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void main(String[] args)
|
|
||||||
{
|
|
||||||
AttributeMonitor<String> monitor = new AttributeMonitor<>(Attribute.PRIMARY_ADDRESS_TO, new Listener<AttributeChangeRequest>()
|
|
||||||
{
|
|
||||||
@Override
|
|
||||||
public void receive(AttributeChangeRequest attributeChangeRequest)
|
|
||||||
{
|
|
||||||
mLog.debug("Attribute Changed - value:" + attributeChangeRequest.getValue());
|
|
||||||
}
|
|
||||||
});
|
|
||||||
monitor.addIllegalValue("0000");
|
|
||||||
monitor.addIllegalValue("000000");
|
|
||||||
|
|
||||||
monitor.process("ABCD");
|
|
||||||
monitor.process("EFGH");
|
|
||||||
monitor.process("0000");
|
|
||||||
monitor.process("0000");
|
|
||||||
monitor.process("ABCD");
|
|
||||||
monitor.reset();
|
|
||||||
|
|
||||||
monitor.process("EFGH");
|
|
||||||
monitor.process("ABCD");
|
|
||||||
monitor.process("ABCD");
|
|
||||||
monitor.process("EFGH");
|
|
||||||
monitor.process("EFGH");
|
|
||||||
monitor.process("000000");
|
|
||||||
monitor.process("000000");
|
|
||||||
monitor.process("000000");
|
|
||||||
monitor.process("000000");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -26,6 +26,7 @@ import controller.channel.ChannelUtils;
|
|||||||
import icon.IconManager;
|
import icon.IconManager;
|
||||||
import module.ProcessingChain;
|
import module.ProcessingChain;
|
||||||
import net.miginfocom.swing.MigLayout;
|
import net.miginfocom.swing.MigLayout;
|
||||||
|
import org.apache.commons.lang3.Validate;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import properties.SystemProperties;
|
import properties.SystemProperties;
|
||||||
@@ -140,7 +141,7 @@ public class ChannelMetadataPanel extends JPanel implements ListSelectionListene
|
|||||||
|
|
||||||
public AliasedValueCellRenderer(Attribute attribute)
|
public AliasedValueCellRenderer(Attribute attribute)
|
||||||
{
|
{
|
||||||
assert(attribute != null);
|
Validate.isTrue(attribute != null);
|
||||||
mAttribute = attribute;
|
mAttribute = attribute;
|
||||||
setHorizontalAlignment(JLabel.CENTER);
|
setHorizontalAlignment(JLabel.CENTER);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -28,6 +28,8 @@ import org.slf4j.LoggerFactory;
|
|||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Set;
|
||||||
|
import java.util.TreeSet;
|
||||||
|
|
||||||
public class Metadata
|
public class Metadata
|
||||||
{
|
{
|
||||||
@@ -61,7 +63,7 @@ public class Metadata
|
|||||||
private Integer mAudioPriority;
|
private Integer mAudioPriority;
|
||||||
protected Boolean mRecordable = false;
|
protected Boolean mRecordable = false;
|
||||||
protected Boolean mDoNotRecord;
|
protected Boolean mDoNotRecord;
|
||||||
private List<BroadcastChannel> mBroadcastChannels;
|
private Set<BroadcastChannel> mBroadcastChannels;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -166,7 +168,7 @@ public class Metadata
|
|||||||
/**
|
/**
|
||||||
* List of de-duplicated broadcast channels aggregated from the primary and secondary TO/FROM aliases.
|
* List of de-duplicated broadcast channels aggregated from the primary and secondary TO/FROM aliases.
|
||||||
*/
|
*/
|
||||||
public List<BroadcastChannel> getBroadcastChannels()
|
public Set<BroadcastChannel> getBroadcastChannels()
|
||||||
{
|
{
|
||||||
if(mBroadcastChannels == null)
|
if(mBroadcastChannels == null)
|
||||||
{
|
{
|
||||||
@@ -582,50 +584,26 @@ public class Metadata
|
|||||||
*/
|
*/
|
||||||
private void determineBroadcastChannels()
|
private void determineBroadcastChannels()
|
||||||
{
|
{
|
||||||
mBroadcastChannels = new ArrayList<>();
|
mBroadcastChannels = new TreeSet<>();
|
||||||
|
|
||||||
if(mPrimaryAddressTo.hasAlias() && mPrimaryAddressTo.getAlias().isStreamable())
|
if(mPrimaryAddressTo.hasAlias() && mPrimaryAddressTo.getAlias().isStreamable())
|
||||||
{
|
{
|
||||||
for(BroadcastChannel broadcastChannel: mPrimaryAddressTo.getAlias().getBroadcastChannels())
|
mBroadcastChannels.addAll(mPrimaryAddressTo.getAlias().getBroadcastChannels());
|
||||||
{
|
|
||||||
if(!mBroadcastChannels.contains(broadcastChannel))
|
|
||||||
{
|
|
||||||
mBroadcastChannels.add(broadcastChannel);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if(mPrimaryAddressFrom.hasAlias() && mPrimaryAddressFrom.getAlias().isStreamable())
|
if(mPrimaryAddressFrom.hasAlias() && mPrimaryAddressFrom.getAlias().isStreamable())
|
||||||
{
|
{
|
||||||
for(BroadcastChannel broadcastChannel: mPrimaryAddressFrom.getAlias().getBroadcastChannels())
|
mBroadcastChannels.addAll(mPrimaryAddressFrom.getAlias().getBroadcastChannels());
|
||||||
{
|
|
||||||
if(!mBroadcastChannels.contains(broadcastChannel))
|
|
||||||
{
|
|
||||||
mBroadcastChannels.add(broadcastChannel);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if(mSecondaryAddressTo.hasAlias() && mSecondaryAddressTo.getAlias().isStreamable())
|
if(mSecondaryAddressTo.hasAlias() && mSecondaryAddressTo.getAlias().isStreamable())
|
||||||
{
|
{
|
||||||
for(BroadcastChannel broadcastChannel: mSecondaryAddressTo.getAlias().getBroadcastChannels())
|
mBroadcastChannels.addAll(mSecondaryAddressTo.getAlias().getBroadcastChannels());
|
||||||
{
|
|
||||||
if(!mBroadcastChannels.contains(broadcastChannel))
|
|
||||||
{
|
|
||||||
mBroadcastChannels.add(broadcastChannel);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if(mSecondaryAddressFrom.hasAlias() && mSecondaryAddressFrom.getAlias().isStreamable())
|
if(mSecondaryAddressFrom.hasAlias() && mSecondaryAddressFrom.getAlias().isStreamable())
|
||||||
{
|
{
|
||||||
for(BroadcastChannel broadcastChannel: mSecondaryAddressFrom.getAlias().getBroadcastChannels())
|
mBroadcastChannels.addAll(mSecondaryAddressFrom.getAlias().getBroadcastChannels());
|
||||||
{
|
|
||||||
if(!mBroadcastChannels.contains(broadcastChannel))
|
|
||||||
{
|
|
||||||
mBroadcastChannels.add(broadcastChannel);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -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<>();
|
||||||
|
|||||||
@@ -17,34 +17,29 @@
|
|||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
package controller.channel;
|
package controller.channel;
|
||||||
|
|
||||||
|
import alias.AliasModel;
|
||||||
import gui.editor.Editor;
|
import gui.editor.Editor;
|
||||||
|
import net.miginfocom.swing.MigLayout;
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
|
import javax.swing.*;
|
||||||
|
import javax.swing.event.DocumentEvent;
|
||||||
|
import javax.swing.event.DocumentListener;
|
||||||
import java.awt.event.ActionEvent;
|
import java.awt.event.ActionEvent;
|
||||||
import java.awt.event.ActionListener;
|
import java.awt.event.ActionListener;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import javax.swing.ComboBoxModel;
|
|
||||||
import javax.swing.DefaultComboBoxModel;
|
|
||||||
import javax.swing.JComboBox;
|
|
||||||
import javax.swing.JLabel;
|
|
||||||
import javax.swing.JTextField;
|
|
||||||
import javax.swing.event.DocumentEvent;
|
|
||||||
import javax.swing.event.DocumentListener;
|
|
||||||
|
|
||||||
import org.slf4j.Logger;
|
|
||||||
import org.slf4j.LoggerFactory;
|
|
||||||
|
|
||||||
import net.miginfocom.swing.MigLayout;
|
|
||||||
import alias.AliasModel;
|
|
||||||
|
|
||||||
public class NameConfigurationEditor extends Editor<Channel> implements DocumentListener
|
public class NameConfigurationEditor extends Editor<Channel> implements DocumentListener
|
||||||
{
|
{
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
private final static Logger mLog = LoggerFactory.getLogger(NameConfigurationEditor.class);
|
private final static Logger mLog = LoggerFactory.getLogger(NameConfigurationEditor.class);
|
||||||
|
|
||||||
private static ComboBoxModel<String> EMPTY_MODEL = new DefaultComboBoxModel<>();
|
private static ComboBoxModel<String> EMPTY_SYSTEM_MODEL = new DefaultComboBoxModel<>();
|
||||||
|
private static ComboBoxModel<String> EMPTY_SITE_MODEL = new DefaultComboBoxModel<>();
|
||||||
|
private static ComboBoxModel<String> EMPTY_ALIAS_LIST_MODEL = new DefaultComboBoxModel<>();
|
||||||
|
|
||||||
private AliasModel mAliasModel;
|
private AliasModel mAliasModel;
|
||||||
private ChannelModel mChannelModel;
|
private ChannelModel mChannelModel;
|
||||||
@@ -73,7 +68,7 @@ public class NameConfigurationEditor extends Editor<Channel> implements Document
|
|||||||
add(new JLabel("Name:"));
|
add(new JLabel("Name:"));
|
||||||
add(mChannelName);
|
add(mChannelName);
|
||||||
|
|
||||||
mSystemNameCombo = new JComboBox<>( EMPTY_MODEL );
|
mSystemNameCombo = new JComboBox<>(EMPTY_SYSTEM_MODEL);
|
||||||
mSystemNameCombo.setEnabled(false);
|
mSystemNameCombo.setEnabled(false);
|
||||||
mSystemNameCombo.setEditable(true);
|
mSystemNameCombo.setEditable(true);
|
||||||
mSystemNameCombo.addActionListener(new ActionListener()
|
mSystemNameCombo.addActionListener(new ActionListener()
|
||||||
@@ -96,12 +91,13 @@ public class NameConfigurationEditor extends Editor<Channel> implements Document
|
|||||||
|
|
||||||
if(sites.isEmpty())
|
if(sites.isEmpty())
|
||||||
{
|
{
|
||||||
mSiteNameCombo.setModel( EMPTY_MODEL );
|
mSiteNameCombo.setModel(EMPTY_SITE_MODEL);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
mSiteNameCombo.setModel(new DefaultComboBoxModel<String>(
|
mSiteNameCombo.setModel(new DefaultComboBoxModel<String>(
|
||||||
sites.toArray( new String[ sites.size() ] ) ) );;
|
sites.toArray(new String[sites.size()])));
|
||||||
|
;
|
||||||
}
|
}
|
||||||
|
|
||||||
mSiteNameCombo.setSelectedItem(getItem().getSite());
|
mSiteNameCombo.setSelectedItem(getItem().getSite());
|
||||||
@@ -114,7 +110,7 @@ public class NameConfigurationEditor extends Editor<Channel> implements Document
|
|||||||
add(new JLabel("System:"));
|
add(new JLabel("System:"));
|
||||||
add(mSystemNameCombo);
|
add(mSystemNameCombo);
|
||||||
|
|
||||||
mAliasListCombo = new JComboBox<String>();
|
mAliasListCombo = new JComboBox<String>(EMPTY_ALIAS_LIST_MODEL);
|
||||||
mAliasListCombo.setEnabled(false);
|
mAliasListCombo.setEnabled(false);
|
||||||
mAliasListCombo.setEditable(true);
|
mAliasListCombo.setEditable(true);
|
||||||
mAliasListCombo.addActionListener(new ActionListener()
|
mAliasListCombo.addActionListener(new ActionListener()
|
||||||
@@ -129,7 +125,7 @@ public class NameConfigurationEditor extends Editor<Channel> implements Document
|
|||||||
add(new JLabel("Alias List:"));
|
add(new JLabel("Alias List:"));
|
||||||
add(mAliasListCombo);
|
add(mAliasListCombo);
|
||||||
|
|
||||||
mSiteNameCombo = new JComboBox<>( EMPTY_MODEL );
|
mSiteNameCombo = new JComboBox<>(EMPTY_SITE_MODEL);
|
||||||
mSiteNameCombo.setEnabled(false);
|
mSiteNameCombo.setEnabled(false);
|
||||||
mSiteNameCombo.setEditable(true);
|
mSiteNameCombo.setEditable(true);
|
||||||
mSiteNameCombo.addActionListener(new ActionListener()
|
mSiteNameCombo.addActionListener(new ActionListener()
|
||||||
@@ -203,12 +199,13 @@ public class NameConfigurationEditor extends Editor<Channel> implements Document
|
|||||||
|
|
||||||
if(systems.isEmpty())
|
if(systems.isEmpty())
|
||||||
{
|
{
|
||||||
mSystemNameCombo.setModel( EMPTY_MODEL );
|
mSystemNameCombo.setModel(EMPTY_SYSTEM_MODEL);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
mSystemNameCombo.setModel(new DefaultComboBoxModel<String>(
|
mSystemNameCombo.setModel(new DefaultComboBoxModel<String>(
|
||||||
systems.toArray( new String[ systems.size() ] ) ) );;
|
systems.toArray(new String[systems.size()])));
|
||||||
|
;
|
||||||
}
|
}
|
||||||
|
|
||||||
mSystemNameCombo.setSelectedItem(channel.getSystem());
|
mSystemNameCombo.setSelectedItem(channel.getSystem());
|
||||||
@@ -217,12 +214,13 @@ public class NameConfigurationEditor extends Editor<Channel> implements Document
|
|||||||
|
|
||||||
if(sites.isEmpty())
|
if(sites.isEmpty())
|
||||||
{
|
{
|
||||||
mSiteNameCombo.setModel( EMPTY_MODEL );
|
mSiteNameCombo.setModel(EMPTY_SITE_MODEL);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
mSiteNameCombo.setModel(new DefaultComboBoxModel<String>(
|
mSiteNameCombo.setModel(new DefaultComboBoxModel<String>(
|
||||||
sites.toArray( new String[ sites.size() ] ) ) );;
|
sites.toArray(new String[sites.size()])));
|
||||||
|
;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(channel.getSite() != null)
|
if(channel.getSite() != null)
|
||||||
|
|||||||
@@ -19,6 +19,7 @@ package dsp.filter;
|
|||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
|
||||||
|
import org.apache.commons.lang3.Validate;
|
||||||
import sample.real.RealSampleListener;
|
import sample.real.RealSampleListener;
|
||||||
|
|
||||||
public class FloatFIRFilter implements RealSampleListener
|
public class FloatFIRFilter implements RealSampleListener
|
||||||
@@ -139,7 +140,7 @@ public class FloatFIRFilter implements RealSampleListener
|
|||||||
private void generateIndexMap( int size )
|
private void generateIndexMap( int size )
|
||||||
{
|
{
|
||||||
//Ensure we have an odd size
|
//Ensure we have an odd size
|
||||||
assert( size % 2 == 1 );
|
Validate.isTrue(size % 2 == 1);
|
||||||
|
|
||||||
mIndexMap = new int[ size ][ size ];
|
mIndexMap = new int[ size ][ size ];
|
||||||
|
|
||||||
|
|||||||
@@ -19,6 +19,7 @@ package dsp.filter;
|
|||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
|
||||||
|
import org.apache.commons.lang3.Validate;
|
||||||
import sample.real.RealSampleListener;
|
import sample.real.RealSampleListener;
|
||||||
|
|
||||||
public class FloatHalfBandFilter implements RealSampleListener
|
public class FloatHalfBandFilter implements RealSampleListener
|
||||||
@@ -149,7 +150,7 @@ public class FloatHalfBandFilter implements RealSampleListener
|
|||||||
private void generateIndexMap( int size )
|
private void generateIndexMap( int size )
|
||||||
{
|
{
|
||||||
//Ensure we have an odd size
|
//Ensure we have an odd size
|
||||||
assert( size % 2 == 1 );
|
Validate.isTrue(size % 2 == 1);
|
||||||
|
|
||||||
int mapWidth = ( ( size + 1 ) / 2 ) + 1;
|
int mapWidth = ( ( size + 1 ) / 2 ) + 1;
|
||||||
|
|
||||||
|
|||||||
@@ -19,6 +19,7 @@ package dsp.filter;
|
|||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
|
||||||
|
import org.apache.commons.lang3.Validate;
|
||||||
import sample.real.RealSampleListener;
|
import sample.real.RealSampleListener;
|
||||||
|
|
||||||
public class FloatHalfBandNoDecimateFilter implements RealSampleListener
|
public class FloatHalfBandNoDecimateFilter implements RealSampleListener
|
||||||
@@ -139,7 +140,7 @@ public class FloatHalfBandNoDecimateFilter implements RealSampleListener
|
|||||||
private void generateIndexMap( int size )
|
private void generateIndexMap( int size )
|
||||||
{
|
{
|
||||||
//Ensure we have an odd size
|
//Ensure we have an odd size
|
||||||
assert( size % 2 == 1 );
|
Validate.isTrue(size % 2 == 1);
|
||||||
|
|
||||||
int mapWidth = ( ( size + 1 ) / 2 ) + 1;
|
int mapWidth = ( ( size + 1 ) / 2 ) + 1;
|
||||||
|
|
||||||
|
|||||||
@@ -20,6 +20,7 @@ package dsp.filter.cic;
|
|||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import org.apache.commons.lang3.Validate;
|
||||||
import sample.Listener;
|
import sample.Listener;
|
||||||
import sample.complex.ComplexBuffer;
|
import sample.complex.ComplexBuffer;
|
||||||
import sample.complex.ComplexSampleListener;
|
import sample.complex.ComplexSampleListener;
|
||||||
@@ -67,7 +68,7 @@ public class ComplexPrimeCICDecimate implements Listener<ComplexBuffer>
|
|||||||
public ComplexPrimeCICDecimate( int decimation, int order,
|
public ComplexPrimeCICDecimate( int decimation, int order,
|
||||||
int passFrequency, int attenuation, WindowType windowType )
|
int passFrequency, int attenuation, WindowType windowType )
|
||||||
{
|
{
|
||||||
assert( decimation <= 700 );
|
Validate.isTrue(decimation <= 700);
|
||||||
|
|
||||||
|
|
||||||
List<Integer> stageSizes = getPrimeFactors( decimation );
|
List<Integer> stageSizes = getPrimeFactors( decimation );
|
||||||
|
|||||||
@@ -20,6 +20,7 @@ package dsp.filter.cic;
|
|||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import org.apache.commons.lang3.Validate;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
@@ -81,7 +82,7 @@ public class RealPrimeCICDecimate
|
|||||||
public RealPrimeCICDecimate( int decimation, int order, int passFrequency,
|
public RealPrimeCICDecimate( int decimation, int order, int passFrequency,
|
||||||
int attenuation, WindowType windowType, int outputBufferSize )
|
int attenuation, WindowType windowType, int outputBufferSize )
|
||||||
{
|
{
|
||||||
assert( decimation <= 700 );
|
Validate.isTrue(decimation <= 700);
|
||||||
|
|
||||||
mOutputBufferSize = outputBufferSize;
|
mOutputBufferSize = outputBufferSize;
|
||||||
|
|
||||||
|
|||||||
@@ -17,6 +17,8 @@
|
|||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
package dsp.filter.halfband.real;
|
package dsp.filter.halfband.real;
|
||||||
|
|
||||||
|
import org.apache.commons.lang3.Validate;
|
||||||
|
|
||||||
public class HalfBandFilter
|
public class HalfBandFilter
|
||||||
{
|
{
|
||||||
private float[] mBuffer;
|
private float[] mBuffer;
|
||||||
@@ -122,7 +124,7 @@ public class HalfBandFilter
|
|||||||
private void generateIndexMap( int size )
|
private void generateIndexMap( int size )
|
||||||
{
|
{
|
||||||
//Ensure we have an odd size
|
//Ensure we have an odd size
|
||||||
assert( size % 2 == 1 );
|
Validate.isTrue(size % 2 == 1);
|
||||||
|
|
||||||
int mapWidth = ( ( size + 1 ) / 2 ) + 1;
|
int mapWidth = ( ( size + 1 ) / 2 ) + 1;
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
package dsp.filter.interpolator;
|
package dsp.filter.interpolator;
|
||||||
|
|
||||||
|
import org.apache.commons.lang3.Validate;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
@@ -31,7 +32,7 @@ public class RealInterpolator extends Interpolator
|
|||||||
public float filter( float[] samples, int offset, float mu )
|
public float filter( float[] samples, int offset, float mu )
|
||||||
{
|
{
|
||||||
/* Ensure we have enough samples in the array */
|
/* Ensure we have enough samples in the array */
|
||||||
assert( samples.length >= offset + 7 );
|
Validate.isTrue(samples.length >= offset + 7);
|
||||||
|
|
||||||
/* Identify the filter bank that corresponds to mu */
|
/* Identify the filter bank that corresponds to mu */
|
||||||
int index = (int)( NSTEPS * mu );
|
int index = (int)( NSTEPS * mu );
|
||||||
|
|||||||
@@ -18,6 +18,7 @@
|
|||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
package dsp.filter.polyphase;
|
package dsp.filter.polyphase;
|
||||||
|
|
||||||
|
import org.apache.commons.lang3.Validate;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
@@ -53,7 +54,7 @@ public class PolyphaseFIRInterpolatingFilter
|
|||||||
public PolyphaseFIRInterpolatingFilter( double[] coefficients, int interpolation )
|
public PolyphaseFIRInterpolatingFilter( double[] coefficients, int interpolation )
|
||||||
{
|
{
|
||||||
/* Ensure coefficients are an integral multiple of the interpolation factor */
|
/* Ensure coefficients are an integral multiple of the interpolation factor */
|
||||||
assert( coefficients.length % interpolation == 0 );
|
Validate.isTrue(coefficients.length % interpolation == 0);
|
||||||
|
|
||||||
mTaps = coefficients;
|
mTaps = coefficients;
|
||||||
|
|
||||||
|
|||||||
@@ -17,6 +17,7 @@
|
|||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
package dsp.gain;
|
package dsp.gain;
|
||||||
|
|
||||||
|
import org.apache.commons.lang3.Validate;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
@@ -49,7 +50,7 @@ public class DirectGainControl implements GainController, RealSampleListener
|
|||||||
*/
|
*/
|
||||||
public DirectGainControl( float gain, float minimum, float maximum, float increment )
|
public DirectGainControl( float gain, float minimum, float maximum, float increment )
|
||||||
{
|
{
|
||||||
assert( minimum > 0 );
|
Validate.isTrue(minimum > 0);
|
||||||
|
|
||||||
mDefaultGain = gain;
|
mDefaultGain = gain;
|
||||||
mGain = gain;
|
mGain = gain;
|
||||||
|
|||||||
@@ -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,9 +412,7 @@ 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())
|
||||||
{
|
{
|
||||||
@@ -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())
|
||||||
{
|
{
|
||||||
@@ -466,20 +461,19 @@ 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())
|
||||||
|
|||||||
@@ -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;
|
||||||
@@ -2741,7 +2742,7 @@ public class P25DecoderState extends DecoderState
|
|||||||
|
|
||||||
P25CallEvent event = new P25CallEvent.Builder(CallEventType.PATCH_GROUP_CALL)
|
P25CallEvent event = new P25CallEvent.Builder(CallEventType.PATCH_GROUP_CALL)
|
||||||
.aliasList(getAliasList())
|
.aliasList(getAliasList())
|
||||||
.channel(channel)
|
.channel(channel + (pgvcg.isTDMAChannel() ? " TDMA" : ""))
|
||||||
.details(details.toString())
|
.details(details.toString())
|
||||||
.frequency(pgvcg.getDownlinkFrequency())
|
.frequency(pgvcg.getDownlinkFrequency())
|
||||||
.from(from)
|
.from(from)
|
||||||
@@ -2752,8 +2753,10 @@ public class P25DecoderState extends DecoderState
|
|||||||
broadcast(event);
|
broadcast(event);
|
||||||
}
|
}
|
||||||
|
|
||||||
broadcast(new TrafficChannelAllocationEvent(this,
|
if(!pgvcg.isTDMAChannel())
|
||||||
mChannelCallMap.get(channel)));
|
{
|
||||||
|
broadcast(new TrafficChannelAllocationEvent(this, mChannelCallMap.get(channel)));
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case PATCH_GROUP_CHANNEL_GRANT_UPDATE:
|
case PATCH_GROUP_CHANNEL_GRANT_UPDATE:
|
||||||
//Cleanup patch groups - auto-expire any patch groups before we allocate a channel
|
//Cleanup patch groups - auto-expire any patch groups before we allocate a channel
|
||||||
@@ -2772,10 +2775,8 @@ public class P25DecoderState extends DecoderState
|
|||||||
{
|
{
|
||||||
P25CallEvent event = new P25CallEvent.Builder(CallEventType.PATCH_GROUP_CALL)
|
P25CallEvent event = new P25CallEvent.Builder(CallEventType.PATCH_GROUP_CALL)
|
||||||
.aliasList(getAliasList())
|
.aliasList(getAliasList())
|
||||||
.channel(channel)
|
.channel(channel + (gvcgu.isTDMAChannel1() ? " TDMA" : ""))
|
||||||
.details((gvcgu.isEncrypted() ? "ENCRYPTED " : "") +
|
.details((gvcgu.isEncrypted() ? "ENCRYPTED " : ""))
|
||||||
"PATCH UPDATE - GROUP 2:" + gvcgu.getPatchGroupAddress2() +
|
|
||||||
" DN:" + gvcgu.getDownlinkFrequency2())
|
|
||||||
.frequency(gvcgu.getDownlinkFrequency1())
|
.frequency(gvcgu.getDownlinkFrequency1())
|
||||||
.to(to)
|
.to(to)
|
||||||
.build();
|
.build();
|
||||||
@@ -2784,8 +2785,37 @@ public class P25DecoderState extends DecoderState
|
|||||||
broadcast(event);
|
broadcast(event);
|
||||||
}
|
}
|
||||||
|
|
||||||
broadcast(new TrafficChannelAllocationEvent(this,
|
if(!gvcgu.isTDMAChannel1())
|
||||||
mChannelCallMap.get(channel)));
|
{
|
||||||
|
broadcast(new TrafficChannelAllocationEvent(this, mChannelCallMap.get(channel)));
|
||||||
|
}
|
||||||
|
|
||||||
|
String channel2 = gvcgu.getChannel2();
|
||||||
|
String to2 = gvcgu.getPatchGroupAddress2();
|
||||||
|
|
||||||
|
if(hasCallEvent(channel2, null, to2))
|
||||||
|
{
|
||||||
|
updateCallEvent(channel2, null, to2);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
P25CallEvent event = new P25CallEvent.Builder(CallEventType.PATCH_GROUP_CALL)
|
||||||
|
.aliasList(getAliasList())
|
||||||
|
.channel(channel2 + (gvcgu.isTDMAChannel2() ? " TDMA" : ""))
|
||||||
|
.details((gvcgu.isEncrypted() ? "ENCRYPTED " : ""))
|
||||||
|
.frequency(gvcgu.getDownlinkFrequency2())
|
||||||
|
.to(to2)
|
||||||
|
.build();
|
||||||
|
|
||||||
|
registerCallEvent(event);
|
||||||
|
broadcast(event);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!gvcgu.isTDMAChannel2())
|
||||||
|
{
|
||||||
|
broadcast(new TrafficChannelAllocationEvent(this, mChannelCallMap.get(channel2)));
|
||||||
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case PATCH_GROUP_ADD:
|
case PATCH_GROUP_ADD:
|
||||||
PatchGroupAdd pga = (PatchGroupAdd)tsbk;
|
PatchGroupAdd pga = (PatchGroupAdd)tsbk;
|
||||||
@@ -2843,7 +2873,7 @@ public class P25DecoderState extends DecoderState
|
|||||||
|
|
||||||
P25CallEvent event = new P25CallEvent.Builder(CallEventType.DATA_CALL)
|
P25CallEvent event = new P25CallEvent.Builder(CallEventType.DATA_CALL)
|
||||||
.aliasList(getAliasList())
|
.aliasList(getAliasList())
|
||||||
.channel(channel)
|
.channel(channel + (gdcg.isTDMAChannel() ? " TDMA" : ""))
|
||||||
.details(details.toString())
|
.details(details.toString())
|
||||||
.frequency(gdcg.getDownlinkFrequency())
|
.frequency(gdcg.getDownlinkFrequency())
|
||||||
.from(from)
|
.from(from)
|
||||||
@@ -2854,7 +2884,7 @@ public class P25DecoderState extends DecoderState
|
|||||||
broadcast(event);
|
broadcast(event);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!mIgnoreDataCalls)
|
if(!mIgnoreDataCalls && !gdcg.isTDMAChannel())
|
||||||
{
|
{
|
||||||
broadcast(new TrafficChannelAllocationEvent(this,
|
broadcast(new TrafficChannelAllocationEvent(this,
|
||||||
mChannelCallMap.get(channel)));
|
mChannelCallMap.get(channel)));
|
||||||
@@ -2881,7 +2911,7 @@ public class P25DecoderState extends DecoderState
|
|||||||
|
|
||||||
P25CallEvent event = new P25CallEvent.Builder(CallEventType.GROUP_CALL)
|
P25CallEvent event = new P25CallEvent.Builder(CallEventType.GROUP_CALL)
|
||||||
.aliasList(getAliasList())
|
.aliasList(getAliasList())
|
||||||
.channel(channel)
|
.channel(channel + (gvcg.isTDMAChannel() ? " TDMA" : ""))
|
||||||
.details(details.toString())
|
.details(details.toString())
|
||||||
.frequency(gvcg.getDownlinkFrequency())
|
.frequency(gvcg.getDownlinkFrequency())
|
||||||
.from(from)
|
.from(from)
|
||||||
@@ -2892,8 +2922,10 @@ public class P25DecoderState extends DecoderState
|
|||||||
broadcast(event);
|
broadcast(event);
|
||||||
}
|
}
|
||||||
|
|
||||||
broadcast(new TrafficChannelAllocationEvent(this,
|
if(!gvcg.isTDMAChannel())
|
||||||
mChannelCallMap.get(channel)));
|
{
|
||||||
|
broadcast(new TrafficChannelAllocationEvent(this, mChannelCallMap.get(channel)));
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case GROUP_VOICE_CHANNEL_GRANT_UPDATE:
|
case GROUP_VOICE_CHANNEL_GRANT_UPDATE:
|
||||||
GroupVoiceChannelGrantUpdate gvcgu =
|
GroupVoiceChannelGrantUpdate gvcgu =
|
||||||
@@ -2917,8 +2949,7 @@ public class P25DecoderState extends DecoderState
|
|||||||
|
|
||||||
P25CallEvent event = new P25CallEvent.Builder(CallEventType.GROUP_CALL)
|
P25CallEvent event = new P25CallEvent.Builder(CallEventType.GROUP_CALL)
|
||||||
.aliasList(getAliasList())
|
.aliasList(getAliasList())
|
||||||
.channel(channel)
|
.channel(gvcgu.getChannel1() + (gvcgu.isTDMAChannel1() ? " TDMA" : ""))
|
||||||
.channel(gvcgu.getChannel1())
|
|
||||||
.details(details.toString())
|
.details(details.toString())
|
||||||
.frequency(gvcgu.getDownlinkFrequency1())
|
.frequency(gvcgu.getDownlinkFrequency1())
|
||||||
.from(from)
|
.from(from)
|
||||||
@@ -2929,8 +2960,10 @@ public class P25DecoderState extends DecoderState
|
|||||||
broadcast(event);
|
broadcast(event);
|
||||||
}
|
}
|
||||||
|
|
||||||
broadcast(new TrafficChannelAllocationEvent(this,
|
if(!gvcgu.isTDMAChannel1())
|
||||||
mChannelCallMap.get(channel)));
|
{
|
||||||
|
broadcast(new TrafficChannelAllocationEvent(this, mChannelCallMap.get(channel)));
|
||||||
|
}
|
||||||
|
|
||||||
if(gvcgu.hasChannelNumber2())
|
if(gvcgu.hasChannelNumber2())
|
||||||
{
|
{
|
||||||
@@ -2951,7 +2984,7 @@ public class P25DecoderState extends DecoderState
|
|||||||
|
|
||||||
P25CallEvent event2 = new P25CallEvent.Builder(CallEventType.GROUP_CALL)
|
P25CallEvent event2 = new P25CallEvent.Builder(CallEventType.GROUP_CALL)
|
||||||
.aliasList(getAliasList())
|
.aliasList(getAliasList())
|
||||||
.channel(gvcgu.getChannel2())
|
.channel(gvcgu.getChannel2() + (gvcgu.isTDMAChannel2() ? " TDMA" : ""))
|
||||||
.details(details.toString())
|
.details(details.toString())
|
||||||
.frequency(gvcgu.getDownlinkFrequency2())
|
.frequency(gvcgu.getDownlinkFrequency2())
|
||||||
.to(gvcgu.getGroupAddress2())
|
.to(gvcgu.getGroupAddress2())
|
||||||
@@ -2961,8 +2994,10 @@ public class P25DecoderState extends DecoderState
|
|||||||
broadcast(event2);
|
broadcast(event2);
|
||||||
}
|
}
|
||||||
|
|
||||||
broadcast(new TrafficChannelAllocationEvent(this,
|
if(!gvcgu.isTDMAChannel2())
|
||||||
mChannelCallMap.get(channel)));
|
{
|
||||||
|
broadcast(new TrafficChannelAllocationEvent(this, mChannelCallMap.get(channel)));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case GROUP_VOICE_CHANNEL_GRANT_UPDATE_EXPLICIT:
|
case GROUP_VOICE_CHANNEL_GRANT_UPDATE_EXPLICIT:
|
||||||
@@ -2988,7 +3023,7 @@ public class P25DecoderState extends DecoderState
|
|||||||
|
|
||||||
P25CallEvent event = new P25CallEvent.Builder(CallEventType.GROUP_CALL)
|
P25CallEvent event = new P25CallEvent.Builder(CallEventType.GROUP_CALL)
|
||||||
.aliasList(getAliasList())
|
.aliasList(getAliasList())
|
||||||
.channel(channel)
|
.channel(channel + (gvcgue.isTDMAChannel() ? " TDMA" : ""))
|
||||||
.details(details.toString())
|
.details(details.toString())
|
||||||
.frequency(gvcgue.getDownlinkFrequency())
|
.frequency(gvcgue.getDownlinkFrequency())
|
||||||
.from(from)
|
.from(from)
|
||||||
@@ -2999,8 +3034,10 @@ public class P25DecoderState extends DecoderState
|
|||||||
broadcast(event);
|
broadcast(event);
|
||||||
}
|
}
|
||||||
|
|
||||||
broadcast(new TrafficChannelAllocationEvent(this,
|
if(!gvcgue.isTDMAChannel())
|
||||||
mChannelCallMap.get(channel)));
|
{
|
||||||
|
broadcast(new TrafficChannelAllocationEvent(this, mChannelCallMap.get(channel)));
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case INDIVIDUAL_DATA_CHANNEL_GRANT:
|
case INDIVIDUAL_DATA_CHANNEL_GRANT:
|
||||||
IndividualDataChannelGrant idcg = (IndividualDataChannelGrant)message;
|
IndividualDataChannelGrant idcg = (IndividualDataChannelGrant)message;
|
||||||
@@ -3023,7 +3060,7 @@ public class P25DecoderState extends DecoderState
|
|||||||
|
|
||||||
P25CallEvent event = new P25CallEvent.Builder(CallEventType.DATA_CALL)
|
P25CallEvent event = new P25CallEvent.Builder(CallEventType.DATA_CALL)
|
||||||
.aliasList(getAliasList())
|
.aliasList(getAliasList())
|
||||||
.channel(channel)
|
.channel(channel + (idcg.isTDMAChannel() ? " TDMA" : ""))
|
||||||
.details(details.toString())
|
.details(details.toString())
|
||||||
.frequency(idcg.getDownlinkFrequency())
|
.frequency(idcg.getDownlinkFrequency())
|
||||||
.from(from)
|
.from(from)
|
||||||
@@ -3034,10 +3071,9 @@ public class P25DecoderState extends DecoderState
|
|||||||
broadcast(event);
|
broadcast(event);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!mIgnoreDataCalls)
|
if(!mIgnoreDataCalls && !idcg.isTDMAChannel())
|
||||||
{
|
{
|
||||||
broadcast(new TrafficChannelAllocationEvent(this,
|
broadcast(new TrafficChannelAllocationEvent(this, mChannelCallMap.get(channel)));
|
||||||
mChannelCallMap.get(channel)));
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case SNDCP_DATA_CHANNEL_GRANT:
|
case SNDCP_DATA_CHANNEL_GRANT:
|
||||||
@@ -3060,7 +3096,7 @@ public class P25DecoderState extends DecoderState
|
|||||||
|
|
||||||
P25CallEvent event = new P25CallEvent.Builder(CallEventType.DATA_CALL)
|
P25CallEvent event = new P25CallEvent.Builder(CallEventType.DATA_CALL)
|
||||||
.aliasList(getAliasList())
|
.aliasList(getAliasList())
|
||||||
.channel(channel)
|
.channel(channel + (sdcg.isTDMAChannel() ? " TDMA" : ""))
|
||||||
.details(details.toString())
|
.details(details.toString())
|
||||||
.frequency(sdcg.getDownlinkFrequency())
|
.frequency(sdcg.getDownlinkFrequency())
|
||||||
.from(from)
|
.from(from)
|
||||||
@@ -3071,15 +3107,13 @@ public class P25DecoderState extends DecoderState
|
|||||||
broadcast(event);
|
broadcast(event);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!mIgnoreDataCalls)
|
if(!mIgnoreDataCalls && !sdcg.isTDMAChannel())
|
||||||
{
|
{
|
||||||
broadcast(new TrafficChannelAllocationEvent(this,
|
broadcast(new TrafficChannelAllocationEvent(this, mChannelCallMap.get(channel)));
|
||||||
mChannelCallMap.get(channel)));
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case TELEPHONE_INTERCONNECT_VOICE_CHANNEL_GRANT:
|
case TELEPHONE_INTERCONNECT_VOICE_CHANNEL_GRANT:
|
||||||
TelephoneInterconnectVoiceChannelGrant tivcg =
|
TelephoneInterconnectVoiceChannelGrant tivcg = (TelephoneInterconnectVoiceChannelGrant)message;
|
||||||
(TelephoneInterconnectVoiceChannelGrant)message;
|
|
||||||
|
|
||||||
channel = tivcg.getChannel();
|
channel = tivcg.getChannel();
|
||||||
from = null;
|
from = null;
|
||||||
@@ -3103,7 +3137,7 @@ public class P25DecoderState extends DecoderState
|
|||||||
P25CallEvent event = new P25CallEvent.Builder(
|
P25CallEvent event = new P25CallEvent.Builder(
|
||||||
CallEventType.TELEPHONE_INTERCONNECT)
|
CallEventType.TELEPHONE_INTERCONNECT)
|
||||||
.aliasList(getAliasList())
|
.aliasList(getAliasList())
|
||||||
.channel(channel)
|
.channel(channel + (tivcg.isTDMAChannel() ? " TDMA" : ""))
|
||||||
.details(details.toString())
|
.details(details.toString())
|
||||||
.frequency(tivcg.getDownlinkFrequency())
|
.frequency(tivcg.getDownlinkFrequency())
|
||||||
.from(from)
|
.from(from)
|
||||||
@@ -3114,15 +3148,15 @@ public class P25DecoderState extends DecoderState
|
|||||||
broadcast(event);
|
broadcast(event);
|
||||||
}
|
}
|
||||||
|
|
||||||
broadcast(new TrafficChannelAllocationEvent(this,
|
if(!tivcg.isTDMAChannel())
|
||||||
mChannelCallMap.get(channel)));
|
{
|
||||||
|
broadcast(new TrafficChannelAllocationEvent(this, mChannelCallMap.get(channel)));
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case TELEPHONE_INTERCONNECT_VOICE_CHANNEL_GRANT_UPDATE:
|
case TELEPHONE_INTERCONNECT_VOICE_CHANNEL_GRANT_UPDATE:
|
||||||
TelephoneInterconnectVoiceChannelGrantUpdate tivcgu =
|
TelephoneInterconnectVoiceChannelGrantUpdate tivcgu = (TelephoneInterconnectVoiceChannelGrantUpdate)message;
|
||||||
(TelephoneInterconnectVoiceChannelGrantUpdate)message;
|
|
||||||
|
|
||||||
channel = tivcgu.getChannelIdentifier() + "-" +
|
channel = tivcgu.getChannelIdentifier() + "-" + tivcgu.getChannelNumber();
|
||||||
tivcgu.getChannelNumber();
|
|
||||||
from = null;
|
from = null;
|
||||||
|
|
||||||
/* Address is ambiguous and could mean either source or target,
|
/* Address is ambiguous and could mean either source or target,
|
||||||
@@ -3145,7 +3179,7 @@ public class P25DecoderState extends DecoderState
|
|||||||
P25CallEvent event = new P25CallEvent.Builder(
|
P25CallEvent event = new P25CallEvent.Builder(
|
||||||
CallEventType.TELEPHONE_INTERCONNECT)
|
CallEventType.TELEPHONE_INTERCONNECT)
|
||||||
.aliasList(getAliasList())
|
.aliasList(getAliasList())
|
||||||
.channel(channel)
|
.channel(channel + (tivcgu.isTDMAChannel() ? " TDMA" : ""))
|
||||||
.details(details.toString())
|
.details(details.toString())
|
||||||
.frequency(tivcgu.getDownlinkFrequency())
|
.frequency(tivcgu.getDownlinkFrequency())
|
||||||
.from(from)
|
.from(from)
|
||||||
@@ -3156,15 +3190,15 @@ public class P25DecoderState extends DecoderState
|
|||||||
broadcast(event);
|
broadcast(event);
|
||||||
}
|
}
|
||||||
|
|
||||||
broadcast(new TrafficChannelAllocationEvent(this,
|
if(!tivcgu.isTDMAChannel())
|
||||||
mChannelCallMap.get(channel)));
|
{
|
||||||
|
broadcast(new TrafficChannelAllocationEvent(this, mChannelCallMap.get(channel)));
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case UNIT_TO_UNIT_VOICE_CHANNEL_GRANT:
|
case UNIT_TO_UNIT_VOICE_CHANNEL_GRANT:
|
||||||
UnitToUnitVoiceChannelGrant uuvcg =
|
UnitToUnitVoiceChannelGrant uuvcg = (UnitToUnitVoiceChannelGrant)message;
|
||||||
(UnitToUnitVoiceChannelGrant)message;
|
|
||||||
|
|
||||||
channel = uuvcg.getChannelIdentifier() + "-" +
|
channel = uuvcg.getChannelIdentifier() + "-" + uuvcg.getChannelNumber();
|
||||||
uuvcg.getChannelNumber();
|
|
||||||
from = uuvcg.getSourceAddress();
|
from = uuvcg.getSourceAddress();
|
||||||
to = uuvcg.getTargetAddress();
|
to = uuvcg.getTargetAddress();
|
||||||
|
|
||||||
@@ -3183,7 +3217,7 @@ public class P25DecoderState extends DecoderState
|
|||||||
P25CallEvent event = new P25CallEvent.Builder(
|
P25CallEvent event = new P25CallEvent.Builder(
|
||||||
CallEventType.UNIT_TO_UNIT_CALL)
|
CallEventType.UNIT_TO_UNIT_CALL)
|
||||||
.aliasList(getAliasList())
|
.aliasList(getAliasList())
|
||||||
.channel(channel)
|
.channel(channel + (uuvcg.isTDMAChannel() ? " TDMA" : ""))
|
||||||
.details(details.toString())
|
.details(details.toString())
|
||||||
.frequency(uuvcg.getDownlinkFrequency())
|
.frequency(uuvcg.getDownlinkFrequency())
|
||||||
.from(from)
|
.from(from)
|
||||||
@@ -3194,15 +3228,15 @@ public class P25DecoderState extends DecoderState
|
|||||||
broadcast(event);
|
broadcast(event);
|
||||||
}
|
}
|
||||||
|
|
||||||
broadcast(new TrafficChannelAllocationEvent(this,
|
if(!uuvcg.isTDMAChannel())
|
||||||
mChannelCallMap.get(channel)));
|
{
|
||||||
|
broadcast(new TrafficChannelAllocationEvent(this, mChannelCallMap.get(channel)));
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case UNIT_TO_UNIT_VOICE_CHANNEL_GRANT_UPDATE:
|
case UNIT_TO_UNIT_VOICE_CHANNEL_GRANT_UPDATE:
|
||||||
UnitToUnitVoiceChannelGrantUpdate uuvcgu =
|
UnitToUnitVoiceChannelGrantUpdate uuvcgu = (UnitToUnitVoiceChannelGrantUpdate)message;
|
||||||
(UnitToUnitVoiceChannelGrantUpdate)message;
|
|
||||||
|
|
||||||
channel = uuvcgu.getChannelIdentifier() + "-" +
|
channel = uuvcgu.getChannelIdentifier() + "-" + uuvcgu.getChannelNumber();
|
||||||
uuvcgu.getChannelNumber();
|
|
||||||
from = uuvcgu.getSourceAddress();
|
from = uuvcgu.getSourceAddress();
|
||||||
to = uuvcgu.getTargetAddress();
|
to = uuvcgu.getTargetAddress();
|
||||||
|
|
||||||
@@ -3221,7 +3255,7 @@ public class P25DecoderState extends DecoderState
|
|||||||
P25CallEvent event = new P25CallEvent.Builder(
|
P25CallEvent event = new P25CallEvent.Builder(
|
||||||
CallEventType.UNIT_TO_UNIT_CALL)
|
CallEventType.UNIT_TO_UNIT_CALL)
|
||||||
.aliasList(getAliasList())
|
.aliasList(getAliasList())
|
||||||
.channel(channel)
|
.channel(channel + (uuvcgu.isTDMAChannel() ? " TDMA" : ""))
|
||||||
.details(details.toString())
|
.details(details.toString())
|
||||||
.frequency(uuvcgu.getDownlinkFrequency())
|
.frequency(uuvcgu.getDownlinkFrequency())
|
||||||
.from(from)
|
.from(from)
|
||||||
@@ -3232,8 +3266,10 @@ public class P25DecoderState extends DecoderState
|
|||||||
broadcast(event);
|
broadcast(event);
|
||||||
}
|
}
|
||||||
|
|
||||||
broadcast(new TrafficChannelAllocationEvent(this,
|
if(!uuvcgu.isTDMAChannel())
|
||||||
mChannelCallMap.get(channel)));
|
{
|
||||||
|
broadcast(new TrafficChannelAllocationEvent(this, mChannelCallMap.get(channel)));
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
@@ -3343,29 +3379,25 @@ public class P25DecoderState extends DecoderState
|
|||||||
{
|
{
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
|
|
||||||
sb.append("Activity Summary\n");
|
sb.append("Activity Summary - Decoder:P25 ").append(getModulation().getLabel()).append("\n");
|
||||||
sb.append("Decoder:\tP25\n");
|
sb.append(DIVIDER1);
|
||||||
sb.append("===================== THIS SITE ======================");
|
sb.append("SITE ");
|
||||||
|
|
||||||
if(mNetworkStatus != null)
|
if(mNetworkStatus != null)
|
||||||
{
|
{
|
||||||
sb.append("\nNAC:\t" + mNetworkStatus.getNAC());
|
sb.append("NAC:" + mNetworkStatus.getNAC());
|
||||||
sb.append("\nWACN-SYS:\t" + mNetworkStatus.getWACN());
|
sb.append("h WACN:" + mNetworkStatus.getWACN());
|
||||||
sb.append("-" + mNetworkStatus.getSystemID());
|
sb.append("h SYS:" + mNetworkStatus.getSystemID());
|
||||||
sb.append(" [");
|
sb.append("h [").append(mNetworkStatus.getNetworkCallsign()).append("]");
|
||||||
sb.append(mNetworkStatus.getNetworkCallsign());
|
sb.append(" LRA:" + mNetworkStatus.getLocationRegistrationArea());
|
||||||
sb.append("]");
|
|
||||||
sb.append("\nLRA:\t" + mNetworkStatus.getLocationRegistrationArea());
|
|
||||||
}
|
}
|
||||||
else if(mNetworkStatusExtended != null)
|
else if(mNetworkStatusExtended != null)
|
||||||
{
|
{
|
||||||
sb.append("\nNAC:\t" + mNetworkStatusExtended.getNAC());
|
sb.append("NAC:" + mNetworkStatusExtended.getNAC());
|
||||||
sb.append("\nWACN-SYS:\t" + mNetworkStatusExtended.getWACN());
|
sb.append("h WACN:" + mNetworkStatusExtended.getWACN());
|
||||||
sb.append("-" + mNetworkStatusExtended.getSystemID());
|
sb.append("h SYS:" + mNetworkStatusExtended.getSystemID());
|
||||||
sb.append(" [");
|
sb.append("h [").append(mNetworkStatusExtended.getNetworkCallsign()).append("]");
|
||||||
sb.append(mNetworkStatusExtended.getNetworkCallsign());
|
sb.append(" LRA:" + mNetworkStatusExtended.getLocationRegistrationArea());
|
||||||
sb.append("]");
|
|
||||||
sb.append("\nLRA:\t" + mNetworkStatusExtended.getLocationRegistrationArea());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
String site = null;
|
String site = null;
|
||||||
@@ -3376,11 +3408,10 @@ public class P25DecoderState extends DecoderState
|
|||||||
}
|
}
|
||||||
else if(mRFSSStatusMessageExtended != null)
|
else if(mRFSSStatusMessageExtended != null)
|
||||||
{
|
{
|
||||||
site = mRFSSStatusMessageExtended.getRFSubsystemID() + "-" +
|
site = mRFSSStatusMessageExtended.getRFSubsystemID() + "-" + mRFSSStatusMessageExtended.getSiteID();
|
||||||
mRFSSStatusMessageExtended.getSiteID();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
sb.append("\nRFSS-SITE:\t" + site);
|
sb.append("h RFSS-SITE:").append(site).append("h");
|
||||||
|
|
||||||
if(hasAliasList())
|
if(hasAliasList())
|
||||||
{
|
{
|
||||||
@@ -3392,121 +3423,120 @@ public class P25DecoderState extends DecoderState
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sb.append("\n").append(DIVIDER2);
|
||||||
|
|
||||||
if(mNetworkStatus != null)
|
if(mNetworkStatus != null)
|
||||||
{
|
{
|
||||||
sb.append("\nSERVICES:\t" + SystemService.toString(
|
sb.append("SERVICES: " + SystemService.toString(mNetworkStatus.getSystemServiceClass())).append("\n");
|
||||||
mNetworkStatus.getSystemServiceClass()));
|
sb.append(DIVIDER2);
|
||||||
sb.append("\nPCCH:\tDNLINK " + mFrequencyFormatter.format(
|
sb.append("PCCH DOWNLINK ")
|
||||||
(double)mNetworkStatus.getDownlinkFrequency() / 1E6d) +
|
.append(mFrequencyFormatter.format((double)mNetworkStatus.getDownlinkFrequency() / 1E6d))
|
||||||
" [" + mNetworkStatus.getIdentifier() + "-" +
|
.append(" [").append(mNetworkStatus.getIdentifier()).append("-").append(mNetworkStatus.getChannel())
|
||||||
mNetworkStatus.getChannel() + "]\n");
|
.append("] UPLINK ")
|
||||||
sb.append("\tUPLINK " + mFrequencyFormatter.format(
|
.append(mFrequencyFormatter.format((double)mNetworkStatus.getUplinkFrequency() / 1E6d))
|
||||||
(double)mNetworkStatus.getUplinkFrequency() / 1E6d) + " [" +
|
.append(" [").append(mNetworkStatus.getIdentifier()).append("-").append(mNetworkStatus.getChannel())
|
||||||
mNetworkStatus.getIdentifier() + "-" +
|
.append("]\n");
|
||||||
mNetworkStatus.getChannel() + "]\n");
|
|
||||||
}
|
}
|
||||||
else if(mNetworkStatusExtended != null)
|
else if(mNetworkStatusExtended != null)
|
||||||
{
|
{
|
||||||
sb.append("\nSERVICES:\t" + SystemService.toString(
|
sb.append("\nSERVICES:").append(SystemService.toString(mNetworkStatusExtended.getSystemServiceClass()))
|
||||||
mNetworkStatusExtended.getSystemServiceClass()));
|
.append("\n");
|
||||||
sb.append("\nPCCH:\tDNLINK " + mFrequencyFormatter.format(
|
sb.append(DIVIDER2);
|
||||||
(double)mNetworkStatusExtended.getDownlinkFrequency() / 1E6d) +
|
sb.append("PCCH DOWNLINK ")
|
||||||
" [" + mNetworkStatusExtended.getTransmitIdentifier() + "-" +
|
.append(mFrequencyFormatter.format((double)mNetworkStatusExtended.getDownlinkFrequency() / 1E6d))
|
||||||
mNetworkStatusExtended.getTransmitChannel() + "]\n");
|
.append(" [").append(mNetworkStatusExtended.getTransmitIdentifier()).append("-")
|
||||||
sb.append("\tUPLINK " + mFrequencyFormatter.format(
|
.append(mNetworkStatusExtended.getTransmitChannel()).append("] UPLINK ")
|
||||||
(double)mNetworkStatusExtended.getUplinkFrequency() / 1E6d) +
|
.append(mFrequencyFormatter.format((double)mNetworkStatusExtended.getUplinkFrequency() / 1E6d))
|
||||||
" [" + mNetworkStatusExtended.getReceiveIdentifier() + "-" +
|
.append(" [").append(mNetworkStatusExtended.getReceiveIdentifier()).append("-")
|
||||||
mNetworkStatusExtended.getReceiveChannel() + "]");
|
.append(mNetworkStatusExtended.getReceiveChannel()).append("]\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
if(mSecondaryControlChannels.isEmpty())
|
if(mSecondaryControlChannels.isEmpty())
|
||||||
{
|
{
|
||||||
sb.append("\nSCCH:\tNONE");
|
sb.append("SCCH: NONE\n");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
for(module.decode.p25.message.tsbk.osp.control.SecondaryControlChannelBroadcast
|
for(module.decode.p25.message.tsbk.osp.control.SecondaryControlChannelBroadcast sec : mSecondaryControlChannels)
|
||||||
sec : mSecondaryControlChannels)
|
|
||||||
{
|
{
|
||||||
sb.append("\nSCCH:\tDNLINK " + mFrequencyFormatter.format(
|
sb.append("SCCH DOWNLINK ")
|
||||||
(double)sec.getDownlinkFrequency1() / 1E6d) +
|
.append(mFrequencyFormatter.format((double)sec.getDownlinkFrequency1() / 1E6d))
|
||||||
" [" + sec.getIdentifier1() + "-" + sec.getChannel1() + "]\n");
|
.append(" [").append(sec.getIdentifier1()).append("-").append(sec.getChannel1()).append("] UPLINK ")
|
||||||
sb.append("\tUPLINK " + mFrequencyFormatter.format(
|
.append(mFrequencyFormatter.format((double)sec.getUplinkFrequency1() / 1E6d))
|
||||||
(double)sec.getUplinkFrequency1() / 1E6d) + " [" +
|
.append(" [").append(sec.getIdentifier1()).append("-").append(sec.getChannel1()).append("]");
|
||||||
sec.getIdentifier1() + "-" + sec.getChannel1() + "]\n");
|
|
||||||
|
|
||||||
if(sec.hasChannel2())
|
if(sec.hasChannel2())
|
||||||
{
|
{
|
||||||
sb.append("\nSCCH:\tDNLINK " + mFrequencyFormatter.format(
|
sb.append(" SCCH 2 DOWNLINK ")
|
||||||
(double)sec.getDownlinkFrequency2() / 1E6d) +
|
.append(mFrequencyFormatter.format((double)sec.getDownlinkFrequency2() / 1E6d))
|
||||||
" [" + sec.getIdentifier2() + "-" + sec.getChannel2() + "]\n");
|
.append(" [").append(sec.getIdentifier2()).append("-").append(sec.getChannel2())
|
||||||
sb.append("\tUPLINK " + mFrequencyFormatter.format(
|
.append("] UPLINK ").append(mFrequencyFormatter.format((double)sec.getUplinkFrequency2() / 1E6d))
|
||||||
(double)sec.getUplinkFrequency2() / 1E6d) + " [" +
|
.append(" [").append(sec.getIdentifier2()).append("-").append(sec.getChannel2()).append("]");
|
||||||
sec.getIdentifier2() + "-" + sec.getChannel2() + "]");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sb.append("\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if(mSNDCPDataChannel != null)
|
if(mSNDCPDataChannel != null)
|
||||||
{
|
{
|
||||||
sb.append("\nSNDCP:");
|
sb.append("SNDCP DOWNLINK ")
|
||||||
sb.append("\tDNLINK " + mFrequencyFormatter.format(
|
.append(mFrequencyFormatter.format((double)mSNDCPDataChannel.getDownlinkFrequency() / 1E6D))
|
||||||
(double)mSNDCPDataChannel.getDownlinkFrequency() / 1E6D) +
|
.append(" [").append(mSNDCPDataChannel.getTransmitChannel()).append("]").append(" UPLINK ")
|
||||||
" [" + mSNDCPDataChannel.getTransmitChannel() + "]");
|
.append(mFrequencyFormatter.format((double)mSNDCPDataChannel.getUplinkFrequency() / 1E6D))
|
||||||
sb.append("\tUPLINK " + mFrequencyFormatter.format(
|
.append(" [").append(mSNDCPDataChannel.getReceiveChannel()).append("]\n");
|
||||||
(double)mSNDCPDataChannel.getUplinkFrequency() / 1E6D) +
|
|
||||||
" [" + mSNDCPDataChannel.getReceiveChannel() + "]");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if(mProtectionParameterBroadcast != null)
|
if(mProtectionParameterBroadcast != null)
|
||||||
{
|
{
|
||||||
sb.append("\nENCRYPTION:");
|
sb.append(DIVIDER2);
|
||||||
sb.append("\nTYPE:\t" + mProtectionParameterBroadcast
|
sb.append("ENCRYPTION TYPE:").append(mProtectionParameterBroadcast.getEncryptionType().name());
|
||||||
.getEncryptionType().name());
|
sb.append(" ALGORITHM:").append(mProtectionParameterBroadcast.getAlgorithmID());
|
||||||
sb.append("\nALGORITHM:\t" + mProtectionParameterBroadcast
|
sb.append(" KEY:").append(mProtectionParameterBroadcast.getKeyID());
|
||||||
.getAlgorithmID());
|
sb.append(" INBOUND IV:").append(mProtectionParameterBroadcast.getInboundInitializationVector());
|
||||||
sb.append("\nKEY:\t" + mProtectionParameterBroadcast.getKeyID());
|
sb.append(" OUTBOUND IV:").append(mProtectionParameterBroadcast.getOutboundInitializationVector());
|
||||||
sb.append("\nINBOUND IV:\t" + mProtectionParameterBroadcast
|
sb.append("\n");
|
||||||
.getInboundInitializationVector());
|
|
||||||
sb.append("\nOUTBOUND IV:\t" + mProtectionParameterBroadcast
|
|
||||||
.getOutboundInitializationVector());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
List<Integer> identifiers = new ArrayList<>(mBands.keySet());
|
List<Integer> identifiers = new ArrayList<>(mBands.keySet());
|
||||||
|
|
||||||
Collections.sort(identifiers);
|
Collections.sort(identifiers);
|
||||||
|
|
||||||
sb.append("\nFREQUENCY BANDS:");
|
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("\n\t" + id);
|
// 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("\n\n=================== NEIGHBORS ======================");
|
sb.append(DIVIDER2).append("NEIGHBOR SITES: ");
|
||||||
|
|
||||||
if(mNeighborMap.isEmpty())
|
if(mNeighborMap.isEmpty())
|
||||||
{
|
{
|
||||||
sb.append("\n\tNONE\n");
|
sb.append("NONE\n");
|
||||||
sb.append("\n----------------------------------------------------");
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
for(IAdjacentSite neighbor : mNeighborMap.values())
|
for(IAdjacentSite neighbor : mNeighborMap.values())
|
||||||
{
|
{
|
||||||
sb.append("\nNAC:\t" + ((P25Message)neighbor).getNAC());
|
sb.append("\n");
|
||||||
sb.append("\nSYSTEM:\t" + neighbor.getSystemID());
|
sb.append("NAC:").append(((P25Message)neighbor).getNAC());
|
||||||
sb.append("\nLRA:\t" + neighbor.getLRA());
|
sb.append("h SYSTEM:" + neighbor.getSystemID());
|
||||||
|
sb.append("h LRA:" + neighbor.getLRA());
|
||||||
|
|
||||||
String neighborID = neighbor.getRFSS() + "-" + neighbor.getSiteID();
|
String neighborID = neighbor.getRFSS() + "-" + neighbor.getSiteID();
|
||||||
sb.append("\nRFSS-SITE:\t" + neighborID);
|
sb.append("h RFSS-SITE:" + neighborID);
|
||||||
|
|
||||||
|
sb.append("h ");
|
||||||
|
|
||||||
if(hasAliasList())
|
if(hasAliasList())
|
||||||
{
|
{
|
||||||
@@ -3514,18 +3544,16 @@ public class P25DecoderState extends DecoderState
|
|||||||
|
|
||||||
if(siteAlias != null)
|
if(siteAlias != null)
|
||||||
{
|
{
|
||||||
sb.append(" " + siteAlias.getName());
|
sb.append(siteAlias.getName());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
sb.append("\nPCCH:\tDNLINK " + mFrequencyFormatter.format(
|
sb.append("\n PCCH: DOWNLINK ")
|
||||||
(double)neighbor.getDownlinkFrequency() / 1E6d) +
|
.append(mFrequencyFormatter.format((double)neighbor.getDownlinkFrequency() / 1E6d))
|
||||||
" [" + neighbor.getDownlinkChannel() + "]");
|
.append(" [").append(neighbor.getDownlinkChannel()).append("] UPLINK:")
|
||||||
sb.append("\n\tUPLINK:" + mFrequencyFormatter.format(
|
.append(mFrequencyFormatter.format((double)neighbor.getUplinkFrequency() / 1E6d))
|
||||||
(double)neighbor.getUplinkFrequency() / 1E6d) +
|
.append(" [").append(neighbor.getDownlinkChannel()).append("] SERVICES: ")
|
||||||
" [" + neighbor.getDownlinkChannel() + "]\n");
|
.append(neighbor.getSystemServiceClass());
|
||||||
sb.append("\nSERVICES:\t" + neighbor.getSystemServiceClass());
|
|
||||||
sb.append("\n----------------------------------------------------");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,21 @@
|
|||||||
|
/*******************************************************************************
|
||||||
|
* sdrtrunk
|
||||||
|
* Copyright (C) 2014-2017 Dennis Sheirer
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>
|
||||||
|
*
|
||||||
|
******************************************************************************/
|
||||||
package module.decode.p25.message;
|
package module.decode.p25.message;
|
||||||
|
|
||||||
public interface IBandIdentifier
|
public interface IBandIdentifier
|
||||||
@@ -29,4 +47,18 @@ public interface IBandIdentifier
|
|||||||
*/
|
*/
|
||||||
public abstract long getTransmitOffset();
|
public abstract long getTransmitOffset();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Downlink (tower to mobile) Frequency for the specified channel
|
||||||
|
*/
|
||||||
|
public abstract long getDownlinkFrequency(int channelNumber);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Uplink (mobile to tower) Frequency for the specified channel
|
||||||
|
*/
|
||||||
|
public abstract long getUplinkFrequency(int channelNumber);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Indicates if this band is an FDMA (false) or TDMA (true) band
|
||||||
|
*/
|
||||||
|
public boolean isTDMA();
|
||||||
}
|
}
|
||||||
@@ -1,14 +1,32 @@
|
|||||||
|
/*******************************************************************************
|
||||||
|
* sdrtrunk
|
||||||
|
* Copyright (C) 2014-2017 Dennis Sheirer
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>
|
||||||
|
*
|
||||||
|
******************************************************************************/
|
||||||
package module.decode.p25.message;
|
package module.decode.p25.message;
|
||||||
|
|
||||||
import java.text.SimpleDateFormat;
|
|
||||||
|
|
||||||
import map.Plottable;
|
|
||||||
import message.Message;
|
|
||||||
import module.decode.p25.reference.DataUnitID;
|
|
||||||
import alias.Alias;
|
import alias.Alias;
|
||||||
import alias.AliasList;
|
import alias.AliasList;
|
||||||
import bits.BinaryMessage;
|
import bits.BinaryMessage;
|
||||||
import edac.CRC;
|
import edac.CRC;
|
||||||
|
import map.Plottable;
|
||||||
|
import message.Message;
|
||||||
|
import module.decode.p25.reference.DataUnitID;
|
||||||
|
|
||||||
|
import java.text.SimpleDateFormat;
|
||||||
|
|
||||||
public class P25Message extends Message
|
public class P25Message extends Message
|
||||||
{
|
{
|
||||||
@@ -17,12 +35,10 @@ public class P25Message extends Message
|
|||||||
|
|
||||||
public static final int[] NAC = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11};
|
public static final int[] NAC = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11};
|
||||||
public static final int[] DUID = {12, 13, 14, 15};
|
public static final int[] DUID = {12, 13, 14, 15};
|
||||||
public static final int[] BCH = { 16,17,18,19,20,21,22,23,24,25,26,27,28,29,
|
public static final int[] BCH = {16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35,
|
||||||
30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,
|
36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63};
|
||||||
54,55,56,57,58,59,60,61,62,63 };
|
|
||||||
|
|
||||||
protected SimpleDateFormat mTimeDurationFormat =
|
protected SimpleDateFormat mTimeDurationFormat = new SimpleDateFormat("HH:mm:ss.SSS");
|
||||||
new SimpleDateFormat( "HH:mm:ss.SSS");
|
|
||||||
|
|
||||||
protected BinaryMessage mMessage;
|
protected BinaryMessage mMessage;
|
||||||
protected DataUnitID mDUID;
|
protected DataUnitID mDUID;
|
||||||
@@ -30,9 +46,7 @@ public class P25Message extends Message
|
|||||||
|
|
||||||
protected CRC[] mCRC;
|
protected CRC[] mCRC;
|
||||||
|
|
||||||
public P25Message( BinaryMessage message,
|
public P25Message(BinaryMessage message, DataUnitID duid, AliasList aliasList)
|
||||||
DataUnitID duid,
|
|
||||||
AliasList aliasList )
|
|
||||||
{
|
{
|
||||||
super();
|
super();
|
||||||
|
|
||||||
@@ -171,44 +185,4 @@ public class P25Message extends Message
|
|||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Calculates the frequency of the uplink channel using the channel number
|
|
||||||
* and the IdentifierUpdate message.
|
|
||||||
*
|
|
||||||
* @param iden - Identifier Update message
|
|
||||||
* @param channel - channel number
|
|
||||||
* @return - frequency in Hertz
|
|
||||||
*/
|
|
||||||
protected static long calculateUplink( IBandIdentifier iden, int channel )
|
|
||||||
{
|
|
||||||
long downlink = calculateDownlink( iden, channel );
|
|
||||||
|
|
||||||
if( downlink > 0 && iden != null )
|
|
||||||
{
|
|
||||||
return downlink + iden.getTransmitOffset();
|
|
||||||
}
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Calculates the frequency of the downlink channel using the channel number
|
|
||||||
* and the IdentifierUpdate message.
|
|
||||||
*
|
|
||||||
* @param iden - Identifier Update message
|
|
||||||
* @param channel - channel number
|
|
||||||
* @return - frequency in Hertz
|
|
||||||
*/
|
|
||||||
protected static long calculateDownlink( IBandIdentifier iden, int channel )
|
|
||||||
{
|
|
||||||
if( iden != null )
|
|
||||||
{
|
|
||||||
return iden.getBaseFrequency() +
|
|
||||||
( channel * iden.getChannelSpacing() );
|
|
||||||
}
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,3 +1,21 @@
|
|||||||
|
/*******************************************************************************
|
||||||
|
* sdrtrunk
|
||||||
|
* Copyright (C) 2014-2017 Dennis Sheirer
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>
|
||||||
|
*
|
||||||
|
******************************************************************************/
|
||||||
package module.decode.p25.message.ldu.lc;
|
package module.decode.p25.message.ldu.lc;
|
||||||
|
|
||||||
import module.decode.p25.message.IAdjacentSite;
|
import module.decode.p25.message.IAdjacentSite;
|
||||||
@@ -7,19 +25,15 @@ import module.decode.p25.message.ldu.LDU1Message;
|
|||||||
import module.decode.p25.message.tsbk.osp.control.SystemService;
|
import module.decode.p25.message.tsbk.osp.control.SystemService;
|
||||||
import module.decode.p25.reference.LinkControlOpcode;
|
import module.decode.p25.reference.LinkControlOpcode;
|
||||||
|
|
||||||
public class AdjacentSiteStatusBroadcast extends LDU1Message
|
public class AdjacentSiteStatusBroadcast extends LDU1Message implements IdentifierReceiver, IAdjacentSite
|
||||||
implements IdentifierReceiver, IAdjacentSite
|
|
||||||
{
|
{
|
||||||
public static final int[] LRA = {364, 365, 366, 367, 372, 373, 374, 375};
|
public static final int[] LRA = {364, 365, 366, 367, 372, 373, 374, 375};
|
||||||
public static final int[] SYSTEM_ID = { 384,385,386,387,536,537,538,539,540,
|
public static final int[] SYSTEM_ID = {384, 385, 386, 387, 536, 537, 538, 539, 540, 541, 546, 547};
|
||||||
541,546,547 };
|
|
||||||
public static final int[] RFSS_ID = {548, 549, 550, 551, 556, 557, 558, 559};
|
public static final int[] RFSS_ID = {548, 549, 550, 551, 556, 557, 558, 559};
|
||||||
public static final int[] SITE_ID = {560, 561, 566, 567, 568, 569, 570, 571};
|
public static final int[] SITE_ID = {560, 561, 566, 567, 568, 569, 570, 571};
|
||||||
public static final int[] IDENTIFIER = {720, 721, 722, 723};
|
public static final int[] IDENTIFIER = {720, 721, 722, 723};
|
||||||
public static final int[] CHANNEL = { 724,725,730,731,732,733,734,735,740,
|
public static final int[] CHANNEL = {724, 725, 730, 731, 732, 733, 734, 735, 740, 741, 742, 743};
|
||||||
741,742,743 };
|
public static final int[] SYSTEM_SERVICE_CLASS = {744, 745, 750, 751, 752, 753, 754, 755};
|
||||||
public static final int[] SYSTEM_SERVICE_CLASS = { 744,745,750,751,752,753,
|
|
||||||
754,755 };
|
|
||||||
|
|
||||||
private IBandIdentifier mIdentifierUpdate;
|
private IBandIdentifier mIdentifierUpdate;
|
||||||
|
|
||||||
@@ -138,11 +152,21 @@ public class AdjacentSiteStatusBroadcast extends LDU1Message
|
|||||||
|
|
||||||
public long getDownlinkFrequency()
|
public long getDownlinkFrequency()
|
||||||
{
|
{
|
||||||
return calculateDownlink( mIdentifierUpdate, getChannelNumber() );
|
if(mIdentifierUpdate != null)
|
||||||
|
{
|
||||||
|
return mIdentifierUpdate.getDownlinkFrequency(getChannelNumber());
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public long getUplinkFrequency()
|
public long getUplinkFrequency()
|
||||||
{
|
{
|
||||||
return calculateUplink( mIdentifierUpdate, getChannelNumber() );
|
if(mIdentifierUpdate != null)
|
||||||
|
{
|
||||||
|
return mIdentifierUpdate.getUplinkFrequency(getChannelNumber());
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,3 +1,21 @@
|
|||||||
|
/*******************************************************************************
|
||||||
|
* sdrtrunk
|
||||||
|
* Copyright (C) 2014-2017 Dennis Sheirer
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>
|
||||||
|
*
|
||||||
|
******************************************************************************/
|
||||||
package module.decode.p25.message.ldu.lc;
|
package module.decode.p25.message.ldu.lc;
|
||||||
|
|
||||||
import module.decode.p25.message.IAdjacentSite;
|
import module.decode.p25.message.IAdjacentSite;
|
||||||
@@ -6,19 +24,15 @@ import module.decode.p25.message.IdentifierReceiver;
|
|||||||
import module.decode.p25.message.ldu.LDU1Message;
|
import module.decode.p25.message.ldu.LDU1Message;
|
||||||
import module.decode.p25.reference.LinkControlOpcode;
|
import module.decode.p25.reference.LinkControlOpcode;
|
||||||
|
|
||||||
public class AdjacentSiteStatusBroadcastExplicit extends LDU1Message
|
public class AdjacentSiteStatusBroadcastExplicit extends LDU1Message implements IdentifierReceiver, IAdjacentSite
|
||||||
implements IdentifierReceiver, IAdjacentSite
|
|
||||||
{
|
{
|
||||||
public static final int[] LRA = {364, 365, 366, 367, 372, 373, 374, 375};
|
public static final int[] LRA = {364, 365, 366, 367, 372, 373, 374, 375};
|
||||||
public static final int[] TRANSMIT_IDENTIFIER = {376, 377, 382, 383};
|
public static final int[] TRANSMIT_IDENTIFIER = {376, 377, 382, 383};
|
||||||
public static final int[] TRANSMIT_CHANNEL = { 384,385,386,387,536,537,538,
|
public static final int[] TRANSMIT_CHANNEL = {384, 385, 386, 387, 536, 537, 538, 539, 540, 541, 546, 547};
|
||||||
539,540,541,546,547 };
|
|
||||||
public static final int[] RFSS_ID = {548, 549, 550, 551, 556, 557, 558, 559};
|
public static final int[] RFSS_ID = {548, 549, 550, 551, 556, 557, 558, 559};
|
||||||
public static final int[] SITE_ID = {560, 561, 566, 567, 568, 569, 570, 571};
|
public static final int[] SITE_ID = {560, 561, 566, 567, 568, 569, 570, 571};
|
||||||
|
|
||||||
public static final int[] RECEIVE_IDENTIFIER = {720, 721, 722, 723};
|
public static final int[] RECEIVE_IDENTIFIER = {720, 721, 722, 723};
|
||||||
public static final int[] RECEIVE_CHANNEL = { 724,725,730,731,732,733,734,
|
public static final int[] RECEIVE_CHANNEL = {724, 725, 730, 731, 732, 733, 734, 735, 740, 741, 742, 743};
|
||||||
735,740,741,742,743 };
|
|
||||||
|
|
||||||
private IBandIdentifier mTransmitBand;
|
private IBandIdentifier mTransmitBand;
|
||||||
private IBandIdentifier mReceiveBand;
|
private IBandIdentifier mReceiveBand;
|
||||||
@@ -123,12 +137,22 @@ public class AdjacentSiteStatusBroadcastExplicit extends LDU1Message
|
|||||||
|
|
||||||
public long getDownlinkFrequency()
|
public long getDownlinkFrequency()
|
||||||
{
|
{
|
||||||
return calculateDownlink( mTransmitBand, getTransmitChannel() );
|
if(mTransmitBand != null)
|
||||||
|
{
|
||||||
|
return mTransmitBand.getDownlinkFrequency(getTransmitChannel());
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public long getUplinkFrequency()
|
public long getUplinkFrequency()
|
||||||
{
|
{
|
||||||
return calculateUplink( mReceiveBand, getReceiveChannel() );
|
if(mReceiveBand != null)
|
||||||
|
{
|
||||||
|
return mReceiveBand.getUplinkFrequency(getReceiveChannel());
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -1,11 +1,28 @@
|
|||||||
|
/*******************************************************************************
|
||||||
|
* sdrtrunk
|
||||||
|
* Copyright (C) 2014-2017 Dennis Sheirer
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>
|
||||||
|
*
|
||||||
|
******************************************************************************/
|
||||||
package module.decode.p25.message.ldu.lc;
|
package module.decode.p25.message.ldu.lc;
|
||||||
|
|
||||||
import module.decode.p25.message.IBandIdentifier;
|
import module.decode.p25.message.IBandIdentifier;
|
||||||
import module.decode.p25.message.ldu.LDU1Message;
|
import module.decode.p25.message.ldu.LDU1Message;
|
||||||
import module.decode.p25.reference.LinkControlOpcode;
|
import module.decode.p25.reference.LinkControlOpcode;
|
||||||
|
|
||||||
public class ChannelIdentifierUpdate extends LDU1Message
|
public class ChannelIdentifierUpdate extends LDU1Message implements IBandIdentifier
|
||||||
implements IBandIdentifier
|
|
||||||
{
|
{
|
||||||
public static final int[] IDENTIFIER = {364, 365, 366, 367};
|
public static final int[] IDENTIFIER = {364, 365, 366, 367};
|
||||||
public static final int[] BANDWIDTH = {372, 373, 374, 375, 376, 377, 382, 383, 384};
|
public static final int[] BANDWIDTH = {372, 373, 374, 375, 376, 377, 382, 383, 384};
|
||||||
@@ -80,4 +97,22 @@ public class ChannelIdentifierUpdate extends LDU1Message
|
|||||||
{
|
{
|
||||||
return -1 * mMessage.getLong(TRANSMIT_OFFSET) * 250000l;
|
return -1 * mMessage.getLong(TRANSMIT_OFFSET) * 250000l;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public long getDownlinkFrequency(int channelNumber)
|
||||||
|
{
|
||||||
|
return getBaseFrequency() + (channelNumber * getChannelSpacing());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public long getUplinkFrequency(int channelNumber)
|
||||||
|
{
|
||||||
|
return getDownlinkFrequency(channelNumber) + getTransmitOffset();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isTDMA()
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,8 +4,7 @@ import module.decode.p25.message.IBandIdentifier;
|
|||||||
import module.decode.p25.message.ldu.LDU1Message;
|
import module.decode.p25.message.ldu.LDU1Message;
|
||||||
import module.decode.p25.reference.LinkControlOpcode;
|
import module.decode.p25.reference.LinkControlOpcode;
|
||||||
|
|
||||||
public class ChannelIdentifierUpdateExplicit extends LDU1Message
|
public class ChannelIdentifierUpdateExplicit extends LDU1Message implements IBandIdentifier
|
||||||
implements IBandIdentifier
|
|
||||||
{
|
{
|
||||||
public static final int[] IDENTIFIER = { 364,365,366,367 };
|
public static final int[] IDENTIFIER = { 364,365,366,367 };
|
||||||
public static final int[] BANDWIDTH = { 372,373,374,375 };
|
public static final int[] BANDWIDTH = { 372,373,374,375 };
|
||||||
@@ -80,4 +79,22 @@ public class ChannelIdentifierUpdateExplicit extends LDU1Message
|
|||||||
{
|
{
|
||||||
return -1 * mMessage.getLong( TRANSMIT_OFFSET ) * 250000l;
|
return -1 * mMessage.getLong( TRANSMIT_OFFSET ) * 250000l;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public long getDownlinkFrequency(int channelNumber)
|
||||||
|
{
|
||||||
|
return getBaseFrequency() + ( channelNumber * getChannelSpacing() );
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public long getUplinkFrequency(int channelNumber)
|
||||||
|
{
|
||||||
|
return getDownlinkFrequency(channelNumber) + getTransmitOffset();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isTDMA()
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,3 +1,21 @@
|
|||||||
|
/*******************************************************************************
|
||||||
|
* sdrtrunk
|
||||||
|
* Copyright (C) 2014-2017 Dennis Sheirer
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>
|
||||||
|
*
|
||||||
|
******************************************************************************/
|
||||||
package module.decode.p25.message.ldu.lc;
|
package module.decode.p25.message.ldu.lc;
|
||||||
|
|
||||||
import module.decode.p25.message.IBandIdentifier;
|
import module.decode.p25.message.IBandIdentifier;
|
||||||
@@ -5,25 +23,16 @@ import module.decode.p25.message.IdentifierReceiver;
|
|||||||
import module.decode.p25.message.ldu.LDU1Message;
|
import module.decode.p25.message.ldu.LDU1Message;
|
||||||
import module.decode.p25.reference.LinkControlOpcode;
|
import module.decode.p25.reference.LinkControlOpcode;
|
||||||
|
|
||||||
import org.slf4j.Logger;
|
public class GroupVoiceChannelUpdate extends LDU1Message implements IdentifierReceiver
|
||||||
import org.slf4j.LoggerFactory;
|
|
||||||
|
|
||||||
public class GroupVoiceChannelUpdate extends LDU1Message
|
|
||||||
implements IdentifierReceiver
|
|
||||||
{
|
{
|
||||||
private final static Logger mLog =
|
|
||||||
LoggerFactory.getLogger( GroupVoiceChannelUpdate.class );
|
|
||||||
|
|
||||||
public static final int[] IDENTIFIER_A = {364, 365, 366, 367};
|
public static final int[] IDENTIFIER_A = {364, 365, 366, 367};
|
||||||
public static final int[] CHANNEL_A = { 372,373,374,375,376,377,382,383,384,
|
public static final int[] CHANNEL_A = {372, 373, 374, 375, 376, 377, 382, 383, 384, 385, 386, 387};
|
||||||
385,386,387 };
|
public static final int[] GROUP_ADDRESS_A = {536, 537, 538, 539, 540, 541, 546, 547, 548, 549, 550, 551, 556, 557,
|
||||||
public static final int[] GROUP_ADDRESS_A = { 536,537,538,539,540,541,546,
|
558, 559};
|
||||||
547,548,549,550,551,556,557,558,559 };
|
|
||||||
public static final int[] IDENTIFIER_B = {560, 561, 566, 567};
|
public static final int[] IDENTIFIER_B = {560, 561, 566, 567};
|
||||||
public static final int[] CHANNEL_B = { 568,569,570,571,720,721,722,723,724,
|
public static final int[] CHANNEL_B = {568, 569, 570, 571, 720, 721, 722, 723, 724, 725, 730, 731};
|
||||||
725,730,731 };
|
public static final int[] GROUP_ADDRESS_B = {732, 733, 734, 735, 740, 741, 742, 743, 744, 745, 750, 751, 752, 753,
|
||||||
public static final int[] GROUP_ADDRESS_B = { 732,733,734,735,740,741,742,
|
754, 755};
|
||||||
743,744,745,750,751,752,753,754,755 };
|
|
||||||
|
|
||||||
private IBandIdentifier mIdentifierUpdateA;
|
private IBandIdentifier mIdentifierUpdateA;
|
||||||
private IBandIdentifier mIdentifierUpdateB;
|
private IBandIdentifier mIdentifierUpdateB;
|
||||||
@@ -140,21 +149,41 @@ public class GroupVoiceChannelUpdate extends LDU1Message
|
|||||||
|
|
||||||
public long getDownlinkFrequencyA()
|
public long getDownlinkFrequencyA()
|
||||||
{
|
{
|
||||||
return calculateDownlink( mIdentifierUpdateA, getChannelNumberA() );
|
if(mIdentifierUpdateA != null)
|
||||||
|
{
|
||||||
|
return mIdentifierUpdateA.getDownlinkFrequency(getChannelNumberA());
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public long getUplinkFrequencyA()
|
public long getUplinkFrequencyA()
|
||||||
{
|
{
|
||||||
return calculateUplink( mIdentifierUpdateA, getChannelNumberA() );
|
if(mIdentifierUpdateA != null)
|
||||||
|
{
|
||||||
|
return mIdentifierUpdateA.getUplinkFrequency(getChannelNumberA());
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public long getDownlinkFrequencyB()
|
public long getDownlinkFrequencyB()
|
||||||
{
|
{
|
||||||
return calculateDownlink( mIdentifierUpdateB, getChannelNumberA() );
|
if(mIdentifierUpdateB != null)
|
||||||
|
{
|
||||||
|
return mIdentifierUpdateB.getDownlinkFrequency(getChannelNumberB());
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public long getUplinkFrequencyB()
|
public long getUplinkFrequencyB()
|
||||||
{
|
{
|
||||||
return calculateUplink( mIdentifierUpdateB, getChannelNumberA() );
|
if(mIdentifierUpdateB != null)
|
||||||
|
{
|
||||||
|
return mIdentifierUpdateB.getUplinkFrequency(getChannelNumberB());
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,3 +1,21 @@
|
|||||||
|
/*******************************************************************************
|
||||||
|
* sdrtrunk
|
||||||
|
* Copyright (C) 2014-2017 Dennis Sheirer
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>
|
||||||
|
*
|
||||||
|
******************************************************************************/
|
||||||
package module.decode.p25.message.ldu.lc;
|
package module.decode.p25.message.ldu.lc;
|
||||||
|
|
||||||
import module.decode.p25.message.IBandIdentifier;
|
import module.decode.p25.message.IBandIdentifier;
|
||||||
@@ -5,27 +23,17 @@ import module.decode.p25.message.IdentifierReceiver;
|
|||||||
import module.decode.p25.message.ldu.LDU1Message;
|
import module.decode.p25.message.ldu.LDU1Message;
|
||||||
import module.decode.p25.reference.LinkControlOpcode;
|
import module.decode.p25.reference.LinkControlOpcode;
|
||||||
|
|
||||||
import org.slf4j.Logger;
|
public class GroupVoiceChannelUpdateExplicit extends LDU1Message implements IdentifierReceiver
|
||||||
import org.slf4j.LoggerFactory;
|
|
||||||
|
|
||||||
public class GroupVoiceChannelUpdateExplicit extends LDU1Message
|
|
||||||
implements IdentifierReceiver
|
|
||||||
{
|
{
|
||||||
private final static Logger mLog =
|
|
||||||
LoggerFactory.getLogger( GroupVoiceChannelUpdateExplicit.class );
|
|
||||||
|
|
||||||
public static final int EMERGENCY_FLAG = 376;
|
public static final int EMERGENCY_FLAG = 376;
|
||||||
public static final int ENCRYPTED_CHANNEL_FLAG = 377;
|
public static final int ENCRYPTED_CHANNEL_FLAG = 377;
|
||||||
public static final int DUPLEX_MODE = 382;
|
public static final int DUPLEX_MODE = 382;
|
||||||
public static final int SESSION_MODE = 383;
|
public static final int SESSION_MODE = 383;
|
||||||
public static final int[] GROUP_ADDRESS = { 536,537,538,539,540,541,546,547,
|
public static final int[] GROUP_ADDRESS = {536, 537, 538, 539, 540, 541, 546, 547, 548, 549, 550, 551, 556, 557, 558, 559};
|
||||||
548,549,550,551,556,557,558,559 };
|
|
||||||
public static final int[] TRANSMIT_IDENTIFIER = {560, 561, 566, 567};
|
public static final int[] TRANSMIT_IDENTIFIER = {560, 561, 566, 567};
|
||||||
public static final int[] TRANSMIT_CHANNEL = { 568,569,570,571,720,721,722,
|
public static final int[] TRANSMIT_CHANNEL = {568, 569, 570, 571, 720, 721, 722, 723, 724, 725, 730, 731};
|
||||||
723,724,725,730,731 };
|
|
||||||
public static final int[] RECEIVE_IDENTIFIER = {732, 733, 734, 735};
|
public static final int[] RECEIVE_IDENTIFIER = {732, 733, 734, 735};
|
||||||
public static final int[] RECEIVE_CHANNEL = { 740,741,742,743,744,745,750,
|
public static final int[] RECEIVE_CHANNEL = {740, 741, 742, 743, 744, 745, 750, 751, 752, 753, 754, 755};
|
||||||
751,752,753,754,755 };
|
|
||||||
|
|
||||||
private IBandIdentifier mTransmitIdentifierUpdate;
|
private IBandIdentifier mTransmitIdentifierUpdate;
|
||||||
private IBandIdentifier mReceiveIdentifierUpdate;
|
private IBandIdentifier mReceiveIdentifierUpdate;
|
||||||
@@ -143,13 +151,21 @@ public class GroupVoiceChannelUpdateExplicit extends LDU1Message
|
|||||||
|
|
||||||
public long getDownlinkFrequency()
|
public long getDownlinkFrequency()
|
||||||
{
|
{
|
||||||
return calculateDownlink( mTransmitIdentifierUpdate,
|
if(mTransmitIdentifierUpdate != null)
|
||||||
getTransmitChannelNumber() );
|
{
|
||||||
|
return mTransmitIdentifierUpdate.getDownlinkFrequency(getTransmitChannelNumber());
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public long getUplinkFrequency()
|
public long getUplinkFrequency()
|
||||||
{
|
{
|
||||||
return calculateUplink( mReceiveIdentifierUpdate,
|
if(mReceiveIdentifierUpdate != null)
|
||||||
getReceiveChannelNumber() );
|
{
|
||||||
|
return mReceiveIdentifierUpdate.getUplinkFrequency(getReceiveChannelNumber());
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,3 +1,21 @@
|
|||||||
|
/*******************************************************************************
|
||||||
|
* sdrtrunk
|
||||||
|
* Copyright (C) 2014-2017 Dennis Sheirer
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>
|
||||||
|
*
|
||||||
|
******************************************************************************/
|
||||||
package module.decode.p25.message.ldu.lc;
|
package module.decode.p25.message.ldu.lc;
|
||||||
|
|
||||||
import module.decode.p25.message.IBandIdentifier;
|
import module.decode.p25.message.IBandIdentifier;
|
||||||
@@ -6,23 +24,14 @@ import module.decode.p25.message.ldu.LDU1Message;
|
|||||||
import module.decode.p25.reference.LinkControlOpcode;
|
import module.decode.p25.reference.LinkControlOpcode;
|
||||||
import module.decode.p25.reference.Service;
|
import module.decode.p25.reference.Service;
|
||||||
|
|
||||||
import org.slf4j.Logger;
|
public class NetworkStatusBroadcast extends LDU1Message implements IdentifierReceiver
|
||||||
import org.slf4j.LoggerFactory;
|
|
||||||
|
|
||||||
public class NetworkStatusBroadcast extends LDU1Message
|
|
||||||
implements IdentifierReceiver
|
|
||||||
{
|
{
|
||||||
private final static Logger mLog =
|
public static final int[] NETWORK_ID = {376, 377, 382, 383, 384, 385, 386, 387, 536, 537, 538, 539, 540, 541, 546,
|
||||||
LoggerFactory.getLogger( NetworkStatusBroadcast.class );
|
547, 548, 549, 550, 551};
|
||||||
public static final int[] NETWORK_ID = { 376,377,382,383,384,385,386,387,
|
public static final int[] SYSTEM_ID = {556, 557, 558, 559, 560, 561, 566, 567, 568, 569, 570, 571};
|
||||||
536,537,538,539,540,541,546,547,548,549,550,551 };
|
|
||||||
public static final int[] SYSTEM_ID = { 556,557,558,559,560,561,566,567,568,
|
|
||||||
569,570,571 };
|
|
||||||
public static final int[] IDENTIFIER = {720, 721, 722, 723};
|
public static final int[] IDENTIFIER = {720, 721, 722, 723};
|
||||||
public static final int[] CHANNEL = { 724,725,730,731,732,733,734,735,740,
|
public static final int[] CHANNEL = {724, 725, 730, 731, 732, 733, 734, 735, 740, 741, 742, 743};
|
||||||
741,742,743 };
|
public static final int[] SYSTEM_SERVICE_CLASS = {744, 745, 750, 751, 752, 753, 754, 755};
|
||||||
public static final int[] SYSTEM_SERVICE_CLASS = { 744,745,750,751,752,753,
|
|
||||||
754,755 };
|
|
||||||
|
|
||||||
private IBandIdentifier mIdentifierUpdate;
|
private IBandIdentifier mIdentifierUpdate;
|
||||||
|
|
||||||
@@ -100,11 +109,21 @@ public class NetworkStatusBroadcast extends LDU1Message
|
|||||||
|
|
||||||
public long getDownlinkFrequency()
|
public long getDownlinkFrequency()
|
||||||
{
|
{
|
||||||
return calculateDownlink( mIdentifierUpdate, getChannelNumber() );
|
if(mIdentifierUpdate != null)
|
||||||
|
{
|
||||||
|
return mIdentifierUpdate.getDownlinkFrequency(getChannelNumber());
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public long getUplinkFrequency()
|
public long getUplinkFrequency()
|
||||||
{
|
{
|
||||||
return calculateUplink( mIdentifierUpdate, getChannelNumber() );
|
if(mIdentifierUpdate != null)
|
||||||
|
{
|
||||||
|
return mIdentifierUpdate.getUplinkFrequency(getChannelNumber());
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,28 +1,39 @@
|
|||||||
|
/*******************************************************************************
|
||||||
|
* sdrtrunk
|
||||||
|
* Copyright (C) 2014-2017 Dennis Sheirer
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>
|
||||||
|
*
|
||||||
|
******************************************************************************/
|
||||||
package module.decode.p25.message.ldu.lc;
|
package module.decode.p25.message.ldu.lc;
|
||||||
|
|
||||||
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.ldu.LDU1Message;
|
import module.decode.p25.message.ldu.LDU1Message;
|
||||||
import module.decode.p25.reference.LinkControlOpcode;
|
import module.decode.p25.reference.LinkControlOpcode;
|
||||||
|
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
public class NetworkStatusBroadcastExplicit extends LDU1Message
|
public class NetworkStatusBroadcastExplicit extends LDU1Message implements IdentifierReceiver
|
||||||
implements IdentifierReceiver
|
|
||||||
{
|
{
|
||||||
private final static Logger mLog =
|
public static final int[] NETWORK_ID = {364, 365, 366, 367, 372, 373, 374, 375, 376, 377, 382, 383, 384, 385, 386,
|
||||||
LoggerFactory.getLogger( NetworkStatusBroadcastExplicit.class );
|
387, 536, 537, 538, 539};
|
||||||
public static final int[] NETWORK_ID = { 364,365,366,367,372,373,374,375,
|
public static final int[] SYSTEM_ID = {540, 541, 546, 547, 548, 549, 550, 551, 556, 557, 558, 559};
|
||||||
376,377,382,383,384,385,386,387,536,537,538,539 };
|
|
||||||
public static final int[] SYSTEM_ID = { 540,541,546,547,548,549,550,551,556,
|
|
||||||
557,558,559 };
|
|
||||||
public static final int[] TRANSMIT_IDENTIFIER = {560, 561, 566, 567};
|
public static final int[] TRANSMIT_IDENTIFIER = {560, 561, 566, 567};
|
||||||
public static final int[] TRANSMIT_CHANNEL = { 568,569,570,571,720,721,722,
|
public static final int[] TRANSMIT_CHANNEL = {568, 569, 570, 571, 720, 721, 722, 723, 724, 725, 730, 731};
|
||||||
723,724,725,730,731 };
|
|
||||||
public static final int[] RECEIVE_IDENTIFIER = {732, 733, 734, 735};
|
public static final int[] RECEIVE_IDENTIFIER = {732, 733, 734, 735};
|
||||||
public static final int[] RECEIVE_CHANNEL = { 740,741,742,743,744,745,750,
|
public static final int[] RECEIVE_CHANNEL = {740, 741, 742, 743, 744, 745, 750, 751, 752, 753, 754, 755};
|
||||||
751,752,753,754,755 };
|
|
||||||
|
|
||||||
private IBandIdentifier mTransmitIdentifierUpdate;
|
private IBandIdentifier mTransmitIdentifierUpdate;
|
||||||
private IBandIdentifier mReceiveIdentifierUpdate;
|
private IBandIdentifier mReceiveIdentifierUpdate;
|
||||||
@@ -119,13 +130,21 @@ public class NetworkStatusBroadcastExplicit extends LDU1Message
|
|||||||
|
|
||||||
public long getDownlinkFrequency()
|
public long getDownlinkFrequency()
|
||||||
{
|
{
|
||||||
return calculateDownlink( mTransmitIdentifierUpdate,
|
if(mTransmitIdentifierUpdate != null)
|
||||||
getTransmitChannelNumber() );
|
{
|
||||||
|
return mTransmitIdentifierUpdate.getDownlinkFrequency(getTransmitChannelNumber());
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public long getUplinkFrequency()
|
public long getUplinkFrequency()
|
||||||
{
|
{
|
||||||
return calculateUplink( mReceiveIdentifierUpdate,
|
if(mReceiveIdentifierUpdate != null)
|
||||||
getReceiveChannelNumber() );
|
{
|
||||||
|
return mReceiveIdentifierUpdate.getUplinkFrequency(getReceiveChannelNumber());
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,3 +1,21 @@
|
|||||||
|
/*******************************************************************************
|
||||||
|
* sdrtrunk
|
||||||
|
* Copyright (C) 2014-2017 Dennis Sheirer
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>
|
||||||
|
*
|
||||||
|
******************************************************************************/
|
||||||
package module.decode.p25.message.ldu.lc;
|
package module.decode.p25.message.ldu.lc;
|
||||||
|
|
||||||
import module.decode.p25.message.IBandIdentifier;
|
import module.decode.p25.message.IBandIdentifier;
|
||||||
@@ -6,25 +24,15 @@ import module.decode.p25.message.ldu.LDU1Message;
|
|||||||
import module.decode.p25.message.tsbk.osp.control.SystemService;
|
import module.decode.p25.message.tsbk.osp.control.SystemService;
|
||||||
import module.decode.p25.reference.LinkControlOpcode;
|
import module.decode.p25.reference.LinkControlOpcode;
|
||||||
|
|
||||||
import org.slf4j.Logger;
|
public class RFSSStatusBroadcast extends LDU1Message implements IdentifierReceiver
|
||||||
import org.slf4j.LoggerFactory;
|
|
||||||
|
|
||||||
public class RFSSStatusBroadcast extends LDU1Message
|
|
||||||
implements IdentifierReceiver
|
|
||||||
{
|
{
|
||||||
private final static Logger mLog =
|
|
||||||
LoggerFactory.getLogger( RFSSStatusBroadcast.class );
|
|
||||||
|
|
||||||
public static final int[] LRA = {364, 365, 366, 367, 372, 373, 374, 375};
|
public static final int[] LRA = {364, 365, 366, 367, 372, 373, 374, 375};
|
||||||
public static final int[] SYSTEM_ID = { 384,385,386,387,536,537,538,539,540,
|
public static final int[] SYSTEM_ID = {384, 385, 386, 387, 536, 537, 538, 539, 540, 541, 546, 547};
|
||||||
541,546,547 };
|
|
||||||
public static final int[] RFSS_ID = {548, 549, 550, 551, 556, 557, 558, 559};
|
public static final int[] RFSS_ID = {548, 549, 550, 551, 556, 557, 558, 559};
|
||||||
public static final int[] SITE_ID = {560, 561, 566, 567, 568, 569, 570, 571};
|
public static final int[] SITE_ID = {560, 561, 566, 567, 568, 569, 570, 571};
|
||||||
public static final int[] IDENTIFIER = {720, 721, 722, 723};
|
public static final int[] IDENTIFIER = {720, 721, 722, 723};
|
||||||
public static final int[] CHANNEL = { 724,725,730,731,732,733,734,735,740,
|
public static final int[] CHANNEL = {724, 725, 730, 731, 732, 733, 734, 735, 740, 741, 742, 743};
|
||||||
741,742,743 };
|
public static final int[] SYSTEM_SERVICE_CLASS = {744, 745, 750, 751, 752, 753, 754, 755};
|
||||||
public static final int[] SYSTEM_SERVICE_CLASS = { 744,745,750,751,752,753,
|
|
||||||
754,755 };
|
|
||||||
|
|
||||||
private IBandIdentifier mIdentifierUpdate;
|
private IBandIdentifier mIdentifierUpdate;
|
||||||
|
|
||||||
@@ -119,12 +127,21 @@ public class RFSSStatusBroadcast extends LDU1Message
|
|||||||
|
|
||||||
public long getDownlinkFrequency()
|
public long getDownlinkFrequency()
|
||||||
{
|
{
|
||||||
return calculateDownlink( mIdentifierUpdate, getChannelNumber() );
|
if(mIdentifierUpdate != null)
|
||||||
|
{
|
||||||
|
return mIdentifierUpdate.getDownlinkFrequency(getChannelNumber());
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public long getUplinkFrequency()
|
public long getUplinkFrequency()
|
||||||
{
|
{
|
||||||
return calculateUplink( mIdentifierUpdate, getChannelNumber() );
|
if(mIdentifierUpdate != null)
|
||||||
|
{
|
||||||
|
return mIdentifierUpdate.getUplinkFrequency(getChannelNumber());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,3 +1,21 @@
|
|||||||
|
/*******************************************************************************
|
||||||
|
* sdrtrunk
|
||||||
|
* Copyright (C) 2014-2017 Dennis Sheirer
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>
|
||||||
|
*
|
||||||
|
******************************************************************************/
|
||||||
package module.decode.p25.message.ldu.lc;
|
package module.decode.p25.message.ldu.lc;
|
||||||
|
|
||||||
import module.decode.p25.message.IBandIdentifier;
|
import module.decode.p25.message.IBandIdentifier;
|
||||||
@@ -5,25 +23,18 @@ import module.decode.p25.message.IdentifierReceiver;
|
|||||||
import module.decode.p25.message.ldu.LDU1Message;
|
import module.decode.p25.message.ldu.LDU1Message;
|
||||||
import module.decode.p25.message.tsbk.osp.control.SystemService;
|
import module.decode.p25.message.tsbk.osp.control.SystemService;
|
||||||
import module.decode.p25.reference.LinkControlOpcode;
|
import module.decode.p25.reference.LinkControlOpcode;
|
||||||
|
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
public class RFSSStatusBroadcastExplicit extends LDU1Message
|
public class RFSSStatusBroadcastExplicit extends LDU1Message implements IdentifierReceiver
|
||||||
implements IdentifierReceiver
|
|
||||||
{
|
{
|
||||||
private final static Logger mLog =
|
|
||||||
LoggerFactory.getLogger( RFSSStatusBroadcastExplicit.class );
|
|
||||||
|
|
||||||
public static final int[] LRA = {364, 365, 366, 367, 372, 373, 374, 375};
|
public static final int[] LRA = {364, 365, 366, 367, 372, 373, 374, 375};
|
||||||
public static final int[] RECEIVE_IDENTIFIER = {376, 377, 382, 383};
|
public static final int[] RECEIVE_IDENTIFIER = {376, 377, 382, 383};
|
||||||
public static final int[] RECEIVE_CHANNEL = { 384,385,386,387,536,537,538,
|
public static final int[] RECEIVE_CHANNEL = {384, 385, 386, 387, 536, 537, 538, 539, 540, 541, 546, 547};
|
||||||
539,540,541,546,547 };
|
|
||||||
public static final int[] RFSS_ID = {548, 549, 550, 551, 556, 557, 558, 559};
|
public static final int[] RFSS_ID = {548, 549, 550, 551, 556, 557, 558, 559};
|
||||||
public static final int[] SITE_ID = {560, 561, 566, 567, 568, 569, 570, 571};
|
public static final int[] SITE_ID = {560, 561, 566, 567, 568, 569, 570, 571};
|
||||||
public static final int[] TRANSMIT_IDENTIFIER = {720, 721, 722, 723};
|
public static final int[] TRANSMIT_IDENTIFIER = {720, 721, 722, 723};
|
||||||
public static final int[] TRANSMIT_CHANNEL = { 724,725,730,731,732,733,734,
|
public static final int[] TRANSMIT_CHANNEL = {724, 725, 730, 731, 732, 733, 734, 735, 740, 741, 742, 743};
|
||||||
735,740,741,742,743 };
|
|
||||||
public static final int[] SYSTEM_SERVICE_CLASS = {744, 745, 750, 751, 752, 753, 754, 755};
|
public static final int[] SYSTEM_SERVICE_CLASS = {744, 745, 750, 751, 752, 753, 754, 755};
|
||||||
|
|
||||||
private IBandIdentifier mTransmitIdentifierUpdate;
|
private IBandIdentifier mTransmitIdentifierUpdate;
|
||||||
@@ -139,12 +150,21 @@ public class RFSSStatusBroadcastExplicit extends LDU1Message
|
|||||||
|
|
||||||
public long getDownlinkFrequency()
|
public long getDownlinkFrequency()
|
||||||
{
|
{
|
||||||
return calculateDownlink( mTransmitIdentifierUpdate, getTransmitChannelNumber() );
|
if(mTransmitIdentifierUpdate != null)
|
||||||
|
{
|
||||||
|
return mTransmitIdentifierUpdate.getDownlinkFrequency(getTransmitChannelNumber());
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public long getUplinkFrequency()
|
public long getUplinkFrequency()
|
||||||
{
|
{
|
||||||
return calculateUplink( mReceiveIdentifierUpdate, getReceiveChannelNumber() );
|
if(mReceiveIdentifierUpdate != null)
|
||||||
|
{
|
||||||
|
return mReceiveIdentifierUpdate.getUplinkFrequency(getReceiveChannelNumber());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,3 +1,21 @@
|
|||||||
|
/*******************************************************************************
|
||||||
|
* sdrtrunk
|
||||||
|
* Copyright (C) 2014-2017 Dennis Sheirer
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>
|
||||||
|
*
|
||||||
|
******************************************************************************/
|
||||||
package module.decode.p25.message.ldu.lc;
|
package module.decode.p25.message.ldu.lc;
|
||||||
|
|
||||||
import module.decode.p25.message.IBandIdentifier;
|
import module.decode.p25.message.IBandIdentifier;
|
||||||
@@ -6,24 +24,15 @@ import module.decode.p25.message.ldu.LDU1Message;
|
|||||||
import module.decode.p25.message.tsbk.osp.control.SystemService;
|
import module.decode.p25.message.tsbk.osp.control.SystemService;
|
||||||
import module.decode.p25.reference.LinkControlOpcode;
|
import module.decode.p25.reference.LinkControlOpcode;
|
||||||
|
|
||||||
import org.slf4j.Logger;
|
public class SecondaryControlChannelBroadcast extends LDU1Message implements IdentifierReceiver
|
||||||
import org.slf4j.LoggerFactory;
|
|
||||||
|
|
||||||
public class SecondaryControlChannelBroadcast extends LDU1Message
|
|
||||||
implements IdentifierReceiver
|
|
||||||
{
|
{
|
||||||
private final static Logger mLog =
|
|
||||||
LoggerFactory.getLogger( SecondaryControlChannelBroadcast.class );
|
|
||||||
|
|
||||||
public static final int[] RFSS_ID = {364, 365, 366, 367, 372, 373, 374, 375};
|
public static final int[] RFSS_ID = {364, 365, 366, 367, 372, 373, 374, 375};
|
||||||
public static final int[] SITE_ID = {376, 377, 382, 383, 384, 385, 386, 387};
|
public static final int[] SITE_ID = {376, 377, 382, 383, 384, 385, 386, 387};
|
||||||
public static final int[] IDENTIFIER_A = {536, 537, 538, 539};
|
public static final int[] IDENTIFIER_A = {536, 537, 538, 539};
|
||||||
public static final int[] CHANNEL_A = { 540,541,546,547,548,549,550,551,
|
public static final int[] CHANNEL_A = {540, 541, 546, 547, 548, 549, 550, 551, 556, 557, 558, 559};
|
||||||
556,557,558,559 };
|
|
||||||
public static final int[] SYSTEM_SERVICE_CLASS_A = {560, 561, 566, 567, 568, 569, 570, 571};
|
public static final int[] SYSTEM_SERVICE_CLASS_A = {560, 561, 566, 567, 568, 569, 570, 571};
|
||||||
public static final int[] IDENTIFIER_B = {720, 721, 722, 723};
|
public static final int[] IDENTIFIER_B = {720, 721, 722, 723};
|
||||||
public static final int[] CHANNEL_B = { 724,725,730,731,732,733,734,735,740,
|
public static final int[] CHANNEL_B = {724, 725, 730, 731, 732, 733, 734, 735, 740, 741, 742, 743};
|
||||||
741,742,743 };
|
|
||||||
public static final int[] SYSTEM_SERVICE_CLASS_B = {744, 745, 750, 751, 752, 753, 754, 755};
|
public static final int[] SYSTEM_SERVICE_CLASS_B = {744, 745, 750, 751, 752, 753, 754, 755};
|
||||||
|
|
||||||
private IBandIdentifier mIdentifierProviderA;
|
private IBandIdentifier mIdentifierProviderA;
|
||||||
@@ -136,21 +145,41 @@ public class SecondaryControlChannelBroadcast extends LDU1Message
|
|||||||
|
|
||||||
public long getDownlinkFrequencyA()
|
public long getDownlinkFrequencyA()
|
||||||
{
|
{
|
||||||
return calculateDownlink( mIdentifierProviderA, getChannelA() );
|
if(mIdentifierProviderA != null)
|
||||||
|
{
|
||||||
|
return mIdentifierProviderA.getDownlinkFrequency(getChannelA());
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public long getUplinkFrequencyA()
|
public long getUplinkFrequencyA()
|
||||||
{
|
{
|
||||||
return calculateUplink( mIdentifierProviderA, getChannelA() );
|
if(mIdentifierProviderA != null)
|
||||||
|
{
|
||||||
|
return mIdentifierProviderA.getUplinkFrequency(getChannelA());
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public long getDownlinkFrequencyB()
|
public long getDownlinkFrequencyB()
|
||||||
{
|
{
|
||||||
return calculateDownlink( mIdentifierProviderB, getChannelB() );
|
if(mIdentifierProviderB != null)
|
||||||
|
{
|
||||||
|
return mIdentifierProviderB.getDownlinkFrequency(getChannelB());
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public long getUplinkFrequencyB()
|
public long getUplinkFrequencyB()
|
||||||
{
|
{
|
||||||
return calculateUplink( mIdentifierProviderB, getChannelB() );
|
if(mIdentifierProviderB != null)
|
||||||
|
{
|
||||||
|
return mIdentifierProviderB.getUplinkFrequency(getChannelB());
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,3 +1,21 @@
|
|||||||
|
/*******************************************************************************
|
||||||
|
* sdrtrunk
|
||||||
|
* Copyright (C) 2014-2017 Dennis Sheirer
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>
|
||||||
|
*
|
||||||
|
******************************************************************************/
|
||||||
package module.decode.p25.message.ldu.lc;
|
package module.decode.p25.message.ldu.lc;
|
||||||
|
|
||||||
import module.decode.p25.message.IBandIdentifier;
|
import module.decode.p25.message.IBandIdentifier;
|
||||||
@@ -6,25 +24,15 @@ import module.decode.p25.message.ldu.LDU1Message;
|
|||||||
import module.decode.p25.message.tsbk.osp.control.SystemService;
|
import module.decode.p25.message.tsbk.osp.control.SystemService;
|
||||||
import module.decode.p25.reference.LinkControlOpcode;
|
import module.decode.p25.reference.LinkControlOpcode;
|
||||||
|
|
||||||
import org.slf4j.Logger;
|
public class SecondaryControlChannelBroadcastExplicit extends LDU1Message implements IdentifierReceiver
|
||||||
import org.slf4j.LoggerFactory;
|
|
||||||
|
|
||||||
public class SecondaryControlChannelBroadcastExplicit
|
|
||||||
extends LDU1Message implements IdentifierReceiver
|
|
||||||
{
|
{
|
||||||
private final static Logger mLog =
|
|
||||||
LoggerFactory.getLogger( SecondaryControlChannelBroadcastExplicit.class );
|
|
||||||
|
|
||||||
public static final int[] RFSS_ID = {364, 365, 366, 367, 372, 373, 374, 375};
|
public static final int[] RFSS_ID = {364, 365, 366, 367, 372, 373, 374, 375};
|
||||||
public static final int[] SITE_ID = {376, 377, 382, 383, 384, 385, 386, 387};
|
public static final int[] SITE_ID = {376, 377, 382, 383, 384, 385, 386, 387};
|
||||||
public static final int[] TRANSMIT_IDENTIFIER = {536, 537, 538, 539};
|
public static final int[] TRANSMIT_IDENTIFIER = {536, 537, 538, 539};
|
||||||
public static final int[] TRANSMIT_CHANNEL = { 540,541,546,547,548,549,550,
|
public static final int[] TRANSMIT_CHANNEL = {540, 541, 546, 547, 548, 549, 550, 551, 556, 557, 558, 559};
|
||||||
551,556,557,558,559 };
|
|
||||||
public static final int[] RECEIVE_IDENTIFIER = {560, 561, 566, 567};
|
public static final int[] RECEIVE_IDENTIFIER = {560, 561, 566, 567};
|
||||||
public static final int[] RECEIVE_CHANNEL = { 568,569,570,571,720,721,722,
|
public static final int[] RECEIVE_CHANNEL = {568, 569, 570, 571, 720, 721, 722, 723, 724, 725, 730, 731};
|
||||||
723,724,725,730,731 };
|
public static final int[] SYSTEM_SERVICE_CLASS = {732, 733, 734, 735, 740, 741, 742, 743};
|
||||||
public static final int[] SYSTEM_SERVICE_CLASS = { 732,733,734,735,740,741,
|
|
||||||
742,743 };
|
|
||||||
|
|
||||||
private IBandIdentifier mTransmitIdentifierProvider;
|
private IBandIdentifier mTransmitIdentifierProvider;
|
||||||
private IBandIdentifier mReceiveIdentifierProvider;
|
private IBandIdentifier mReceiveIdentifierProvider;
|
||||||
@@ -129,13 +137,21 @@ public class SecondaryControlChannelBroadcastExplicit
|
|||||||
|
|
||||||
public long getDownlinkFrequency()
|
public long getDownlinkFrequency()
|
||||||
{
|
{
|
||||||
return calculateDownlink( mTransmitIdentifierProvider,
|
if(mTransmitIdentifierProvider != null)
|
||||||
getTransmitChannelNumber() );
|
{
|
||||||
|
return mTransmitIdentifierProvider.getDownlinkFrequency(getTransmitChannelNumber());
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public long getUplinkFrequency()
|
public long getUplinkFrequency()
|
||||||
{
|
{
|
||||||
return calculateUplink( mReceiveIdentifierProvider,
|
if(mReceiveIdentifierProvider != null)
|
||||||
getReceiveChannelNumber() );
|
{
|
||||||
|
return mReceiveIdentifierProvider.getUplinkFrequency(getReceiveChannelNumber());
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,14 +1,31 @@
|
|||||||
|
/*******************************************************************************
|
||||||
|
* sdrtrunk
|
||||||
|
* Copyright (C) 2014-2017 Dennis Sheirer
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>
|
||||||
|
*
|
||||||
|
******************************************************************************/
|
||||||
package module.decode.p25.message.pdu;
|
package module.decode.p25.message.pdu;
|
||||||
|
|
||||||
import module.decode.p25.message.IBandIdentifier;
|
|
||||||
import module.decode.p25.message.IdentifierReceiver;
|
|
||||||
import module.decode.p25.reference.DataUnitID;
|
|
||||||
import alias.AliasList;
|
import alias.AliasList;
|
||||||
import bits.BinaryMessage;
|
import bits.BinaryMessage;
|
||||||
import edac.CRCP25;
|
import edac.CRCP25;
|
||||||
|
import module.decode.p25.message.IBandIdentifier;
|
||||||
|
import module.decode.p25.message.IdentifierReceiver;
|
||||||
|
import module.decode.p25.reference.DataUnitID;
|
||||||
|
|
||||||
public abstract class UnitToUnitChannelGrantExtended extends PDUMessage
|
public abstract class UnitToUnitChannelGrantExtended extends PDUMessage implements IdentifierReceiver
|
||||||
implements IdentifierReceiver
|
|
||||||
{
|
{
|
||||||
/* Service Options */
|
/* Service Options */
|
||||||
public static final int EMERGENCY_FLAG = 128;
|
public static final int EMERGENCY_FLAG = 128;
|
||||||
@@ -16,33 +33,27 @@ public abstract class UnitToUnitChannelGrantExtended extends PDUMessage
|
|||||||
public static final int DUPLEX_MODE = 130;
|
public static final int DUPLEX_MODE = 130;
|
||||||
public static final int SESSION_MODE = 131;
|
public static final int SESSION_MODE = 131;
|
||||||
|
|
||||||
public static final int[] SOURCE_ADDRESS = { 88,89,90,91,92,93,94,95,96,97,
|
public static final int[] SOURCE_ADDRESS = {88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104,
|
||||||
98,99,100,101,102,103,104,105,106,107,108,109,110,111 };
|
105, 106, 107, 108, 109, 110, 111};
|
||||||
public static final int[] SERVICE_OPTIONS = { 128,129,130,131,132,133,134,
|
public static final int[] SERVICE_OPTIONS = {128, 129, 130, 131, 132, 133, 134, 135};
|
||||||
135 };
|
public static final int[] SOURCE_WACN = {160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174,
|
||||||
public static final int[] SOURCE_WACN = { 160,161,162,163,164,165,166,167,
|
175, 176, 177, 178, 179};
|
||||||
168,169,170,171,172,173,174,175,176,177,178,179 };
|
public static final int[] SOURCE_SYSTEM_ID = {180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191};
|
||||||
public static final int[] SOURCE_SYSTEM_ID = { 180,181,182,183,184,185,186,
|
public static final int[] SOURCE_ID = {192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206,
|
||||||
187,188,189,190,191 };
|
207, 208, 209, 210, 211, 212, 213, 214, 215};
|
||||||
public static final int[] SOURCE_ID = { 192,193,194,195,196,197,198,199,200,
|
public static final int[] TARGET_ADDRESS = {216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229,
|
||||||
201,202,203,204,205,206,207,208,209,210,211,212,213,214,215 };
|
230, 231, 232, 233, 234, 235, 236, 237, 238, 239};
|
||||||
public static final int[] TARGET_ADDRESS = { 216,217,218,219,220,221,222,
|
|
||||||
223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239 };
|
|
||||||
public static final int[] TRANSMIT_IDENTIFIER = {240, 241, 242, 243};
|
public static final int[] TRANSMIT_IDENTIFIER = {240, 241, 242, 243};
|
||||||
public static final int[] TRANSMIT_NUMBER = { 244,245,246,247,248,249,250,
|
public static final int[] TRANSMIT_NUMBER = {244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255};
|
||||||
251,252,253,254,255 };
|
|
||||||
public static final int[] RECEIVE_IDENTIFIER = {256, 257, 258, 259};
|
public static final int[] RECEIVE_IDENTIFIER = {256, 257, 258, 259};
|
||||||
public static final int[] RECEIVE_NUMBER = { 260,261,262,263,264,265,266,
|
public static final int[] RECEIVE_NUMBER = {260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271};
|
||||||
267,268,269,270,271 };
|
public static final int[] MULTIPLE_BLOCK_CRC = {320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332,
|
||||||
public static final int[] MULTIPLE_BLOCK_CRC = { 320,321,322,323,324,325,
|
333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351};
|
||||||
326,327,328,329,330,331,332,333,334,335,336,337,338,339,340,341,342,
|
|
||||||
343,344,345,346,347,348,349,350,351 };
|
|
||||||
|
|
||||||
private IBandIdentifier mTransmitIdentifierUpdate;
|
private IBandIdentifier mTransmitIdentifierUpdate;
|
||||||
private IBandIdentifier mReceiveIdentifierUpdate;
|
private IBandIdentifier mReceiveIdentifierUpdate;
|
||||||
|
|
||||||
public UnitToUnitChannelGrantExtended( BinaryMessage message,
|
public UnitToUnitChannelGrantExtended(BinaryMessage message, DataUnitID duid, AliasList aliasList)
|
||||||
DataUnitID duid, AliasList aliasList )
|
|
||||||
{
|
{
|
||||||
super(message, duid, aliasList);
|
super(message, duid, aliasList);
|
||||||
|
|
||||||
@@ -165,12 +176,22 @@ public abstract class UnitToUnitChannelGrantExtended extends PDUMessage
|
|||||||
|
|
||||||
public long getDownlinkFrequency()
|
public long getDownlinkFrequency()
|
||||||
{
|
{
|
||||||
return calculateDownlink( mTransmitIdentifierUpdate, getTransmitChannelNumber() );
|
if(mTransmitIdentifierUpdate != null)
|
||||||
|
{
|
||||||
|
return mTransmitIdentifierUpdate.getDownlinkFrequency(getTransmitChannelNumber());
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public long getUplinkFrequency()
|
public long getUplinkFrequency()
|
||||||
{
|
{
|
||||||
return calculateUplink( mReceiveIdentifierUpdate, getReceiveChannelNumber() );
|
if(mReceiveIdentifierUpdate != null)
|
||||||
|
{
|
||||||
|
return mReceiveIdentifierUpdate.getUplinkFrequency(getReceiveChannelNumber());
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -1,5 +1,26 @@
|
|||||||
|
/*******************************************************************************
|
||||||
|
* sdrtrunk
|
||||||
|
* Copyright (C) 2014-2017 Dennis Sheirer
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>
|
||||||
|
*
|
||||||
|
******************************************************************************/
|
||||||
package module.decode.p25.message.pdu.osp.control;
|
package module.decode.p25.message.pdu.osp.control;
|
||||||
|
|
||||||
|
import alias.AliasList;
|
||||||
|
import bits.BinaryMessage;
|
||||||
|
import edac.CRCP25;
|
||||||
import module.decode.p25.message.IAdjacentSite;
|
import module.decode.p25.message.IAdjacentSite;
|
||||||
import module.decode.p25.message.IBandIdentifier;
|
import module.decode.p25.message.IBandIdentifier;
|
||||||
import module.decode.p25.message.IdentifierReceiver;
|
import module.decode.p25.message.IdentifierReceiver;
|
||||||
@@ -7,36 +28,25 @@ import module.decode.p25.message.pdu.PDUMessage;
|
|||||||
import module.decode.p25.message.tsbk.osp.control.SystemService;
|
import module.decode.p25.message.tsbk.osp.control.SystemService;
|
||||||
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 alias.AliasList;
|
|
||||||
import bits.BinaryMessage;
|
|
||||||
import edac.CRCP25;
|
|
||||||
|
|
||||||
public class AdjacentStatusBroadcastExtended extends PDUMessage
|
public class AdjacentStatusBroadcastExtended extends PDUMessage implements IdentifierReceiver, IAdjacentSite
|
||||||
implements IdentifierReceiver, IAdjacentSite
|
|
||||||
{
|
{
|
||||||
public static final int[] LRA = {88, 89, 90, 91, 92, 93, 94, 95};
|
public static final int[] LRA = {88, 89, 90, 91, 92, 93, 94, 95};
|
||||||
public static final int[] SYSTEM_ID = { 100,101,102,103,104,105,106,107,108,
|
public static final int[] SYSTEM_ID = {100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111};
|
||||||
109,110,111 };
|
public static final int[] RF_SUBSYSTEM_ID = {128, 129, 130, 131, 132, 133, 134, 135};
|
||||||
public static final int[] RF_SUBSYSTEM_ID = { 128,129,130,131,132,133,134,
|
|
||||||
135 };
|
|
||||||
public static final int[] SITE_ID = {136, 137, 138, 139, 140, 141, 142, 143};
|
public static final int[] SITE_ID = {136, 137, 138, 139, 140, 141, 142, 143};
|
||||||
public static final int[] TRANSMIT_IDENTIFIER = {160, 161, 162, 163};
|
public static final int[] TRANSMIT_IDENTIFIER = {160, 161, 162, 163};
|
||||||
public static final int[] TRANSMIT_CHANNEL = { 164,165,166,167,168,169,170,
|
public static final int[] TRANSMIT_CHANNEL = {164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175};
|
||||||
171,172,173,174,175 };
|
|
||||||
public static final int[] RECEIVE_IDENTIFIER = {176, 177, 178, 179};
|
public static final int[] RECEIVE_IDENTIFIER = {176, 177, 178, 179};
|
||||||
public static final int[] RECEIVE_CHANNEL = { 180,181,182,183,184,185,186,
|
public static final int[] RECEIVE_CHANNEL = {180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191};
|
||||||
187,188,189,190,191 };
|
public static final int[] SYSTEM_SERVICE_CLASS = {192, 193, 194, 195, 196, 197, 198, 199};
|
||||||
public static final int[] SYSTEM_SERVICE_CLASS = { 192,193,194,195,196,197,
|
public static final int[] MULTIPLE_BLOCK_CRC = {224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236,
|
||||||
198,199 };
|
237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255};
|
||||||
public static final int[] MULTIPLE_BLOCK_CRC = { 224,225,226,227,228,229,
|
|
||||||
230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,
|
|
||||||
248,249,250,251,252,253,254,255 };
|
|
||||||
|
|
||||||
private IBandIdentifier mTransmitIdentifierProvider;
|
private IBandIdentifier mTransmitIdentifierProvider;
|
||||||
private IBandIdentifier mReceiveIdentifierProvider;
|
private IBandIdentifier mReceiveIdentifierProvider;
|
||||||
|
|
||||||
public AdjacentStatusBroadcastExtended( BinaryMessage message,
|
public AdjacentStatusBroadcastExtended(BinaryMessage message, DataUnitID duid, AliasList aliasList)
|
||||||
DataUnitID duid, AliasList aliasList )
|
|
||||||
{
|
{
|
||||||
super(message, duid, aliasList);
|
super(message, duid, aliasList);
|
||||||
|
|
||||||
@@ -124,12 +134,22 @@ public class AdjacentStatusBroadcastExtended extends PDUMessage
|
|||||||
|
|
||||||
public long getDownlinkFrequency()
|
public long getDownlinkFrequency()
|
||||||
{
|
{
|
||||||
return calculateDownlink( mTransmitIdentifierProvider, getTransmitChannel() );
|
if(mTransmitIdentifierProvider != null)
|
||||||
|
{
|
||||||
|
return mTransmitIdentifierProvider.getDownlinkFrequency(getTransmitChannel());
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public long getUplinkFrequency()
|
public long getUplinkFrequency()
|
||||||
{
|
{
|
||||||
return calculateUplink( mReceiveIdentifierProvider, getReceiveChannel() );
|
if(mReceiveIdentifierProvider != null)
|
||||||
|
{
|
||||||
|
return mReceiveIdentifierProvider.getUplinkFrequency(getReceiveChannel());
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -1,5 +1,26 @@
|
|||||||
|
/*******************************************************************************
|
||||||
|
* sdrtrunk
|
||||||
|
* Copyright (C) 2014-2017 Dennis Sheirer
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>
|
||||||
|
*
|
||||||
|
******************************************************************************/
|
||||||
package module.decode.p25.message.pdu.osp.control;
|
package module.decode.p25.message.pdu.osp.control;
|
||||||
|
|
||||||
|
import alias.AliasList;
|
||||||
|
import bits.BinaryMessage;
|
||||||
|
import edac.CRCP25;
|
||||||
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.pdu.PDUMessage;
|
import module.decode.p25.message.pdu.PDUMessage;
|
||||||
@@ -7,35 +28,25 @@ import module.decode.p25.message.tsbk.osp.control.SystemService;
|
|||||||
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 module.decode.p25.reference.P25NetworkCallsign;
|
import module.decode.p25.reference.P25NetworkCallsign;
|
||||||
import alias.AliasList;
|
|
||||||
import bits.BinaryMessage;
|
|
||||||
import edac.CRCP25;
|
|
||||||
|
|
||||||
public class NetworkStatusBroadcastExtended extends PDUMessage
|
public class NetworkStatusBroadcastExtended extends PDUMessage implements IdentifierReceiver
|
||||||
implements IdentifierReceiver
|
|
||||||
{
|
{
|
||||||
public static final int[] LRA = {88, 89, 90, 91, 92, 93, 94, 95};
|
public static final int[] LRA = {88, 89, 90, 91, 92, 93, 94, 95};
|
||||||
public static final int[] SYSTEM_ID = { 100,101,102,103,104,105,106,107,108,
|
public static final int[] SYSTEM_ID = {100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111};
|
||||||
109,110,111 };
|
public static final int[] WACN = {160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175,
|
||||||
public static final int[] WACN = { 160,161,162,163,164,165,166,167,168,169,
|
176, 177, 178, 179};
|
||||||
170,171,172,173,174,175,176,177,178,179 };
|
|
||||||
public static final int[] TRANSMIT_IDENTIFIER = {184, 185, 186, 187};
|
public static final int[] TRANSMIT_IDENTIFIER = {184, 185, 186, 187};
|
||||||
public static final int[] TRANSMIT_CHANNEL = { 188,189,190,191,192,193,194,
|
public static final int[] TRANSMIT_CHANNEL = {188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199};
|
||||||
195,196,197,198,199 };
|
|
||||||
public static final int[] RECEIVE_IDENTIFIER = {200, 201, 202, 203};
|
public static final int[] RECEIVE_IDENTIFIER = {200, 201, 202, 203};
|
||||||
public static final int[] RECEIVE_CHANNEL = { 204,205,206,207,208,209,210,
|
public static final int[] RECEIVE_CHANNEL = {204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215};
|
||||||
211,212,213,214,215 };
|
public static final int[] SYSTEM_SERVICE_CLASS = {216, 217, 218, 219, 220, 221, 222, 223};
|
||||||
public static final int[] SYSTEM_SERVICE_CLASS = { 216,217,218,219,220,221,
|
public static final int[] MULTIPLE_BLOCK_CRC = {224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236,
|
||||||
222,223 };
|
237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255};
|
||||||
public static final int[] MULTIPLE_BLOCK_CRC = { 224,225,226,227,228,229,
|
|
||||||
230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,
|
|
||||||
248,249,250,251,252,253,254,255 };
|
|
||||||
|
|
||||||
private IBandIdentifier mTransmitIdentifierUpdate;
|
private IBandIdentifier mTransmitIdentifierUpdate;
|
||||||
private IBandIdentifier mReceiveIdentifierUpdate;
|
private IBandIdentifier mReceiveIdentifierUpdate;
|
||||||
|
|
||||||
public NetworkStatusBroadcastExtended( BinaryMessage message,
|
public NetworkStatusBroadcastExtended(BinaryMessage message, DataUnitID duid, AliasList aliasList)
|
||||||
DataUnitID duid, AliasList aliasList )
|
|
||||||
{
|
{
|
||||||
super(message, duid, aliasList);
|
super(message, duid, aliasList);
|
||||||
|
|
||||||
@@ -126,12 +137,22 @@ public class NetworkStatusBroadcastExtended extends PDUMessage
|
|||||||
|
|
||||||
public long getDownlinkFrequency()
|
public long getDownlinkFrequency()
|
||||||
{
|
{
|
||||||
return calculateDownlink( mTransmitIdentifierUpdate, getTransmitChannel() );
|
if(mTransmitIdentifierUpdate != null)
|
||||||
|
{
|
||||||
|
return mTransmitIdentifierUpdate.getDownlinkFrequency(getTransmitChannel());
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public long getUplinkFrequency()
|
public long getUplinkFrequency()
|
||||||
{
|
{
|
||||||
return calculateUplink( mReceiveIdentifierUpdate, getReceiveChannel() );
|
if(mReceiveIdentifierUpdate != null)
|
||||||
|
{
|
||||||
|
return mReceiveIdentifierUpdate.getUplinkFrequency(getReceiveChannel());
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -1,41 +1,52 @@
|
|||||||
|
/*******************************************************************************
|
||||||
|
* sdrtrunk
|
||||||
|
* Copyright (C) 2014-2017 Dennis Sheirer
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>
|
||||||
|
*
|
||||||
|
******************************************************************************/
|
||||||
package module.decode.p25.message.pdu.osp.control;
|
package module.decode.p25.message.pdu.osp.control;
|
||||||
|
|
||||||
|
import alias.AliasList;
|
||||||
|
import bits.BinaryMessage;
|
||||||
|
import edac.CRCP25;
|
||||||
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.pdu.PDUMessage;
|
import module.decode.p25.message.pdu.PDUMessage;
|
||||||
import module.decode.p25.message.tsbk.osp.control.SystemService;
|
import module.decode.p25.message.tsbk.osp.control.SystemService;
|
||||||
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 alias.AliasList;
|
|
||||||
import bits.BinaryMessage;
|
|
||||||
import edac.CRCP25;
|
|
||||||
|
|
||||||
public class RFSSStatusBroadcastExtended extends PDUMessage
|
public class RFSSStatusBroadcastExtended extends PDUMessage implements IdentifierReceiver
|
||||||
implements IdentifierReceiver
|
|
||||||
{
|
{
|
||||||
public static final int[] LRA = {88, 89, 90, 91, 92, 93, 94, 95};
|
public static final int[] LRA = {88, 89, 90, 91, 92, 93, 94, 95};
|
||||||
public static final int ACTIVE_NETWORK_CONNECTION_INDICATOR = 99;
|
public static final int ACTIVE_NETWORK_CONNECTION_INDICATOR = 99;
|
||||||
public static final int[] SYSTEM_ID = { 100,101,102,103,104,105,106,107,108,
|
public static final int[] SYSTEM_ID = {100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111};
|
||||||
109,110,111 };
|
|
||||||
public static final int[] RFSS_ID = {160, 161, 162, 163, 164, 165, 166, 167};
|
public static final int[] RFSS_ID = {160, 161, 162, 163, 164, 165, 166, 167};
|
||||||
public static final int[] SITE_ID = {168, 169, 170, 171, 172, 173, 174, 175};
|
public static final int[] SITE_ID = {168, 169, 170, 171, 172, 173, 174, 175};
|
||||||
public static final int[] TRANSMIT_IDENTIFIER = {184, 185, 186, 187};
|
public static final int[] TRANSMIT_IDENTIFIER = {184, 185, 186, 187};
|
||||||
public static final int[] TRANSMIT_CHANNEL = { 188,189,190,191,192,193,194,
|
public static final int[] TRANSMIT_CHANNEL = {188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199};
|
||||||
195,196,197,198,199 };
|
|
||||||
public static final int[] RECEIVE_IDENTIFIER = {200, 201, 202, 203};
|
public static final int[] RECEIVE_IDENTIFIER = {200, 201, 202, 203};
|
||||||
public static final int[] RECEIVE_CHANNEL = { 204,205,206,207,208,209,210,
|
public static final int[] RECEIVE_CHANNEL = {204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215};
|
||||||
211,212,213,214,215 };
|
public static final int[] SYSTEM_SERVICE_CLASS = {216, 217, 218, 219, 220, 221, 222, 223};
|
||||||
public static final int[] SYSTEM_SERVICE_CLASS = { 216,217,218,219,220,221,
|
public static final int[] MULTIPLE_BLOCK_CRC = {224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236,
|
||||||
222,223 };
|
237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255};
|
||||||
public static final int[] MULTIPLE_BLOCK_CRC = { 224,225,226,227,228,229,
|
|
||||||
230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,
|
|
||||||
248,249,250,251,252,253,254,255 };
|
|
||||||
|
|
||||||
private IBandIdentifier mTransmitIdentifierUpdate;
|
private IBandIdentifier mTransmitIdentifierUpdate;
|
||||||
private IBandIdentifier mReceiveIdentifierUpdate;
|
private IBandIdentifier mReceiveIdentifierUpdate;
|
||||||
|
|
||||||
public RFSSStatusBroadcastExtended( BinaryMessage message,
|
public RFSSStatusBroadcastExtended(BinaryMessage message, DataUnitID duid, AliasList aliasList)
|
||||||
DataUnitID duid, AliasList aliasList )
|
|
||||||
{
|
{
|
||||||
super(message, duid, aliasList);
|
super(message, duid, aliasList);
|
||||||
|
|
||||||
@@ -130,12 +141,22 @@ public class RFSSStatusBroadcastExtended extends PDUMessage
|
|||||||
|
|
||||||
public long getDownlinkFrequency()
|
public long getDownlinkFrequency()
|
||||||
{
|
{
|
||||||
return calculateDownlink( mTransmitIdentifierUpdate, getTransmitChannel() );
|
if(mTransmitIdentifierUpdate != null)
|
||||||
|
{
|
||||||
|
return mTransmitIdentifierUpdate.getDownlinkFrequency(getTransmitChannel());
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public long getUplinkFrequency()
|
public long getUplinkFrequency()
|
||||||
{
|
{
|
||||||
return calculateUplink( mReceiveIdentifierUpdate, getReceiveChannel() );
|
if(mReceiveIdentifierUpdate != null)
|
||||||
|
{
|
||||||
|
return mReceiveIdentifierUpdate.getUplinkFrequency(getReceiveChannel());
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -1,16 +1,33 @@
|
|||||||
|
/*******************************************************************************
|
||||||
|
* sdrtrunk
|
||||||
|
* Copyright (C) 2014-2017 Dennis Sheirer
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>
|
||||||
|
*
|
||||||
|
******************************************************************************/
|
||||||
package module.decode.p25.message.pdu.osp.data;
|
package module.decode.p25.message.pdu.osp.data;
|
||||||
|
|
||||||
|
import alias.AliasList;
|
||||||
|
import bits.BinaryMessage;
|
||||||
|
import edac.CRCP25;
|
||||||
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.pdu.PDUMessage;
|
import module.decode.p25.message.pdu.PDUMessage;
|
||||||
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 alias.AliasList;
|
|
||||||
import bits.BinaryMessage;
|
|
||||||
import edac.CRCP25;
|
|
||||||
|
|
||||||
public class GroupDataChannelGrantExtended extends PDUMessage
|
public class GroupDataChannelGrantExtended extends PDUMessage implements IdentifierReceiver
|
||||||
implements IdentifierReceiver
|
|
||||||
{
|
{
|
||||||
/* Service Options */
|
/* Service Options */
|
||||||
public static final int EMERGENCY_FLAG = 128;
|
public static final int EMERGENCY_FLAG = 128;
|
||||||
@@ -18,27 +35,22 @@ public class GroupDataChannelGrantExtended extends PDUMessage
|
|||||||
public static final int DUPLEX_MODE = 130;
|
public static final int DUPLEX_MODE = 130;
|
||||||
public static final int SESSION_MODE = 131;
|
public static final int SESSION_MODE = 131;
|
||||||
|
|
||||||
public static final int[] SOURCE_ADDRESS = { 88,89,90,91,92,93,94,95,96,97,
|
public static final int[] SOURCE_ADDRESS = {88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103,
|
||||||
98,99,100,101,102,103,104,105,106,107,108,109,110,111 };
|
104, 105, 106, 107, 108, 109, 110, 111};
|
||||||
public static final int[] SERVICE_OPTIONS = { 128,129,130,131,132,133,134,
|
public static final int[] SERVICE_OPTIONS = {128, 129, 130, 131, 132, 133, 134, 135};
|
||||||
135 };
|
|
||||||
public static final int[] TRANSMIT_IDENTIFIER = {160, 161, 162, 163};
|
public static final int[] TRANSMIT_IDENTIFIER = {160, 161, 162, 163};
|
||||||
public static final int[] TRANSMIT_NUMBER = { 164,165,166,167,168,169,170,
|
public static final int[] TRANSMIT_NUMBER = {164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175};
|
||||||
171,172,173,174,175 };
|
|
||||||
public static final int[] RECEIVE_IDENTIFIER = {176, 177, 178, 179};
|
public static final int[] RECEIVE_IDENTIFIER = {176, 177, 178, 179};
|
||||||
public static final int[] RECEIVE_NUMBER = { 180,181,182,183,184,185,186,
|
public static final int[] RECEIVE_NUMBER = {180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191};
|
||||||
187,188,189,190,191 };
|
public static final int[] GROUP_ADDRESS = {192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205,
|
||||||
public static final int[] GROUP_ADDRESS = { 192,193,194,195,196,197,198,199,
|
206, 207};
|
||||||
200,201,202,203,204,205,206,207 };
|
public static final int[] MULTIPLE_BLOCK_CRC = {224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236,
|
||||||
public static final int[] MULTIPLE_BLOCK_CRC = { 224,225,226,227,228,229,
|
237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255};
|
||||||
230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,
|
|
||||||
248,249,250,251,252,253,254,255 };
|
|
||||||
|
|
||||||
private IBandIdentifier mTransmitIdentifierUpdate;
|
private IBandIdentifier mTransmitIdentifierUpdate;
|
||||||
private IBandIdentifier mReceiveIdentifierUpdate;
|
private IBandIdentifier mReceiveIdentifierUpdate;
|
||||||
|
|
||||||
public GroupDataChannelGrantExtended( BinaryMessage message,
|
public GroupDataChannelGrantExtended(BinaryMessage message, DataUnitID duid, AliasList aliasList)
|
||||||
DataUnitID duid, AliasList aliasList )
|
|
||||||
{
|
{
|
||||||
super(message, duid, aliasList);
|
super(message, duid, aliasList);
|
||||||
|
|
||||||
@@ -143,12 +155,22 @@ public class GroupDataChannelGrantExtended extends PDUMessage
|
|||||||
|
|
||||||
public long getDownlinkFrequency()
|
public long getDownlinkFrequency()
|
||||||
{
|
{
|
||||||
return calculateDownlink( mTransmitIdentifierUpdate, getTransmitChannelNumber() );
|
if(mTransmitIdentifierUpdate != null)
|
||||||
|
{
|
||||||
|
return mTransmitIdentifierUpdate.getDownlinkFrequency(getTransmitChannelNumber());
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public long getUplinkFrequency()
|
public long getUplinkFrequency()
|
||||||
{
|
{
|
||||||
return calculateUplink( mReceiveIdentifierUpdate, getReceiveChannelNumber() );
|
if(mReceiveIdentifierUpdate != null)
|
||||||
|
{
|
||||||
|
return mReceiveIdentifierUpdate.getUplinkFrequency(getReceiveChannelNumber());
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -1,16 +1,33 @@
|
|||||||
|
/*******************************************************************************
|
||||||
|
* sdrtrunk
|
||||||
|
* Copyright (C) 2014-2017 Dennis Sheirer
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>
|
||||||
|
*
|
||||||
|
******************************************************************************/
|
||||||
package module.decode.p25.message.pdu.osp.voice;
|
package module.decode.p25.message.pdu.osp.voice;
|
||||||
|
|
||||||
|
import alias.AliasList;
|
||||||
|
import bits.BinaryMessage;
|
||||||
|
import edac.CRCP25;
|
||||||
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.pdu.PDUMessage;
|
import module.decode.p25.message.pdu.PDUMessage;
|
||||||
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 alias.AliasList;
|
|
||||||
import bits.BinaryMessage;
|
|
||||||
import edac.CRCP25;
|
|
||||||
|
|
||||||
public class GroupVoiceChannelGrantExplicit extends PDUMessage
|
public class GroupVoiceChannelGrantExplicit extends PDUMessage implements IdentifierReceiver
|
||||||
implements IdentifierReceiver
|
|
||||||
{
|
{
|
||||||
/* Service Options */
|
/* Service Options */
|
||||||
public static final int EMERGENCY_FLAG = 128;
|
public static final int EMERGENCY_FLAG = 128;
|
||||||
@@ -18,27 +35,22 @@ public class GroupVoiceChannelGrantExplicit extends PDUMessage
|
|||||||
public static final int DUPLEX_MODE = 130;
|
public static final int DUPLEX_MODE = 130;
|
||||||
public static final int SESSION_MODE = 131;
|
public static final int SESSION_MODE = 131;
|
||||||
|
|
||||||
public static final int[] SOURCE_ADDRESS = { 88,89,90,91,92,93,94,95,96,97,
|
public static final int[] SOURCE_ADDRESS = {88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104,
|
||||||
98,99,100,101,102,103,104,105,106,107,108,109,110,111 };
|
105, 106, 107, 108, 109, 110, 111};
|
||||||
public static final int[] SERVICE_OPTIONS = { 128,129,130,131,132,133,134,
|
public static final int[] SERVICE_OPTIONS = {128, 129, 130, 131, 132, 133, 134, 135};
|
||||||
135 };
|
|
||||||
public static final int[] TRANSMIT_IDENTIFIER = {176, 177, 178, 179};
|
public static final int[] TRANSMIT_IDENTIFIER = {176, 177, 178, 179};
|
||||||
public static final int[] TRANSMIT_NUMBER = { 180,181,182,183,184,185,186,
|
public static final int[] TRANSMIT_NUMBER = {180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191};
|
||||||
187,188,189,190,191 };
|
|
||||||
public static final int[] RECEIVE_IDENTIFIER = {192, 193, 194, 195};
|
public static final int[] RECEIVE_IDENTIFIER = {192, 193, 194, 195};
|
||||||
public static final int[] RECEIVE_NUMBER = { 196,197,198,199,200,201,202,
|
public static final int[] RECEIVE_NUMBER = {196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207};
|
||||||
203,204,205,206,207 };
|
public static final int[] GROUP_ADDRESS = {208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221,
|
||||||
public static final int[] GROUP_ADDRESS = { 208,209,210,211,212,213,214,215,
|
222, 223};
|
||||||
216,217,218,219,220,221,222,223 };
|
public static final int[] MULTIPLE_BLOCK_CRC = {224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236,
|
||||||
public static final int[] MULTIPLE_BLOCK_CRC = { 224,225,226,227,228,229,
|
237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255};
|
||||||
230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,
|
|
||||||
248,249,250,251,252,253,254,255 };
|
|
||||||
|
|
||||||
private IBandIdentifier mTransmitIdentifierUpdate;
|
private IBandIdentifier mTransmitIdentifierUpdate;
|
||||||
private IBandIdentifier mReceiveIdentifierUpdate;
|
private IBandIdentifier mReceiveIdentifierUpdate;
|
||||||
|
|
||||||
public GroupVoiceChannelGrantExplicit( BinaryMessage message,
|
public GroupVoiceChannelGrantExplicit(BinaryMessage message, DataUnitID duid, AliasList aliasList)
|
||||||
DataUnitID duid, AliasList aliasList )
|
|
||||||
{
|
{
|
||||||
super(message, duid, aliasList);
|
super(message, duid, aliasList);
|
||||||
|
|
||||||
@@ -143,12 +155,22 @@ public class GroupVoiceChannelGrantExplicit extends PDUMessage
|
|||||||
|
|
||||||
public long getDownlinkFrequency()
|
public long getDownlinkFrequency()
|
||||||
{
|
{
|
||||||
return calculateDownlink( mTransmitIdentifierUpdate, getTransmitChannelNumber() );
|
if(mTransmitIdentifierUpdate != null)
|
||||||
|
{
|
||||||
|
return mTransmitIdentifierUpdate.getDownlinkFrequency(getTransmitChannelNumber());
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public long getUplinkFrequency()
|
public long getUplinkFrequency()
|
||||||
{
|
{
|
||||||
return calculateUplink( mReceiveIdentifierUpdate, getReceiveChannelNumber() );
|
if(mReceiveIdentifierUpdate != null)
|
||||||
|
{
|
||||||
|
return mReceiveIdentifierUpdate.getUplinkFrequency(getReceiveChannelNumber());
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -1,18 +1,35 @@
|
|||||||
|
/*******************************************************************************
|
||||||
|
* sdrtrunk
|
||||||
|
* Copyright (C) 2014-2017 Dennis Sheirer
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>
|
||||||
|
*
|
||||||
|
******************************************************************************/
|
||||||
package module.decode.p25.message.pdu.osp.voice;
|
package module.decode.p25.message.pdu.osp.voice;
|
||||||
|
|
||||||
import java.util.Date;
|
import alias.AliasList;
|
||||||
|
import bits.BinaryMessage;
|
||||||
|
import edac.CRCP25;
|
||||||
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.pdu.PDUMessage;
|
import module.decode.p25.message.pdu.PDUMessage;
|
||||||
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 alias.AliasList;
|
|
||||||
import bits.BinaryMessage;
|
|
||||||
import edac.CRCP25;
|
|
||||||
|
|
||||||
public class TelephoneInterconnectChannelGrantExplicit extends PDUMessage
|
import java.util.Date;
|
||||||
implements IdentifierReceiver
|
|
||||||
|
public class TelephoneInterconnectChannelGrantExplicit extends PDUMessage implements IdentifierReceiver
|
||||||
{
|
{
|
||||||
/* Service Options */
|
/* Service Options */
|
||||||
public static final int EMERGENCY_FLAG = 128;
|
public static final int EMERGENCY_FLAG = 128;
|
||||||
@@ -20,27 +37,21 @@ public class TelephoneInterconnectChannelGrantExplicit extends PDUMessage
|
|||||||
public static final int DUPLEX_MODE = 130;
|
public static final int DUPLEX_MODE = 130;
|
||||||
public static final int SESSION_MODE = 131;
|
public static final int SESSION_MODE = 131;
|
||||||
|
|
||||||
public static final int[] ADDRESS = { 88,89,90,91,92,93,94,95,96,97,
|
public static final int[] ADDRESS = {88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105,
|
||||||
98,99,100,101,102,103,104,105,106,107,108,109,110,111 };
|
106, 107, 108, 109, 110, 111};
|
||||||
public static final int[] SERVICE_OPTIONS = { 128,129,130,131,132,133,134,
|
public static final int[] SERVICE_OPTIONS = {128, 129, 130, 131, 132, 133, 134, 135};
|
||||||
135 };
|
|
||||||
public static final int[] TRANSMIT_IDENTIFIER = {160, 161, 162, 163};
|
public static final int[] TRANSMIT_IDENTIFIER = {160, 161, 162, 163};
|
||||||
public static final int[] TRANSMIT_NUMBER = { 164,165,166,167,168,169,170,
|
public static final int[] TRANSMIT_NUMBER = {164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175};
|
||||||
171,172,173,174,175 };
|
|
||||||
public static final int[] RECEIVE_IDENTIFIER = {176, 177, 178, 179};
|
public static final int[] RECEIVE_IDENTIFIER = {176, 177, 178, 179};
|
||||||
public static final int[] RECEIVE_NUMBER = { 180,181,182,183,184,185,186,
|
public static final int[] RECEIVE_NUMBER = {180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191};
|
||||||
187,188,189,190,191 };
|
public static final int[] CALL_TIMER = {192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207};
|
||||||
public static final int[] CALL_TIMER = { 192,193,194,195,196,197,198,199,
|
public static final int[] MULTIPLE_BLOCK_CRC = {224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236,
|
||||||
200,201,202,203,204,205,206,207 };
|
237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255};
|
||||||
public static final int[] MULTIPLE_BLOCK_CRC = { 224,225,226,227,228,229,
|
|
||||||
230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,
|
|
||||||
248,249,250,251,252,253,254,255 };
|
|
||||||
|
|
||||||
private IBandIdentifier mTransmitIdentifierUpdate;
|
private IBandIdentifier mTransmitIdentifierUpdate;
|
||||||
private IBandIdentifier mReceiveIdentifierUpdate;
|
private IBandIdentifier mReceiveIdentifierUpdate;
|
||||||
|
|
||||||
public TelephoneInterconnectChannelGrantExplicit( BinaryMessage message,
|
public TelephoneInterconnectChannelGrantExplicit(BinaryMessage message, DataUnitID duid, AliasList aliasList)
|
||||||
DataUnitID duid, AliasList aliasList )
|
|
||||||
{
|
{
|
||||||
super(message, duid, aliasList);
|
super(message, duid, aliasList);
|
||||||
|
|
||||||
@@ -150,12 +161,22 @@ public class TelephoneInterconnectChannelGrantExplicit extends PDUMessage
|
|||||||
|
|
||||||
public long getDownlinkFrequency()
|
public long getDownlinkFrequency()
|
||||||
{
|
{
|
||||||
return calculateDownlink( mTransmitIdentifierUpdate, getTransmitChannelNumber() );
|
if(mTransmitIdentifierUpdate != null)
|
||||||
|
{
|
||||||
|
return mTransmitIdentifierUpdate.getDownlinkFrequency(getTransmitChannelNumber());
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public long getUplinkFrequency()
|
public long getUplinkFrequency()
|
||||||
{
|
{
|
||||||
return calculateUplink( mReceiveIdentifierUpdate, getReceiveChannelNumber() );
|
if(mReceiveIdentifierUpdate != null)
|
||||||
|
{
|
||||||
|
return mReceiveIdentifierUpdate.getUplinkFrequency(getReceiveChannelNumber());
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -1,16 +1,33 @@
|
|||||||
|
/*******************************************************************************
|
||||||
|
* sdrtrunk
|
||||||
|
* Copyright (C) 2014-2017 Dennis Sheirer
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>
|
||||||
|
*
|
||||||
|
******************************************************************************/
|
||||||
package module.decode.p25.message.pdu.osp.voice;
|
package module.decode.p25.message.pdu.osp.voice;
|
||||||
|
|
||||||
|
import alias.AliasList;
|
||||||
|
import bits.BinaryMessage;
|
||||||
|
import edac.CRCP25;
|
||||||
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.pdu.PDUMessage;
|
import module.decode.p25.message.pdu.PDUMessage;
|
||||||
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 alias.AliasList;
|
|
||||||
import bits.BinaryMessage;
|
|
||||||
import edac.CRCP25;
|
|
||||||
|
|
||||||
public class UnitToUnitVoiceChannelGrantUpdateExtended extends PDUMessage
|
public class UnitToUnitVoiceChannelGrantUpdateExtended extends PDUMessage implements IdentifierReceiver
|
||||||
implements IdentifierReceiver
|
|
||||||
{
|
{
|
||||||
/* Service Options */
|
/* Service Options */
|
||||||
public static final int EMERGENCY_FLAG = 128;
|
public static final int EMERGENCY_FLAG = 128;
|
||||||
@@ -18,33 +35,27 @@ public class UnitToUnitVoiceChannelGrantUpdateExtended extends PDUMessage
|
|||||||
public static final int DUPLEX_MODE = 130;
|
public static final int DUPLEX_MODE = 130;
|
||||||
public static final int SESSION_MODE = 131;
|
public static final int SESSION_MODE = 131;
|
||||||
|
|
||||||
public static final int[] SOURCE_ADDRESS = { 88,89,90,91,92,93,94,95,96,97,
|
public static final int[] SOURCE_ADDRESS = {88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104,
|
||||||
98,99,100,101,102,103,104,105,106,107,108,109,110,111 };
|
105, 106, 107, 108, 109, 110, 111};
|
||||||
public static final int[] SERVICE_OPTIONS = { 128,129,130,131,132,133,134,
|
public static final int[] SERVICE_OPTIONS = {128, 129, 130, 131, 132, 133, 134, 135};
|
||||||
135 };
|
public static final int[] SOURCE_WACN = {160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174,
|
||||||
public static final int[] SOURCE_WACN = { 160,161,162,163,164,165,166,167,
|
175, 176, 177, 178, 179};
|
||||||
168,169,170,171,172,173,174,175,176,177,178,179 };
|
public static final int[] SOURCE_SYSTEM_ID = {180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191};
|
||||||
public static final int[] SOURCE_SYSTEM_ID = { 180,181,182,183,184,185,186,
|
public static final int[] SOURCE_ID = {192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206,
|
||||||
187,188,189,190,191 };
|
207, 208, 209, 210, 211, 212, 213, 214, 215};
|
||||||
public static final int[] SOURCE_ID = { 192,193,194,195,196,197,198,199,200,
|
public static final int[] TARGET_ADDRESS = {216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229,
|
||||||
201,202,203,204,205,206,207,208,209,210,211,212,213,214,215 };
|
230, 231, 232, 233, 234, 235, 236, 237, 238, 239};
|
||||||
public static final int[] TARGET_ADDRESS = { 216,217,218,219,220,221,222,
|
|
||||||
223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239 };
|
|
||||||
public static final int[] TRANSMIT_IDENTIFIER = {240, 241, 242, 243};
|
public static final int[] TRANSMIT_IDENTIFIER = {240, 241, 242, 243};
|
||||||
public static final int[] TRANSMIT_NUMBER = { 244,245,246,247,248,249,250,
|
public static final int[] TRANSMIT_NUMBER = {244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255};
|
||||||
251,252,253,254,255 };
|
|
||||||
public static final int[] RECEIVE_IDENTIFIER = {256, 257, 258, 259};
|
public static final int[] RECEIVE_IDENTIFIER = {256, 257, 258, 259};
|
||||||
public static final int[] RECEIVE_NUMBER = { 260,261,262,263,264,265,266,
|
public static final int[] RECEIVE_NUMBER = {260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271};
|
||||||
267,268,269,270,271 };
|
public static final int[] MULTIPLE_BLOCK_CRC = {320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332,
|
||||||
public static final int[] MULTIPLE_BLOCK_CRC = { 320,321,322,323,324,325,
|
333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351};
|
||||||
326,327,328,329,330,331,332,333,334,335,336,337,338,339,340,341,342,
|
|
||||||
343,344,345,346,347,348,349,350,351 };
|
|
||||||
|
|
||||||
private IBandIdentifier mTransmitIdentifierUpdate;
|
private IBandIdentifier mTransmitIdentifierUpdate;
|
||||||
private IBandIdentifier mReceiveIdentifierUpdate;
|
private IBandIdentifier mReceiveIdentifierUpdate;
|
||||||
|
|
||||||
public UnitToUnitVoiceChannelGrantUpdateExtended( BinaryMessage message,
|
public UnitToUnitVoiceChannelGrantUpdateExtended(BinaryMessage message, DataUnitID duid, AliasList aliasList)
|
||||||
DataUnitID duid, AliasList aliasList )
|
|
||||||
{
|
{
|
||||||
super(message, duid, aliasList);
|
super(message, duid, aliasList);
|
||||||
|
|
||||||
@@ -173,12 +184,22 @@ public class UnitToUnitVoiceChannelGrantUpdateExtended extends PDUMessage
|
|||||||
|
|
||||||
public long getDownlinkFrequency()
|
public long getDownlinkFrequency()
|
||||||
{
|
{
|
||||||
return calculateDownlink( mTransmitIdentifierUpdate, getTransmitChannelNumber() );
|
if(mTransmitIdentifierUpdate != null)
|
||||||
|
{
|
||||||
|
return mTransmitIdentifierUpdate.getDownlinkFrequency(getTransmitChannelNumber());
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public long getUplinkFrequency()
|
public long getUplinkFrequency()
|
||||||
{
|
{
|
||||||
return calculateUplink( mReceiveIdentifierUpdate, getReceiveChannelNumber() );
|
if(mReceiveIdentifierUpdate != null)
|
||||||
|
{
|
||||||
|
return mReceiveIdentifierUpdate.getUplinkFrequency(getReceiveChannelNumber());
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -1,3 +1,21 @@
|
|||||||
|
/*******************************************************************************
|
||||||
|
* sdrtrunk
|
||||||
|
* Copyright (C) 2014-2017 Dennis Sheirer
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>
|
||||||
|
*
|
||||||
|
******************************************************************************/
|
||||||
package module.decode.p25.message.tdu.lc;
|
package module.decode.p25.message.tdu.lc;
|
||||||
|
|
||||||
import module.decode.p25.message.IAdjacentSite;
|
import module.decode.p25.message.IAdjacentSite;
|
||||||
@@ -6,19 +24,15 @@ import module.decode.p25.message.IdentifierReceiver;
|
|||||||
import module.decode.p25.message.tsbk.osp.control.SystemService;
|
import module.decode.p25.message.tsbk.osp.control.SystemService;
|
||||||
import module.decode.p25.reference.LinkControlOpcode;
|
import module.decode.p25.reference.LinkControlOpcode;
|
||||||
|
|
||||||
public class AdjacentSiteStatusBroadcast extends TDULinkControlMessage
|
public class AdjacentSiteStatusBroadcast extends TDULinkControlMessage implements IdentifierReceiver, IAdjacentSite
|
||||||
implements IdentifierReceiver, IAdjacentSite
|
|
||||||
{
|
{
|
||||||
public static final int[] LRA = {72, 73, 74, 75, 88, 89, 90, 91};
|
public static final int[] LRA = {72, 73, 74, 75, 88, 89, 90, 91};
|
||||||
public static final int[] SYSTEM_ID = { 96,97,98,99,112,113,114,115,
|
public static final int[] SYSTEM_ID = {96, 97, 98, 99, 112, 113, 114, 115, 116, 117, 118, 119};
|
||||||
116,117,118,119 };
|
|
||||||
public static final int[] RFSS_ID = {120, 121, 122, 123, 136, 137, 138, 139};
|
public static final int[] RFSS_ID = {120, 121, 122, 123, 136, 137, 138, 139};
|
||||||
public static final int[] SITE_ID = {140, 141, 142, 143, 144, 145, 146, 147};
|
public static final int[] SITE_ID = {140, 141, 142, 143, 144, 145, 146, 147};
|
||||||
public static final int[] IDENTIFIER = {160, 161, 162, 163};
|
public static final int[] IDENTIFIER = {160, 161, 162, 163};
|
||||||
public static final int[] CHANNEL = { 164,165,166,167,168,169,170,
|
public static final int[] CHANNEL = {164, 165, 166, 167, 168, 169, 170, 171, 184, 185, 186, 187};
|
||||||
171,184,185,186,187 };
|
public static final int[] SYSTEM_SERVICE_CLASS = {188, 189, 190, 191, 192, 193, 194, 195};
|
||||||
public static final int[] SYSTEM_SERVICE_CLASS = { 188,189,190,191,192,193,
|
|
||||||
194,195 };
|
|
||||||
|
|
||||||
private IBandIdentifier mIdentifierUpdate;
|
private IBandIdentifier mIdentifierUpdate;
|
||||||
|
|
||||||
@@ -136,11 +150,21 @@ public class AdjacentSiteStatusBroadcast extends TDULinkControlMessage
|
|||||||
|
|
||||||
public long getDownlinkFrequency()
|
public long getDownlinkFrequency()
|
||||||
{
|
{
|
||||||
return calculateDownlink( mIdentifierUpdate, getChannelNumber() );
|
if(mIdentifierUpdate != null)
|
||||||
|
{
|
||||||
|
return mIdentifierUpdate.getDownlinkFrequency(getChannelNumber());
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public long getUplinkFrequency()
|
public long getUplinkFrequency()
|
||||||
{
|
{
|
||||||
return calculateUplink( mIdentifierUpdate, getChannelNumber() );
|
if(mIdentifierUpdate != null)
|
||||||
|
{
|
||||||
|
return mIdentifierUpdate.getUplinkFrequency(getChannelNumber());
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,3 +1,21 @@
|
|||||||
|
/*******************************************************************************
|
||||||
|
* sdrtrunk
|
||||||
|
* Copyright (C) 2014-2017 Dennis Sheirer
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>
|
||||||
|
*
|
||||||
|
******************************************************************************/
|
||||||
package module.decode.p25.message.tdu.lc;
|
package module.decode.p25.message.tdu.lc;
|
||||||
|
|
||||||
import module.decode.p25.message.IAdjacentSite;
|
import module.decode.p25.message.IAdjacentSite;
|
||||||
@@ -5,8 +23,7 @@ import module.decode.p25.message.IBandIdentifier;
|
|||||||
import module.decode.p25.message.IdentifierReceiver;
|
import module.decode.p25.message.IdentifierReceiver;
|
||||||
import module.decode.p25.reference.LinkControlOpcode;
|
import module.decode.p25.reference.LinkControlOpcode;
|
||||||
|
|
||||||
public class AdjacentSiteStatusBroadcastExplicit extends TDULinkControlMessage
|
public class AdjacentSiteStatusBroadcastExplicit extends TDULinkControlMessage implements IdentifierReceiver, IAdjacentSite
|
||||||
implements IdentifierReceiver, IAdjacentSite
|
|
||||||
{
|
{
|
||||||
public static final int[] LRA = {72, 73, 74, 75, 88, 89, 90, 91};
|
public static final int[] LRA = {72, 73, 74, 75, 88, 89, 90, 91};
|
||||||
public static final int[] TRANSMIT_IDENTIFIER = {92, 93, 94, 95};
|
public static final int[] TRANSMIT_IDENTIFIER = {92, 93, 94, 95};
|
||||||
@@ -122,12 +139,22 @@ public class AdjacentSiteStatusBroadcastExplicit extends TDULinkControlMessage
|
|||||||
|
|
||||||
public long getDownlinkFrequency()
|
public long getDownlinkFrequency()
|
||||||
{
|
{
|
||||||
return calculateDownlink( mTransmitBand, getTransmitChannel() );
|
if(mTransmitBand != null)
|
||||||
|
{
|
||||||
|
return mTransmitBand.getDownlinkFrequency(getTransmitChannel());
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public long getUplinkFrequency()
|
public long getUplinkFrequency()
|
||||||
{
|
{
|
||||||
return calculateUplink( mReceiveBand, getReceiveChannel() );
|
if(mReceiveBand != null)
|
||||||
|
{
|
||||||
|
return mReceiveBand.getUplinkFrequency(getReceiveChannel());
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -1,10 +1,27 @@
|
|||||||
|
/*******************************************************************************
|
||||||
|
* sdrtrunk
|
||||||
|
* Copyright (C) 2014-2017 Dennis Sheirer
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>
|
||||||
|
*
|
||||||
|
******************************************************************************/
|
||||||
package module.decode.p25.message.tdu.lc;
|
package module.decode.p25.message.tdu.lc;
|
||||||
|
|
||||||
import module.decode.p25.message.IBandIdentifier;
|
import module.decode.p25.message.IBandIdentifier;
|
||||||
import module.decode.p25.reference.LinkControlOpcode;
|
import module.decode.p25.reference.LinkControlOpcode;
|
||||||
|
|
||||||
public class ChannelIdentifierUpdate extends TDULinkControlMessage
|
public class ChannelIdentifierUpdate extends TDULinkControlMessage implements IBandIdentifier
|
||||||
implements IBandIdentifier
|
|
||||||
{
|
{
|
||||||
public static final int[] IDENTIFIER = {72, 73, 74, 75};
|
public static final int[] IDENTIFIER = {72, 73, 74, 75};
|
||||||
public static final int[] BANDWIDTH = {88, 89, 90, 91, 92, 93, 94, 95, 96};
|
public static final int[] BANDWIDTH = {88, 89, 90, 91, 92, 93, 94, 95, 96};
|
||||||
@@ -79,4 +96,22 @@ public class ChannelIdentifierUpdate extends TDULinkControlMessage
|
|||||||
{
|
{
|
||||||
return -1 * mMessage.getLong(TRANSMIT_OFFSET) * 250000l;
|
return -1 * mMessage.getLong(TRANSMIT_OFFSET) * 250000l;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public long getDownlinkFrequency(int channelNumber)
|
||||||
|
{
|
||||||
|
return getBaseFrequency() + (channelNumber * getChannelSpacing());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public long getUplinkFrequency(int channelNumber)
|
||||||
|
{
|
||||||
|
return getDownlinkFrequency(channelNumber) + getTransmitOffset();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isTDMA()
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,20 +1,34 @@
|
|||||||
|
/*******************************************************************************
|
||||||
|
* sdrtrunk
|
||||||
|
* Copyright (C) 2014-2017 Dennis Sheirer
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>
|
||||||
|
*
|
||||||
|
******************************************************************************/
|
||||||
package module.decode.p25.message.tdu.lc;
|
package module.decode.p25.message.tdu.lc;
|
||||||
|
|
||||||
import module.decode.p25.message.IBandIdentifier;
|
import module.decode.p25.message.IBandIdentifier;
|
||||||
import module.decode.p25.reference.LinkControlOpcode;
|
import module.decode.p25.reference.LinkControlOpcode;
|
||||||
|
|
||||||
public class ChannelIdentifierUpdateExplicit extends TDULinkControlMessage
|
public class ChannelIdentifierUpdateExplicit extends TDULinkControlMessage implements IBandIdentifier
|
||||||
implements IBandIdentifier
|
|
||||||
{
|
{
|
||||||
public static final int[] IDENTIFIER = {72, 73, 74, 75};
|
public static final int[] IDENTIFIER = {72, 73, 74, 75};
|
||||||
public static final int[] BANDWIDTH = {88, 89, 90, 91};
|
public static final int[] BANDWIDTH = {88, 89, 90, 91};
|
||||||
public static final int[] TRANSMIT_OFFSET = { 92,93,94,95,96,97,98,99,112,
|
public static final int[] TRANSMIT_OFFSET = {92, 93, 94, 95, 96, 97, 98, 99, 112, 113, 114, 115, 116, 117};
|
||||||
113,114,115,116,117 };
|
public static final int[] CHANNEL_SPACING = {118, 119, 120, 121, 122, 123, 136, 137, 138, 139};
|
||||||
public static final int[] CHANNEL_SPACING = { 118,119,120,121,122,
|
public static final int[] BASE_FREQUENCY = {140, 141, 142, 143, 144, 145, 146, 147, 160, 161, 162, 163, 164, 165,
|
||||||
123,136,137,138,139 };
|
166, 167, 168, 169, 170, 171, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195};
|
||||||
public static final int[] BASE_FREQUENCY = { 140,141,142,143,144,145,146,
|
|
||||||
147,160,161,162,163,164,165,166,167,168,169,170,171,184,185,186,
|
|
||||||
187,188,189,190,191,192,193,194,195 };
|
|
||||||
|
|
||||||
public ChannelIdentifierUpdateExplicit(TDULinkControlMessage source)
|
public ChannelIdentifierUpdateExplicit(TDULinkControlMessage source)
|
||||||
{
|
{
|
||||||
@@ -79,4 +93,22 @@ public class ChannelIdentifierUpdateExplicit extends TDULinkControlMessage
|
|||||||
{
|
{
|
||||||
return -1 * mMessage.getLong(TRANSMIT_OFFSET) * 250000l;
|
return -1 * mMessage.getLong(TRANSMIT_OFFSET) * 250000l;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public long getDownlinkFrequency(int channelNumber)
|
||||||
|
{
|
||||||
|
return getBaseFrequency() + (channelNumber * getChannelSpacing());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public long getUplinkFrequency(int channelNumber)
|
||||||
|
{
|
||||||
|
return getDownlinkFrequency(channelNumber) + getTransmitOffset();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isTDMA()
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,30 +1,40 @@
|
|||||||
|
/*******************************************************************************
|
||||||
|
* sdrtrunk
|
||||||
|
* Copyright (C) 2014-2017 Dennis Sheirer
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>
|
||||||
|
*
|
||||||
|
******************************************************************************/
|
||||||
package module.decode.p25.message.tdu.lc;
|
package module.decode.p25.message.tdu.lc;
|
||||||
|
|
||||||
import java.util.Set;
|
|
||||||
import java.util.TreeSet;
|
|
||||||
|
|
||||||
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.reference.LinkControlOpcode;
|
import module.decode.p25.reference.LinkControlOpcode;
|
||||||
|
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
public class GroupVoiceChannelUpdate extends TDULinkControlMessage
|
import java.util.Set;
|
||||||
implements IdentifierReceiver
|
import java.util.TreeSet;
|
||||||
{
|
|
||||||
private final static Logger mLog =
|
|
||||||
LoggerFactory.getLogger( GroupVoiceChannelUpdate.class );
|
|
||||||
|
|
||||||
|
public class GroupVoiceChannelUpdate extends TDULinkControlMessage implements IdentifierReceiver
|
||||||
|
{
|
||||||
public static final int[] IDENTIFIER_A = {72, 73, 74, 75};
|
public static final int[] IDENTIFIER_A = {72, 73, 74, 75};
|
||||||
public static final int[] CHANNEL_A = {88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99};
|
public static final int[] CHANNEL_A = {88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99};
|
||||||
public static final int[] GROUP_ADDRESS_A = { 112,113,114,115,116,117,118,
|
public static final int[] GROUP_ADDRESS_A = {112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 136, 137, 138, 139};
|
||||||
119,120,121,122,123,136,137,138,139 };
|
|
||||||
public static final int[] IDENTIFIER_B = {140, 141, 142, 143};
|
public static final int[] IDENTIFIER_B = {140, 141, 142, 143};
|
||||||
public static final int[] CHANNEL_B = { 144,145,146,147,160,161,162,163,164,
|
public static final int[] CHANNEL_B = {144, 145, 146, 147, 160, 161, 162, 163, 164, 165, 166, 167};
|
||||||
165,166,167 };
|
public static final int[] GROUP_ADDRESS_B = {168, 169, 170, 171, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195};
|
||||||
public static final int[] GROUP_ADDRESS_B = { 168,169,170,171,184,185,186,
|
|
||||||
187,188,189,190,191,192,193,194,195 };
|
|
||||||
|
|
||||||
private IBandIdentifier mIdentifierUpdateA;
|
private IBandIdentifier mIdentifierUpdateA;
|
||||||
private IBandIdentifier mIdentifierUpdateB;
|
private IBandIdentifier mIdentifierUpdateB;
|
||||||
@@ -108,6 +118,7 @@ public class GroupVoiceChannelUpdate extends TDULinkControlMessage
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns a sorted list of addresses contained in the A and B fields
|
* Returns a sorted list of addresses contained in the A and B fields
|
||||||
|
*
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public Set<String> getAddresses()
|
public Set<String> getAddresses()
|
||||||
@@ -156,21 +167,41 @@ public class GroupVoiceChannelUpdate extends TDULinkControlMessage
|
|||||||
|
|
||||||
public long getDownlinkFrequencyA()
|
public long getDownlinkFrequencyA()
|
||||||
{
|
{
|
||||||
return calculateDownlink( mIdentifierUpdateA, getChannelNumberA() );
|
if(mIdentifierUpdateA != null)
|
||||||
|
{
|
||||||
|
return mIdentifierUpdateA.getDownlinkFrequency(getChannelNumberA());
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public long getUplinkFrequencyA()
|
public long getUplinkFrequencyA()
|
||||||
{
|
{
|
||||||
return calculateUplink( mIdentifierUpdateA, getChannelNumberA() );
|
if(mIdentifierUpdateA != null)
|
||||||
|
{
|
||||||
|
return mIdentifierUpdateA.getUplinkFrequency(getChannelNumberA());
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public long getDownlinkFrequencyB()
|
public long getDownlinkFrequencyB()
|
||||||
{
|
{
|
||||||
return calculateDownlink( mIdentifierUpdateB, getChannelNumberA() );
|
if(mIdentifierUpdateB != null)
|
||||||
|
{
|
||||||
|
return mIdentifierUpdateB.getDownlinkFrequency(getChannelNumberB());
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public long getUplinkFrequencyB()
|
public long getUplinkFrequencyB()
|
||||||
{
|
{
|
||||||
return calculateUplink( mIdentifierUpdateB, getChannelNumberA() );
|
if(mIdentifierUpdateB != null)
|
||||||
|
{
|
||||||
|
return mIdentifierUpdateB.getUplinkFrequency(getChannelNumberB());
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,9 +1,26 @@
|
|||||||
|
/*******************************************************************************
|
||||||
|
* sdrtrunk
|
||||||
|
* Copyright (C) 2014-2017 Dennis Sheirer
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>
|
||||||
|
*
|
||||||
|
******************************************************************************/
|
||||||
package module.decode.p25.message.tdu.lc;
|
package module.decode.p25.message.tdu.lc;
|
||||||
|
|
||||||
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.reference.LinkControlOpcode;
|
import module.decode.p25.reference.LinkControlOpcode;
|
||||||
|
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
@@ -17,14 +34,11 @@ public class GroupVoiceChannelUpdateExplicit extends TDULinkControlMessage
|
|||||||
public static final int ENCRYPTED_CHANNEL_FLAG = 93;
|
public static final int ENCRYPTED_CHANNEL_FLAG = 93;
|
||||||
public static final int DUPLEX_MODE = 94;
|
public static final int DUPLEX_MODE = 94;
|
||||||
public static final int SESSION_MODE = 95;
|
public static final int SESSION_MODE = 95;
|
||||||
public static final int[] GROUP_ADDRESS = { 112,113,114,115,116,117,118,
|
public static final int[] GROUP_ADDRESS = {112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 136, 137, 138, 139};
|
||||||
119,120,121,122,123,136,137,138,139 };
|
|
||||||
public static final int[] TRANSMIT_IDENTIFIER = {140, 141, 142, 143};
|
public static final int[] TRANSMIT_IDENTIFIER = {140, 141, 142, 143};
|
||||||
public static final int[] TRANSMIT_CHANNEL = { 144,145,146,147,160,161,162,
|
public static final int[] TRANSMIT_CHANNEL = {144, 145, 146, 147, 160, 161, 162, 163, 164, 165, 166, 167};
|
||||||
163,164,165,166,167 };
|
|
||||||
public static final int[] RECEIVE_IDENTIFIER = {168, 169, 170, 171};
|
public static final int[] RECEIVE_IDENTIFIER = {168, 169, 170, 171};
|
||||||
public static final int[] RECEIVE_CHANNEL = { 184,185,186,187,188,189,190,
|
public static final int[] RECEIVE_CHANNEL = {184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199};
|
||||||
191,192,193,194,195,196,197,198,199 };
|
|
||||||
|
|
||||||
private IBandIdentifier mTransmitIdentifierUpdate;
|
private IBandIdentifier mTransmitIdentifierUpdate;
|
||||||
private IBandIdentifier mReceiveIdentifierUpdate;
|
private IBandIdentifier mReceiveIdentifierUpdate;
|
||||||
@@ -142,13 +156,21 @@ public class GroupVoiceChannelUpdateExplicit extends TDULinkControlMessage
|
|||||||
|
|
||||||
public long getDownlinkFrequency()
|
public long getDownlinkFrequency()
|
||||||
{
|
{
|
||||||
return calculateDownlink( mTransmitIdentifierUpdate,
|
if(mTransmitIdentifierUpdate != null)
|
||||||
getTransmitChannelNumber() );
|
{
|
||||||
|
return mTransmitIdentifierUpdate.getDownlinkFrequency(getTransmitChannelNumber());
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public long getUplinkFrequency()
|
public long getUplinkFrequency()
|
||||||
{
|
{
|
||||||
return calculateUplink( mReceiveIdentifierUpdate,
|
if(mReceiveIdentifierUpdate != null)
|
||||||
getReceiveChannelNumber() );
|
{
|
||||||
|
return mReceiveIdentifierUpdate.getUplinkFrequency(getReceiveChannelNumber());
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,3 +1,21 @@
|
|||||||
|
/*******************************************************************************
|
||||||
|
* sdrtrunk
|
||||||
|
* Copyright (C) 2014-2017 Dennis Sheirer
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>
|
||||||
|
*
|
||||||
|
******************************************************************************/
|
||||||
package module.decode.p25.message.tdu.lc;
|
package module.decode.p25.message.tdu.lc;
|
||||||
|
|
||||||
import module.decode.p25.message.IBandIdentifier;
|
import module.decode.p25.message.IBandIdentifier;
|
||||||
@@ -5,24 +23,14 @@ import module.decode.p25.message.IdentifierReceiver;
|
|||||||
import module.decode.p25.reference.LinkControlOpcode;
|
import module.decode.p25.reference.LinkControlOpcode;
|
||||||
import module.decode.p25.reference.Service;
|
import module.decode.p25.reference.Service;
|
||||||
|
|
||||||
import org.slf4j.Logger;
|
public class NetworkStatusBroadcast extends TDULinkControlMessage implements IdentifierReceiver
|
||||||
import org.slf4j.LoggerFactory;
|
|
||||||
|
|
||||||
public class NetworkStatusBroadcast extends TDULinkControlMessage
|
|
||||||
implements IdentifierReceiver
|
|
||||||
{
|
{
|
||||||
private final static Logger mLog =
|
public static final int[] WACN = {72, 73, 74, 75, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 112, 113, 114,
|
||||||
LoggerFactory.getLogger( NetworkStatusBroadcast.class );
|
115, 116, 117, 118, 119, 120, 121, 122, 123};
|
||||||
|
public static final int[] SYSTEM = {136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147};
|
||||||
public static final int[] WACN = { 72,73,74,75,88,89,90,91,92,93,94,95,96,
|
|
||||||
97,98,99,112,113,114,115,116,117,118,119,120,121,122,123 };
|
|
||||||
public static final int[] SYSTEM = { 136,137,138,139,140,141,142,143,144,
|
|
||||||
145,146,147 };
|
|
||||||
public static final int[] IDENTIFIER = {160, 161, 162, 163};
|
public static final int[] IDENTIFIER = {160, 161, 162, 163};
|
||||||
public static final int[] CHANNEL = { 164,165,166,167,168,169,170,171,184,
|
public static final int[] CHANNEL = {164, 165, 166, 167, 168, 169, 170, 171, 184, 185, 186, 187};
|
||||||
185,186,187 };
|
public static final int[] SYSTEM_SERVICE_CLASS = {188, 189, 190, 191, 192, 193, 194, 195};
|
||||||
public static final int[] SYSTEM_SERVICE_CLASS = { 188,189,190,191,192,193,
|
|
||||||
194,195 };
|
|
||||||
|
|
||||||
private IBandIdentifier mIdentifierUpdate;
|
private IBandIdentifier mIdentifierUpdate;
|
||||||
|
|
||||||
@@ -100,11 +108,21 @@ public class NetworkStatusBroadcast extends TDULinkControlMessage
|
|||||||
|
|
||||||
public long getDownlinkFrequency()
|
public long getDownlinkFrequency()
|
||||||
{
|
{
|
||||||
return calculateDownlink( mIdentifierUpdate, getChannelNumber() );
|
if(mIdentifierUpdate != null)
|
||||||
|
{
|
||||||
|
return mIdentifierUpdate.getDownlinkFrequency(getChannelNumber());
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public long getUplinkFrequency()
|
public long getUplinkFrequency()
|
||||||
{
|
{
|
||||||
return calculateUplink( mIdentifierUpdate, getChannelNumber() );
|
if(mIdentifierUpdate != null)
|
||||||
|
{
|
||||||
|
return mIdentifierUpdate.getUplinkFrequency(getChannelNumber());
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,28 +1,35 @@
|
|||||||
|
/*******************************************************************************
|
||||||
|
* sdrtrunk
|
||||||
|
* Copyright (C) 2014-2017 Dennis Sheirer
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>
|
||||||
|
*
|
||||||
|
******************************************************************************/
|
||||||
package module.decode.p25.message.tdu.lc;
|
package module.decode.p25.message.tdu.lc;
|
||||||
|
|
||||||
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.reference.LinkControlOpcode;
|
import module.decode.p25.reference.LinkControlOpcode;
|
||||||
|
|
||||||
import org.slf4j.Logger;
|
public class NetworkStatusBroadcastExplicit extends TDULinkControlMessage implements IdentifierReceiver
|
||||||
import org.slf4j.LoggerFactory;
|
|
||||||
|
|
||||||
public class NetworkStatusBroadcastExplicit extends TDULinkControlMessage
|
|
||||||
implements IdentifierReceiver
|
|
||||||
{
|
{
|
||||||
private final static Logger mLog =
|
public static final int[] WACN = {72, 73, 74, 75, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 112, 113, 114, 115};
|
||||||
LoggerFactory.getLogger( NetworkStatusBroadcastExplicit.class );
|
public static final int[] SYSTEM = {116, 117, 118, 119, 120, 121, 122, 123, 136, 137, 138, 139};
|
||||||
|
|
||||||
public static final int[] WACN = { 72,73,74,75,88,89,90,91,92,93,94,95,96,
|
|
||||||
97,98,99,112,113,114,115 };
|
|
||||||
public static final int[] SYSTEM = { 116,117,118,119,120,121,122,123,136,
|
|
||||||
137,138,139 };
|
|
||||||
public static final int[] TRANSMIT_IDENTIFIER = {140, 141, 142, 143};
|
public static final int[] TRANSMIT_IDENTIFIER = {140, 141, 142, 143};
|
||||||
public static final int[] TRANSMIT_CHANNEL = { 144,145,146,147,160,161,162,
|
public static final int[] TRANSMIT_CHANNEL = {144, 145, 146, 147, 160, 161, 162, 163, 164, 165, 166, 167};
|
||||||
163,164,165,166,167 };
|
|
||||||
public static final int[] RECEIVE_IDENTIFIER = {168, 169, 170, 171};
|
public static final int[] RECEIVE_IDENTIFIER = {168, 169, 170, 171};
|
||||||
public static final int[] RECEIVE_CHANNEL = { 184,185,186,187,188,189,190,
|
public static final int[] RECEIVE_CHANNEL = {184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195};
|
||||||
191,192,193,194,195 };
|
|
||||||
|
|
||||||
private IBandIdentifier mTransmitIdentifierUpdate;
|
private IBandIdentifier mTransmitIdentifierUpdate;
|
||||||
private IBandIdentifier mReceiveIdentifierUpdate;
|
private IBandIdentifier mReceiveIdentifierUpdate;
|
||||||
@@ -119,13 +126,21 @@ public class NetworkStatusBroadcastExplicit extends TDULinkControlMessage
|
|||||||
|
|
||||||
public long getDownlinkFrequency()
|
public long getDownlinkFrequency()
|
||||||
{
|
{
|
||||||
return calculateDownlink( mTransmitIdentifierUpdate,
|
if(mTransmitIdentifierUpdate != null)
|
||||||
getTransmitChannelNumber() );
|
{
|
||||||
|
return mTransmitIdentifierUpdate.getDownlinkFrequency(getTransmitChannelNumber());
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public long getUplinkFrequency()
|
public long getUplinkFrequency()
|
||||||
{
|
{
|
||||||
return calculateUplink( mReceiveIdentifierUpdate,
|
if(mReceiveIdentifierUpdate != null)
|
||||||
getReceiveChannelNumber() );
|
{
|
||||||
|
return mReceiveIdentifierUpdate.getUplinkFrequency(getReceiveChannelNumber());
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,3 +1,21 @@
|
|||||||
|
/*******************************************************************************
|
||||||
|
* sdrtrunk
|
||||||
|
* Copyright (C) 2014-2017 Dennis Sheirer
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>
|
||||||
|
*
|
||||||
|
******************************************************************************/
|
||||||
package module.decode.p25.message.tdu.lc;
|
package module.decode.p25.message.tdu.lc;
|
||||||
|
|
||||||
import module.decode.p25.message.IBandIdentifier;
|
import module.decode.p25.message.IBandIdentifier;
|
||||||
@@ -5,28 +23,15 @@ import module.decode.p25.message.IdentifierReceiver;
|
|||||||
import module.decode.p25.message.tsbk.osp.control.SystemService;
|
import module.decode.p25.message.tsbk.osp.control.SystemService;
|
||||||
import module.decode.p25.reference.LinkControlOpcode;
|
import module.decode.p25.reference.LinkControlOpcode;
|
||||||
|
|
||||||
import org.slf4j.Logger;
|
public class RFSSStatusBroadcast extends TDULinkControlMessage implements IdentifierReceiver
|
||||||
import org.slf4j.LoggerFactory;
|
|
||||||
|
|
||||||
public class RFSSStatusBroadcast extends TDULinkControlMessage
|
|
||||||
implements IdentifierReceiver
|
|
||||||
{
|
{
|
||||||
private final static Logger mLog =
|
public static final int[] LRA = {72, 73, 74, 75, 88, 89, 90, 91};
|
||||||
LoggerFactory.getLogger( RFSSStatusBroadcast.class );
|
public static final int[] SYSTEM_ID = {96, 97, 98, 99, 112, 113, 114, 115, 116, 117, 118, 119};
|
||||||
|
public static final int[] RFSS_ID = {120, 121, 122, 123, 136, 137, 138, 139};
|
||||||
public static final int[] LRA = { 72,73,74,75,88,89,
|
|
||||||
90,91 };
|
|
||||||
public static final int[] SYSTEM_ID = { 96,97,98,99,112,113,114,115,116,117,
|
|
||||||
118,119 };
|
|
||||||
public static final int[] RFSS_ID = { 120,121,122,123,136,137,138,
|
|
||||||
139 };
|
|
||||||
public static final int[] SITE_ID = {140, 141, 142, 143, 144, 145, 146, 147};
|
public static final int[] SITE_ID = {140, 141, 142, 143, 144, 145, 146, 147};
|
||||||
|
|
||||||
public static final int[] IDENTIFIER = {160, 161, 162, 163};
|
public static final int[] IDENTIFIER = {160, 161, 162, 163};
|
||||||
public static final int[] CHANNEL = { 164,165,166,167,168,169,170,
|
public static final int[] CHANNEL = {164, 165, 166, 167, 168, 169, 170, 171, 184, 185, 186, 187};
|
||||||
171,184,185,186,187 };
|
public static final int[] SYSTEM_SERVICE_CLASS = {188, 189, 190, 191, 192, 193, 194, 195};
|
||||||
public static final int[] SYSTEM_SERVICE_CLASS = { 188,189,190,191,192,193,
|
|
||||||
194,195 };
|
|
||||||
|
|
||||||
private IBandIdentifier mIdentifierUpdate;
|
private IBandIdentifier mIdentifierUpdate;
|
||||||
|
|
||||||
@@ -121,12 +126,21 @@ public class RFSSStatusBroadcast extends TDULinkControlMessage
|
|||||||
|
|
||||||
public long getDownlinkFrequency()
|
public long getDownlinkFrequency()
|
||||||
{
|
{
|
||||||
return calculateDownlink( mIdentifierUpdate, getChannelNumber() );
|
if(mIdentifierUpdate != null)
|
||||||
|
{
|
||||||
|
return mIdentifierUpdate.getDownlinkFrequency(getChannelNumber());
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public long getUplinkFrequency()
|
public long getUplinkFrequency()
|
||||||
{
|
{
|
||||||
return calculateUplink( mIdentifierUpdate, getChannelNumber() );
|
if(mIdentifierUpdate != null)
|
||||||
|
{
|
||||||
|
return mIdentifierUpdate.getUplinkFrequency(getChannelNumber());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,32 +1,42 @@
|
|||||||
|
/*******************************************************************************
|
||||||
|
* sdrtrunk
|
||||||
|
* Copyright (C) 2014-2017 Dennis Sheirer
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>
|
||||||
|
*
|
||||||
|
******************************************************************************/
|
||||||
package module.decode.p25.message.tdu.lc;
|
package module.decode.p25.message.tdu.lc;
|
||||||
|
|
||||||
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.osp.control.SystemService;
|
import module.decode.p25.message.tsbk.osp.control.SystemService;
|
||||||
import module.decode.p25.reference.LinkControlOpcode;
|
import module.decode.p25.reference.LinkControlOpcode;
|
||||||
|
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
public class RFSSStatusBroadcastExplicit extends TDULinkControlMessage
|
public class RFSSStatusBroadcastExplicit extends TDULinkControlMessage implements IdentifierReceiver
|
||||||
implements IdentifierReceiver
|
|
||||||
{
|
{
|
||||||
private final static Logger mLog =
|
private final static Logger mLog = LoggerFactory.getLogger(RFSSStatusBroadcastExplicit.class);
|
||||||
LoggerFactory.getLogger( RFSSStatusBroadcastExplicit.class );
|
|
||||||
|
|
||||||
public static final int[] LRA = {72, 73, 74, 75, 88, 89, 90, 91};
|
public static final int[] LRA = {72, 73, 74, 75, 88, 89, 90, 91};
|
||||||
public static final int[] RECEIVE_IDENTIFIER = {92, 93, 94, 95};
|
public static final int[] RECEIVE_IDENTIFIER = {92, 93, 94, 95};
|
||||||
public static final int[] RECEIVE_CHANNEL = { 96,97,98,99,112,113,114,115,
|
public static final int[] RECEIVE_CHANNEL = {96, 97, 98, 99, 112, 113, 114, 115, 116, 117, 118, 119};
|
||||||
116,117,118,119 };
|
public static final int[] RFSS_ID = {120, 121, 122, 123, 136, 137, 138, 139};
|
||||||
public static final int[] RFSS_ID = { 120,121,122,123,136,137,138,
|
|
||||||
139 };
|
|
||||||
public static final int[] SITE_ID = {140, 141, 142, 143, 144, 145, 146, 147};
|
public static final int[] SITE_ID = {140, 141, 142, 143, 144, 145, 146, 147};
|
||||||
|
|
||||||
public static final int[] TRANSMIT_IDENTIFIER = {160, 161, 162, 163};
|
public static final int[] TRANSMIT_IDENTIFIER = {160, 161, 162, 163};
|
||||||
public static final int[] TRANSMIT_CHANNEL = { 164,165,166,167,168,169,170,
|
public static final int[] TRANSMIT_CHANNEL = {164, 165, 166, 167, 168, 169, 170, 171, 184, 185, 186, 187};
|
||||||
171,184,185,186,187 };
|
public static final int[] SYSTEM_SERVICE_CLASS = {188, 189, 190, 191, 192, 193, 194, 195};
|
||||||
public static final int[] SYSTEM_SERVICE_CLASS = { 188,189,190,191,192,193,
|
|
||||||
194,195 };
|
|
||||||
|
|
||||||
private IBandIdentifier mTransmitIdentifierUpdate;
|
private IBandIdentifier mTransmitIdentifierUpdate;
|
||||||
private IBandIdentifier mReceiveIdentifierUpdate;
|
private IBandIdentifier mReceiveIdentifierUpdate;
|
||||||
@@ -141,12 +151,21 @@ public class RFSSStatusBroadcastExplicit extends TDULinkControlMessage
|
|||||||
|
|
||||||
public long getDownlinkFrequency()
|
public long getDownlinkFrequency()
|
||||||
{
|
{
|
||||||
return calculateDownlink( mTransmitIdentifierUpdate, getTransmitChannelNumber() );
|
if(mTransmitIdentifierUpdate != null)
|
||||||
|
{
|
||||||
|
return mTransmitIdentifierUpdate.getDownlinkFrequency(getTransmitChannelNumber());
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public long getUplinkFrequency()
|
public long getUplinkFrequency()
|
||||||
{
|
{
|
||||||
return calculateUplink( mReceiveIdentifierUpdate, getReceiveChannelNumber() );
|
if(mReceiveIdentifierUpdate != null)
|
||||||
|
{
|
||||||
|
return mReceiveIdentifierUpdate.getUplinkFrequency(getReceiveChannelNumber());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,3 +1,21 @@
|
|||||||
|
/*******************************************************************************
|
||||||
|
* sdrtrunk
|
||||||
|
* Copyright (C) 2014-2017 Dennis Sheirer
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>
|
||||||
|
*
|
||||||
|
******************************************************************************/
|
||||||
package module.decode.p25.message.tdu.lc;
|
package module.decode.p25.message.tdu.lc;
|
||||||
|
|
||||||
import module.decode.p25.message.IBandIdentifier;
|
import module.decode.p25.message.IBandIdentifier;
|
||||||
@@ -5,29 +23,16 @@ import module.decode.p25.message.IdentifierReceiver;
|
|||||||
import module.decode.p25.message.tsbk.osp.control.SystemService;
|
import module.decode.p25.message.tsbk.osp.control.SystemService;
|
||||||
import module.decode.p25.reference.LinkControlOpcode;
|
import module.decode.p25.reference.LinkControlOpcode;
|
||||||
|
|
||||||
import org.slf4j.Logger;
|
public class SecondaryControlChannelBroadcast extends TDULinkControlMessage implements IdentifierReceiver
|
||||||
import org.slf4j.LoggerFactory;
|
|
||||||
|
|
||||||
public class SecondaryControlChannelBroadcast extends TDULinkControlMessage
|
|
||||||
implements IdentifierReceiver
|
|
||||||
{
|
{
|
||||||
private final static Logger mLog =
|
|
||||||
LoggerFactory.getLogger( SecondaryControlChannelBroadcast.class );
|
|
||||||
|
|
||||||
public static final int[] RFSS_ID = {72, 73, 74, 75, 88, 89, 90, 91};
|
public static final int[] RFSS_ID = {72, 73, 74, 75, 88, 89, 90, 91};
|
||||||
public static final int[] SITE_ID = {92, 93, 94, 95, 96, 97, 98, 99};
|
public static final int[] SITE_ID = {92, 93, 94, 95, 96, 97, 98, 99};
|
||||||
public static final int[] IDENTIFIER_A = {112, 113, 114, 115};
|
public static final int[] IDENTIFIER_A = {112, 113, 114, 115};
|
||||||
public static final int[] CHANNEL_A = { 116,117,118,119,120,121,122,
|
public static final int[] CHANNEL_A = {116, 117, 118, 119, 120, 121, 122, 123, 136, 137, 138, 139};
|
||||||
123,136,137,138,139 };
|
public static final int[] SYSTEM_SERVICE_CLASS_A = {140, 141, 142, 143, 144, 145, 146, 147};
|
||||||
|
|
||||||
public static final int[] SYSTEM_SERVICE_CLASS_A = { 140,141,142,143,144,
|
|
||||||
145,146,147 };
|
|
||||||
|
|
||||||
public static final int[] IDENTIFIER_B = {160, 161, 162, 163};
|
public static final int[] IDENTIFIER_B = {160, 161, 162, 163};
|
||||||
public static final int[] CHANNEL_B = { 164,165,166,167,168,169,170,
|
public static final int[] CHANNEL_B = {164, 165, 166, 167, 168, 169, 170, 171, 184, 185, 186, 187};
|
||||||
171,184,185,186,187 };
|
public static final int[] SYSTEM_SERVICE_CLASS_B = {188, 189, 190, 191, 192, 193, 194, 195};
|
||||||
public static final int[] SYSTEM_SERVICE_CLASS_B = { 188,189,190,191,192,
|
|
||||||
193,194,195 };
|
|
||||||
|
|
||||||
private IBandIdentifier mIdentifierProviderA;
|
private IBandIdentifier mIdentifierProviderA;
|
||||||
private IBandIdentifier mIdentifierProviderB;
|
private IBandIdentifier mIdentifierProviderB;
|
||||||
@@ -139,21 +144,41 @@ public class SecondaryControlChannelBroadcast extends TDULinkControlMessage
|
|||||||
|
|
||||||
public long getDownlinkFrequencyA()
|
public long getDownlinkFrequencyA()
|
||||||
{
|
{
|
||||||
return calculateDownlink( mIdentifierProviderA, getChannelA() );
|
if(mIdentifierProviderA != null)
|
||||||
|
{
|
||||||
|
return mIdentifierProviderA.getDownlinkFrequency(getChannelA());
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public long getUplinkFrequencyA()
|
public long getUplinkFrequencyA()
|
||||||
{
|
{
|
||||||
return calculateUplink( mIdentifierProviderA, getChannelA() );
|
if(mIdentifierProviderA != null)
|
||||||
|
{
|
||||||
|
return mIdentifierProviderA.getUplinkFrequency(getChannelA());
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public long getDownlinkFrequencyB()
|
public long getDownlinkFrequencyB()
|
||||||
{
|
{
|
||||||
return calculateDownlink( mIdentifierProviderB, getChannelB() );
|
if(mIdentifierProviderB != null)
|
||||||
|
{
|
||||||
|
return mIdentifierProviderB.getDownlinkFrequency(getChannelB());
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public long getUplinkFrequencyB()
|
public long getUplinkFrequencyB()
|
||||||
{
|
{
|
||||||
return calculateUplink( mIdentifierProviderB, getChannelB() );
|
if(mIdentifierProviderB != null)
|
||||||
|
{
|
||||||
|
return mIdentifierProviderB.getUplinkFrequency(getChannelB());
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,3 +1,21 @@
|
|||||||
|
/*******************************************************************************
|
||||||
|
* sdrtrunk
|
||||||
|
* Copyright (C) 2014-2017 Dennis Sheirer
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>
|
||||||
|
*
|
||||||
|
******************************************************************************/
|
||||||
package module.decode.p25.message.tdu.lc;
|
package module.decode.p25.message.tdu.lc;
|
||||||
|
|
||||||
import module.decode.p25.message.IBandIdentifier;
|
import module.decode.p25.message.IBandIdentifier;
|
||||||
@@ -5,25 +23,15 @@ import module.decode.p25.message.IdentifierReceiver;
|
|||||||
import module.decode.p25.message.tsbk.osp.control.SystemService;
|
import module.decode.p25.message.tsbk.osp.control.SystemService;
|
||||||
import module.decode.p25.reference.LinkControlOpcode;
|
import module.decode.p25.reference.LinkControlOpcode;
|
||||||
|
|
||||||
import org.slf4j.Logger;
|
public class SecondaryControlChannelBroadcastExplicit extends TDULinkControlMessage implements IdentifierReceiver
|
||||||
import org.slf4j.LoggerFactory;
|
|
||||||
|
|
||||||
public class SecondaryControlChannelBroadcastExplicit
|
|
||||||
extends TDULinkControlMessage implements IdentifierReceiver
|
|
||||||
{
|
{
|
||||||
private final static Logger mLog =
|
|
||||||
LoggerFactory.getLogger( SecondaryControlChannelBroadcastExplicit.class );
|
|
||||||
|
|
||||||
public static final int[] RFSS_ID = {72, 73, 74, 75, 88, 89, 90, 91};
|
public static final int[] RFSS_ID = {72, 73, 74, 75, 88, 89, 90, 91};
|
||||||
public static final int[] SITE_ID = {92, 93, 94, 95, 96, 97, 98, 99};
|
public static final int[] SITE_ID = {92, 93, 94, 95, 96, 97, 98, 99};
|
||||||
public static final int[] TRANSMIT_IDENTIFIER = {112, 113, 114, 115};
|
public static final int[] TRANSMIT_IDENTIFIER = {112, 113, 114, 115};
|
||||||
public static final int[] TRANSMIT_CHANNEL = { 116,117,118,119,120,121,122,
|
public static final int[] TRANSMIT_CHANNEL = {116, 117, 118, 119, 120, 121, 122, 123, 136, 137, 138, 139};
|
||||||
123,136,137,138,139 };
|
|
||||||
public static final int[] RECEIVE_IDENTIFIER = {140, 141, 142, 143};
|
public static final int[] RECEIVE_IDENTIFIER = {140, 141, 142, 143};
|
||||||
public static final int[] RECEIVE_CHANNEL = { 144,145,146,147,160,161,162,
|
public static final int[] RECEIVE_CHANNEL = {144, 145, 146, 147, 160, 161, 162, 163, 164, 165, 166, 167};
|
||||||
163,164,165,166,167 };
|
public static final int[] SYSTEM_SERVICE_CLASS = {168, 169, 170, 171, 184, 185, 186, 187};
|
||||||
public static final int[] SYSTEM_SERVICE_CLASS = { 168,169,170,171,184,
|
|
||||||
185,186,187 };
|
|
||||||
|
|
||||||
private IBandIdentifier mTransmitIdentifierProvider;
|
private IBandIdentifier mTransmitIdentifierProvider;
|
||||||
private IBandIdentifier mReceiveIdentifierProvider;
|
private IBandIdentifier mReceiveIdentifierProvider;
|
||||||
@@ -128,13 +136,21 @@ public class SecondaryControlChannelBroadcastExplicit
|
|||||||
|
|
||||||
public long getDownlinkFrequency()
|
public long getDownlinkFrequency()
|
||||||
{
|
{
|
||||||
return calculateDownlink( mTransmitIdentifierProvider,
|
if(mTransmitIdentifierProvider != null)
|
||||||
getTransmitChannelNumber() );
|
{
|
||||||
|
return mTransmitIdentifierProvider.getDownlinkFrequency(getTransmitChannelNumber());
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public long getUplinkFrequency()
|
public long getUplinkFrequency()
|
||||||
{
|
{
|
||||||
return calculateUplink( mReceiveIdentifierProvider,
|
if(mReceiveIdentifierProvider != null)
|
||||||
getReceiveChannelNumber() );
|
{
|
||||||
|
return mReceiveIdentifierProvider.getUplinkFrequency(getReceiveChannelNumber());
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,28 +1,55 @@
|
|||||||
|
/*******************************************************************************
|
||||||
|
* sdrtrunk
|
||||||
|
* Copyright (C) 2014-2017 Dennis Sheirer
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>
|
||||||
|
*
|
||||||
|
******************************************************************************/
|
||||||
package module.decode.p25.message.tsbk;
|
package module.decode.p25.message.tsbk;
|
||||||
|
|
||||||
|
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.reference.DataUnitID;
|
import module.decode.p25.reference.DataUnitID;
|
||||||
import alias.AliasList;
|
|
||||||
import bits.BinaryMessage;
|
|
||||||
|
|
||||||
public abstract class ChannelGrant extends ServiceMessage
|
public abstract class ChannelGrant extends ServiceMessage implements IdentifierReceiver
|
||||||
implements IdentifierReceiver
|
|
||||||
{
|
{
|
||||||
public static final int[] PRIORITY = {85, 86, 87};
|
public static final int[] PRIORITY = {85, 86, 87};
|
||||||
public static final int[] CHANNEL_IDENTIFIER = {88, 89, 90, 91};
|
public static final int[] CHANNEL_IDENTIFIER = {88, 89, 90, 91};
|
||||||
public static final int[] CHANNEL_NUMBER = { 92,93,94,95,96,97,98,99,100,
|
public static final int[] CHANNEL_NUMBER = {92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103};
|
||||||
101,102,103 };
|
|
||||||
|
|
||||||
private IBandIdentifier mIdentifierUpdate;
|
private IBandIdentifier mIdentifierUpdate;
|
||||||
|
|
||||||
public ChannelGrant( BinaryMessage message,
|
public ChannelGrant(BinaryMessage message, DataUnitID duid, AliasList aliasList)
|
||||||
DataUnitID duid,
|
|
||||||
AliasList aliasList )
|
|
||||||
{
|
{
|
||||||
super(message, duid, aliasList);
|
super(message, duid, aliasList);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Indicates if this channel grant is for a TDMA channel
|
||||||
|
*/
|
||||||
|
public boolean isTDMAChannel()
|
||||||
|
{
|
||||||
|
if(mIdentifierUpdate != null)
|
||||||
|
{
|
||||||
|
return mIdentifierUpdate.isTDMA();
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 1 = Lowest, 4 = Default, 7 = Highest
|
* 1 = Lowest, 4 = Default, 7 = Highest
|
||||||
*/
|
*/
|
||||||
@@ -63,12 +90,21 @@ public abstract class ChannelGrant extends ServiceMessage
|
|||||||
|
|
||||||
public long getDownlinkFrequency()
|
public long getDownlinkFrequency()
|
||||||
{
|
{
|
||||||
return calculateDownlink( mIdentifierUpdate, getChannelNumber() );
|
if(mIdentifierUpdate != null)
|
||||||
|
{
|
||||||
|
return mIdentifierUpdate.getDownlinkFrequency(getChannelNumber());
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public long getUplinkFrequency()
|
public long getUplinkFrequency()
|
||||||
{
|
{
|
||||||
return calculateUplink( mIdentifierUpdate, getChannelNumber() );
|
if(mIdentifierUpdate != null)
|
||||||
|
{
|
||||||
|
return mIdentifierUpdate.getUplinkFrequency(getChannelNumber());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,31 +1,56 @@
|
|||||||
|
/*******************************************************************************
|
||||||
|
* sdrtrunk
|
||||||
|
* Copyright (C) 2014-2017 Dennis Sheirer
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>
|
||||||
|
*
|
||||||
|
******************************************************************************/
|
||||||
package module.decode.p25.message.tsbk;
|
package module.decode.p25.message.tsbk;
|
||||||
|
|
||||||
import module.decode.p25.message.IBandIdentifier;
|
|
||||||
import module.decode.p25.reference.DataUnitID;
|
|
||||||
import alias.AliasList;
|
import alias.AliasList;
|
||||||
import bits.BinaryMessage;
|
import bits.BinaryMessage;
|
||||||
|
import module.decode.p25.message.IBandIdentifier;
|
||||||
|
import module.decode.p25.reference.DataUnitID;
|
||||||
|
|
||||||
public abstract class GroupChannelGrantExplicit extends ChannelGrant
|
public abstract class GroupChannelGrantExplicit extends ChannelGrant
|
||||||
{
|
{
|
||||||
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,
|
public static final int[] TRANSMIT_NUMBER = {100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111};
|
||||||
104,105,106,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,
|
public static final int[] RECEIVE_NUMBER = {116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127};
|
||||||
120,121,122,123,124,125,126,127 };
|
public static final int[] GROUP_ADDRESS = {128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141,
|
||||||
public static final int[] GROUP_ADDRESS = { 128,129,130,131,132,133,134,135,
|
142, 143};
|
||||||
136,137,138,139,140,141,142,143 };
|
|
||||||
|
|
||||||
private IBandIdentifier mTransmitIdentifierUpdate;
|
private IBandIdentifier mTransmitIdentifierUpdate;
|
||||||
private IBandIdentifier mReceiveIdentifierUpdate;
|
private IBandIdentifier mReceiveIdentifierUpdate;
|
||||||
|
|
||||||
public GroupChannelGrantExplicit( BinaryMessage message,
|
public GroupChannelGrantExplicit(BinaryMessage message, DataUnitID duid, AliasList aliasList)
|
||||||
DataUnitID duid,
|
|
||||||
AliasList aliasList )
|
|
||||||
{
|
{
|
||||||
super(message, duid, aliasList);
|
super(message, duid, aliasList);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isTDMAChannel()
|
||||||
|
{
|
||||||
|
if(mTransmitIdentifierUpdate != null)
|
||||||
|
{
|
||||||
|
return mTransmitIdentifierUpdate.isTDMA();
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
public String getMessage()
|
public String getMessage()
|
||||||
{
|
{
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
@@ -110,11 +135,21 @@ public abstract class GroupChannelGrantExplicit extends ChannelGrant
|
|||||||
|
|
||||||
public long getDownlinkFrequency()
|
public long getDownlinkFrequency()
|
||||||
{
|
{
|
||||||
return calculateDownlink( mTransmitIdentifierUpdate, getTransmitChannelNumber() );
|
if(mTransmitIdentifierUpdate != null)
|
||||||
|
{
|
||||||
|
return mTransmitIdentifierUpdate.getDownlinkFrequency(getTransmitChannelNumber());
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public long getUplinkFrequency()
|
public long getUplinkFrequency()
|
||||||
{
|
{
|
||||||
return calculateUplink( mReceiveIdentifierUpdate, getReceiveChannelNumber() );
|
if(mReceiveIdentifierUpdate != null)
|
||||||
|
{
|
||||||
|
return mReceiveIdentifierUpdate.getUplinkFrequency(getReceiveChannelNumber());
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,32 +1,42 @@
|
|||||||
|
/*******************************************************************************
|
||||||
|
* sdrtrunk
|
||||||
|
* Copyright (C) 2014-2017 Dennis Sheirer
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>
|
||||||
|
*
|
||||||
|
******************************************************************************/
|
||||||
package module.decode.p25.message.tsbk;
|
package module.decode.p25.message.tsbk;
|
||||||
|
|
||||||
|
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.reference.DataUnitID;
|
import module.decode.p25.reference.DataUnitID;
|
||||||
import alias.AliasList;
|
|
||||||
import bits.BinaryMessage;
|
|
||||||
|
|
||||||
public abstract class GroupMultiChannelGrant extends ChannelGrant
|
public abstract class GroupMultiChannelGrant extends ChannelGrant implements IdentifierReceiver
|
||||||
implements IdentifierReceiver
|
|
||||||
{
|
{
|
||||||
public static final int[] CHANNEL_IDENTIFIER_1 = {80, 81, 82, 83};
|
public static final int[] CHANNEL_IDENTIFIER_1 = {80, 81, 82, 83};
|
||||||
public static final int[] CHANNEL_NUMBER_1 = { 84,85,86,87,
|
public static final int[] CHANNEL_NUMBER_1 = {84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95};
|
||||||
88,89,90,91,92,93,94,95 };
|
public static final int[] GROUP_ADDRESS_1 = {96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111};
|
||||||
public static final int[] GROUP_ADDRESS_1 = { 96,97,98,99,100,101,102,103,
|
|
||||||
104,105,106,107,108,109,110,111 };
|
|
||||||
|
|
||||||
public static final int[] CHANNEL_IDENTIFIER_2 = {112, 113, 114, 115};
|
public static final int[] CHANNEL_IDENTIFIER_2 = {112, 113, 114, 115};
|
||||||
public static final int[] CHANNEL_NUMBER_2 = { 116,117,118,119,120,121,122,
|
public static final int[] CHANNEL_NUMBER_2 = {116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127};
|
||||||
123,124,125,126,127 };
|
public static final int[] GROUP_ADDRESS_2 = {128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143};
|
||||||
public static final int[] GROUP_ADDRESS_2 = { 128,129,130,131,132,133,134,
|
|
||||||
135,136,137,138,139,140,141,142,143 };
|
|
||||||
|
|
||||||
private IBandIdentifier mIdentifierUpdate1;
|
private IBandIdentifier mIdentifierUpdate1;
|
||||||
private IBandIdentifier mIdentifierUpdate2;
|
private IBandIdentifier mIdentifierUpdate2;
|
||||||
|
|
||||||
public GroupMultiChannelGrant( BinaryMessage message,
|
public GroupMultiChannelGrant(BinaryMessage message, DataUnitID duid, AliasList aliasList)
|
||||||
DataUnitID duid,
|
|
||||||
AliasList aliasList )
|
|
||||||
{
|
{
|
||||||
super(message, duid, aliasList);
|
super(message, duid, aliasList);
|
||||||
}
|
}
|
||||||
@@ -149,22 +159,62 @@ public abstract class GroupMultiChannelGrant extends ChannelGrant
|
|||||||
|
|
||||||
public long getDownlinkFrequency1()
|
public long getDownlinkFrequency1()
|
||||||
{
|
{
|
||||||
return calculateDownlink( mIdentifierUpdate1, getChannelNumber1() );
|
if(mIdentifierUpdate1 != null)
|
||||||
|
{
|
||||||
|
return mIdentifierUpdate1.getDownlinkFrequency(getChannelNumber1());
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isTDMAChannel1()
|
||||||
|
{
|
||||||
|
if(mIdentifierUpdate1 != null)
|
||||||
|
{
|
||||||
|
return mIdentifierUpdate1.isTDMA();
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public long getUplinkFrequency1()
|
public long getUplinkFrequency1()
|
||||||
{
|
{
|
||||||
return calculateUplink( mIdentifierUpdate1, getChannelNumber1() );
|
if(mIdentifierUpdate1 != null)
|
||||||
|
{
|
||||||
|
return mIdentifierUpdate1.getUplinkFrequency(getChannelNumber1());
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public long getDownlinkFrequency2()
|
public long getDownlinkFrequency2()
|
||||||
{
|
{
|
||||||
return calculateDownlink( mIdentifierUpdate2, getChannelNumber2() );
|
if(mIdentifierUpdate2 != null)
|
||||||
|
{
|
||||||
|
return mIdentifierUpdate2.getDownlinkFrequency(getChannelNumber2());
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isTDMAChannel2()
|
||||||
|
{
|
||||||
|
if(mIdentifierUpdate2 != null)
|
||||||
|
{
|
||||||
|
return mIdentifierUpdate2.isTDMA();
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public long getUplinkFrequency2()
|
public long getUplinkFrequency2()
|
||||||
{
|
{
|
||||||
return calculateUplink( mIdentifierUpdate2, getChannelNumber2() );
|
if(mIdentifierUpdate2 != null)
|
||||||
|
{
|
||||||
|
return mIdentifierUpdate2.getUplinkFrequency(getChannelNumber2());
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,21 +1,36 @@
|
|||||||
|
/*******************************************************************************
|
||||||
|
* sdrtrunk
|
||||||
|
* Copyright (C) 2014-2017 Dennis Sheirer
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>
|
||||||
|
*
|
||||||
|
******************************************************************************/
|
||||||
package module.decode.p25.message.tsbk;
|
package module.decode.p25.message.tsbk;
|
||||||
|
|
||||||
import module.decode.p25.reference.DataUnitID;
|
|
||||||
import alias.Alias;
|
import alias.Alias;
|
||||||
import alias.AliasList;
|
import alias.AliasList;
|
||||||
import bits.BinaryMessage;
|
import bits.BinaryMessage;
|
||||||
|
import module.decode.p25.reference.DataUnitID;
|
||||||
|
|
||||||
public abstract class UnitChannelGrant extends ChannelGrant
|
public abstract class UnitChannelGrant extends ChannelGrant
|
||||||
{
|
{
|
||||||
public static final int[] TARGET_ADDRESS = { 96,97,98,99,100,101,102,103,
|
public static final int[] TARGET_ADDRESS = {96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110,
|
||||||
104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119 };
|
111, 112, 113, 114, 115, 116, 117, 118, 119};
|
||||||
|
public static final int[] SOURCE_ADDRESS = {120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133,
|
||||||
|
134, 135, 136, 137, 138, 139, 140, 141, 142, 143};
|
||||||
|
|
||||||
public static final int[] SOURCE_ADDRESS = { 120,121,122,123,124,125,126,
|
public UnitChannelGrant(BinaryMessage message, DataUnitID duid, AliasList aliasList)
|
||||||
127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143 };
|
|
||||||
|
|
||||||
public UnitChannelGrant( BinaryMessage message,
|
|
||||||
DataUnitID duid,
|
|
||||||
AliasList aliasList )
|
|
||||||
{
|
{
|
||||||
super(message, duid, aliasList);
|
super(message, duid, aliasList);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,13 +1,30 @@
|
|||||||
|
/*******************************************************************************
|
||||||
|
* sdrtrunk
|
||||||
|
* Copyright (C) 2014-2017 Dennis Sheirer
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>
|
||||||
|
*
|
||||||
|
******************************************************************************/
|
||||||
package module.decode.p25.message.tsbk.motorola;
|
package module.decode.p25.message.tsbk.motorola;
|
||||||
|
|
||||||
|
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.reference.DataUnitID;
|
import module.decode.p25.reference.DataUnitID;
|
||||||
import alias.AliasList;
|
|
||||||
import bits.BinaryMessage;
|
|
||||||
|
|
||||||
public class ControlChannelBaseStationIdentification extends MotorolaTSBKMessage
|
public class ControlChannelBaseStationIdentification extends MotorolaTSBKMessage implements IdentifierReceiver
|
||||||
implements IdentifierReceiver
|
|
||||||
{
|
{
|
||||||
public static final int[] CHARACTER_1 = {80, 81, 82, 83, 84, 85};
|
public static final int[] CHARACTER_1 = {80, 81, 82, 83, 84, 85};
|
||||||
public static final int[] CHARACTER_2 = {86, 87, 88, 89, 90, 91};
|
public static final int[] CHARACTER_2 = {86, 87, 88, 89, 90, 91};
|
||||||
@@ -19,14 +36,11 @@ public class ControlChannelBaseStationIdentification extends MotorolaTSBKMessage
|
|||||||
public static final int[] CHARACTER_8 = {122, 123, 124, 125, 126, 127};
|
public static final int[] CHARACTER_8 = {122, 123, 124, 125, 126, 127};
|
||||||
|
|
||||||
public static final int[] IDENTIFIER = {128, 129, 130, 131};
|
public static final int[] IDENTIFIER = {128, 129, 130, 131};
|
||||||
public static final int[] CHANNEL = { 132,133,134,135,136,137,138,139,140,
|
public static final int[] CHANNEL = {132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143};
|
||||||
141,142,143 };
|
|
||||||
|
|
||||||
private IBandIdentifier mIdentifierUpdate;
|
private IBandIdentifier mIdentifierUpdate;
|
||||||
|
|
||||||
public ControlChannelBaseStationIdentification( BinaryMessage message,
|
public ControlChannelBaseStationIdentification(BinaryMessage message, DataUnitID duid, AliasList aliasList)
|
||||||
DataUnitID duid,
|
|
||||||
AliasList aliasList )
|
|
||||||
{
|
{
|
||||||
super(message, duid, aliasList);
|
super(message, duid, aliasList);
|
||||||
}
|
}
|
||||||
@@ -95,12 +109,22 @@ public class ControlChannelBaseStationIdentification extends MotorolaTSBKMessage
|
|||||||
|
|
||||||
public long getUplinkFrequency()
|
public long getUplinkFrequency()
|
||||||
{
|
{
|
||||||
return calculateUplink( mIdentifierUpdate, getChannel() );
|
if(mIdentifierUpdate != null)
|
||||||
|
{
|
||||||
|
mIdentifierUpdate.getUplinkFrequency(getChannel());
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public long getDownlinkFrequency()
|
public long getDownlinkFrequency()
|
||||||
{
|
{
|
||||||
return calculateDownlink( mIdentifierUpdate, getChannel() );
|
if(mIdentifierUpdate != null)
|
||||||
|
{
|
||||||
|
mIdentifierUpdate.getDownlinkFrequency(getChannel());
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -1,13 +1,30 @@
|
|||||||
|
/*******************************************************************************
|
||||||
|
* sdrtrunk
|
||||||
|
* Copyright (C) 2014-2017 Dennis Sheirer
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>
|
||||||
|
*
|
||||||
|
******************************************************************************/
|
||||||
package module.decode.p25.message.tsbk.motorola;
|
package module.decode.p25.message.tsbk.motorola;
|
||||||
|
|
||||||
|
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.reference.DataUnitID;
|
import module.decode.p25.reference.DataUnitID;
|
||||||
import alias.AliasList;
|
|
||||||
import bits.BinaryMessage;
|
|
||||||
|
|
||||||
public class PatchGroupVoiceChannelGrant extends MotorolaTSBKMessage
|
public class PatchGroupVoiceChannelGrant extends MotorolaTSBKMessage implements IdentifierReceiver
|
||||||
implements IdentifierReceiver
|
|
||||||
{
|
{
|
||||||
/* Service Options */
|
/* Service Options */
|
||||||
public static final int EMERGENCY_FLAG = 80;
|
public static final int EMERGENCY_FLAG = 80;
|
||||||
@@ -18,19 +35,28 @@ public class PatchGroupVoiceChannelGrant extends MotorolaTSBKMessage
|
|||||||
public static final int[] PRIORITY = {85, 86, 87};
|
public static final int[] PRIORITY = {85, 86, 87};
|
||||||
public static final int[] IDENTIFIER = {88, 89, 90, 91};
|
public static final int[] IDENTIFIER = {88, 89, 90, 91};
|
||||||
public static final int[] CHANNEL = {92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103};
|
public static final int[] CHANNEL = {92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103};
|
||||||
public static final int[] PATCH_GROUP_ADDRESS = { 104,105,106,107,108,109,
|
public static final int[] PATCH_GROUP_ADDRESS = {104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116,
|
||||||
110,111,112,113,114,115,116,117,118,119 };
|
117, 118, 119};
|
||||||
public static final int[] SOURCE_ADDRESS = { 120,121,122,123,124,125,126,
|
public static final int[] SOURCE_ADDRESS = {120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133,
|
||||||
127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143 };
|
134, 135, 136, 137, 138, 139, 140, 141, 142, 143};
|
||||||
|
|
||||||
private IBandIdentifier mIdentifierUpdate;
|
private IBandIdentifier mIdentifierUpdate;
|
||||||
|
|
||||||
public PatchGroupVoiceChannelGrant( BinaryMessage message, DataUnitID duid,
|
public PatchGroupVoiceChannelGrant(BinaryMessage message, DataUnitID duid, AliasList aliasList)
|
||||||
AliasList aliasList )
|
|
||||||
{
|
{
|
||||||
super(message, duid, aliasList);
|
super(message, duid, aliasList);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean isTDMAChannel()
|
||||||
|
{
|
||||||
|
if(mIdentifierUpdate != null)
|
||||||
|
{
|
||||||
|
return mIdentifierUpdate.isTDMA();
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getEventType()
|
public String getEventType()
|
||||||
{
|
{
|
||||||
@@ -140,12 +166,22 @@ public class PatchGroupVoiceChannelGrant extends MotorolaTSBKMessage
|
|||||||
|
|
||||||
public long getDownlinkFrequency()
|
public long getDownlinkFrequency()
|
||||||
{
|
{
|
||||||
return calculateDownlink( mIdentifierUpdate, getChannelNumber() );
|
if(mIdentifierUpdate != null)
|
||||||
|
{
|
||||||
|
return mIdentifierUpdate.getDownlinkFrequency(getChannelNumber());
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public long getUplinkFrequency()
|
public long getUplinkFrequency()
|
||||||
{
|
{
|
||||||
return calculateUplink( mIdentifierUpdate, getChannelNumber() );
|
if(mIdentifierUpdate != null)
|
||||||
|
{
|
||||||
|
return mIdentifierUpdate.getUplinkFrequency(getChannelNumber());
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,30 +1,42 @@
|
|||||||
|
/*******************************************************************************
|
||||||
|
* sdrtrunk
|
||||||
|
* Copyright (C) 2014-2017 Dennis Sheirer
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>
|
||||||
|
*
|
||||||
|
******************************************************************************/
|
||||||
package module.decode.p25.message.tsbk.motorola;
|
package module.decode.p25.message.tsbk.motorola;
|
||||||
|
|
||||||
|
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.reference.DataUnitID;
|
import module.decode.p25.reference.DataUnitID;
|
||||||
import alias.AliasList;
|
|
||||||
import bits.BinaryMessage;
|
|
||||||
|
|
||||||
public class PatchGroupVoiceChannelGrantUpdate extends MotorolaTSBKMessage
|
public class PatchGroupVoiceChannelGrantUpdate extends MotorolaTSBKMessage implements IdentifierReceiver
|
||||||
implements IdentifierReceiver
|
|
||||||
{
|
{
|
||||||
public static final int[] IDENTIFIER_1 = {80, 81, 82, 83};
|
public static final int[] IDENTIFIER_1 = {80, 81, 82, 83};
|
||||||
public static final int[] CHANNEL_1 = { 84,85,86,87,88,89,90,91,92,93,94,
|
public static final int[] CHANNEL_1 = {84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95};
|
||||||
95 };
|
public static final int[] PATCH_GROUP_ADDRESS_1 = {96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111};
|
||||||
public static final int[] PATCH_GROUP_ADDRESS_1 = { 96,97,98,99,100,101,102,
|
|
||||||
103,104,105,106,107,108,109,110,111 };
|
|
||||||
public static final int[] IDENTIFIER_2 = {112, 113, 114, 115};
|
public static final int[] IDENTIFIER_2 = {112, 113, 114, 115};
|
||||||
public static final int[] CHANNEL_2 = { 116,117,118,119,120,121,122,123,
|
public static final int[] CHANNEL_2 = {116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127};
|
||||||
124,125,126,127 };
|
public static final int[] PATCH_GROUP_ADDRESS_2 = {128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143};
|
||||||
public static final int[] PATCH_GROUP_ADDRESS_2 = { 128,129,130,131,132,133,
|
|
||||||
134,135,136,137,138,139,140,141,142,143 };
|
|
||||||
|
|
||||||
private IBandIdentifier mIdentifierUpdate1;
|
private IBandIdentifier mIdentifierUpdate1;
|
||||||
private IBandIdentifier mIdentifierUpdate2;
|
private IBandIdentifier mIdentifierUpdate2;
|
||||||
|
|
||||||
public PatchGroupVoiceChannelGrantUpdate( BinaryMessage message,
|
public PatchGroupVoiceChannelGrantUpdate(BinaryMessage message, DataUnitID duid, AliasList aliasList)
|
||||||
DataUnitID duid, AliasList aliasList )
|
|
||||||
{
|
{
|
||||||
super(message, duid, aliasList);
|
super(message, duid, aliasList);
|
||||||
}
|
}
|
||||||
@@ -125,22 +137,61 @@ public class PatchGroupVoiceChannelGrantUpdate extends MotorolaTSBKMessage
|
|||||||
|
|
||||||
public long getDownlinkFrequency1()
|
public long getDownlinkFrequency1()
|
||||||
{
|
{
|
||||||
return calculateDownlink( mIdentifierUpdate1, getChannelNumber1() );
|
if(mIdentifierUpdate1 != null)
|
||||||
|
{
|
||||||
|
return mIdentifierUpdate1.getDownlinkFrequency(getChannelNumber1());
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isTDMAChannel1()
|
||||||
|
{
|
||||||
|
if(mIdentifierUpdate1 != null)
|
||||||
|
{
|
||||||
|
return mIdentifierUpdate1.isTDMA();
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public long getUplinkFrequency1()
|
public long getUplinkFrequency1()
|
||||||
{
|
{
|
||||||
return calculateUplink( mIdentifierUpdate1, getChannelNumber1() );
|
if(mIdentifierUpdate1 != null)
|
||||||
|
{
|
||||||
|
return mIdentifierUpdate1.getUplinkFrequency(getChannelNumber1());
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public long getDownlinkFrequency2()
|
public long getDownlinkFrequency2()
|
||||||
{
|
{
|
||||||
return calculateDownlink( mIdentifierUpdate2, getChannelNumber2() );
|
if(mIdentifierUpdate2 != null)
|
||||||
|
{
|
||||||
|
return mIdentifierUpdate2.getDownlinkFrequency(getChannelNumber2());
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isTDMAChannel2()
|
||||||
|
{
|
||||||
|
if(mIdentifierUpdate2 != null)
|
||||||
|
{
|
||||||
|
return mIdentifierUpdate2.isTDMA();
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public long getUplinkFrequency2()
|
public long getUplinkFrequency2()
|
||||||
{
|
{
|
||||||
return calculateUplink( mIdentifierUpdate2, getChannelNumber2() );
|
if(mIdentifierUpdate2 != null)
|
||||||
|
{
|
||||||
|
return mIdentifierUpdate2.getUplinkFrequency(getChannelNumber2());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,38 +1,49 @@
|
|||||||
|
/*******************************************************************************
|
||||||
|
* sdrtrunk
|
||||||
|
* Copyright (C) 2014-2017 Dennis Sheirer
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>
|
||||||
|
*
|
||||||
|
******************************************************************************/
|
||||||
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.IAdjacentSite;
|
import module.decode.p25.message.IAdjacentSite;
|
||||||
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 alias.AliasList;
|
|
||||||
import bits.BinaryMessage;
|
|
||||||
|
|
||||||
public class AdjacentStatusBroadcast extends TSBKMessage
|
public class AdjacentStatusBroadcast extends TSBKMessage implements IdentifierReceiver, IAdjacentSite
|
||||||
implements IdentifierReceiver, IAdjacentSite
|
|
||||||
{
|
{
|
||||||
public static final int[] LOCATION_REGISTRATION_AREA = { 80,81,82,83,84,85,
|
public static final int[] LOCATION_REGISTRATION_AREA = {80, 81, 82, 83, 84, 85, 86, 87};
|
||||||
86,87 };
|
|
||||||
public static final int CONVENTIONAL_CHANNEL_FLAG = 88;
|
public static final int CONVENTIONAL_CHANNEL_FLAG = 88;
|
||||||
public static final int SITE_FAILURE_CONDITION_FLAG = 89;
|
public static final int SITE_FAILURE_CONDITION_FLAG = 89;
|
||||||
public static final int VALID_FLAG = 90;
|
public static final int VALID_FLAG = 90;
|
||||||
public static final int ACTIVE_NETWORK_CONNECTION_FLAG = 91;
|
public static final int ACTIVE_NETWORK_CONNECTION_FLAG = 91;
|
||||||
public static final int[] SYSTEM_ID = { 92,93,94,95,96,97,98,99,100,101,
|
public static final int[] SYSTEM_ID = {92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103};
|
||||||
102,103 };
|
|
||||||
public static final int[] RFSS_ID = {104, 105, 106, 107, 108, 109, 110, 111};
|
public static final int[] RFSS_ID = {104, 105, 106, 107, 108, 109, 110, 111};
|
||||||
public static final int[] SITE_ID = {112, 113, 114, 115, 116, 117, 118, 119};
|
public static final int[] SITE_ID = {112, 113, 114, 115, 116, 117, 118, 119};
|
||||||
public static final int[] IDENTIFIER = {120, 121, 122, 123};
|
public static final int[] IDENTIFIER = {120, 121, 122, 123};
|
||||||
public static final int[] CHANNEL = { 124,125,126,127,128,129,130,131,132,
|
public static final int[] CHANNEL = {124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135};
|
||||||
133,134,135 };
|
public static final int[] SYSTEM_SERVICE_CLASS = {136, 137, 138, 139, 140, 141, 142, 143};
|
||||||
public static final int[] SYSTEM_SERVICE_CLASS = { 136,137,138,139,140,141,
|
|
||||||
142,143 };
|
|
||||||
|
|
||||||
private IBandIdentifier mIdentifierUpdate;
|
private IBandIdentifier mIdentifierUpdate;
|
||||||
|
|
||||||
public AdjacentStatusBroadcast( BinaryMessage message,
|
public AdjacentStatusBroadcast(BinaryMessage message, DataUnitID duid, AliasList aliasList)
|
||||||
DataUnitID duid,
|
|
||||||
AliasList aliasList )
|
|
||||||
{
|
{
|
||||||
super(message, duid, aliasList);
|
super(message, duid, aliasList);
|
||||||
}
|
}
|
||||||
@@ -168,12 +179,22 @@ public class AdjacentStatusBroadcast extends TSBKMessage
|
|||||||
|
|
||||||
public long getDownlinkFrequency()
|
public long getDownlinkFrequency()
|
||||||
{
|
{
|
||||||
return calculateDownlink( mIdentifierUpdate, getChannel() );
|
if(mIdentifierUpdate != null)
|
||||||
|
{
|
||||||
|
return mIdentifierUpdate.getDownlinkFrequency(getChannel());
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public long getUplinkFrequency()
|
public long getUplinkFrequency()
|
||||||
{
|
{
|
||||||
return calculateUplink( mIdentifierUpdate, getChannel() );
|
if(mIdentifierUpdate != null)
|
||||||
|
{
|
||||||
|
return mIdentifierUpdate.getUplinkFrequency(getChannel());
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,21 @@
|
|||||||
|
/*******************************************************************************
|
||||||
|
* sdrtrunk
|
||||||
|
* Copyright (C) 2014-2017 Dennis Sheirer
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>
|
||||||
|
*
|
||||||
|
******************************************************************************/
|
||||||
package module.decode.p25.message.tsbk.osp.control;
|
package module.decode.p25.message.tsbk.osp.control;
|
||||||
|
|
||||||
import module.decode.p25.message.IBandIdentifier;
|
import module.decode.p25.message.IBandIdentifier;
|
||||||
@@ -6,8 +24,7 @@ import module.decode.p25.reference.DataUnitID;
|
|||||||
import alias.AliasList;
|
import alias.AliasList;
|
||||||
import bits.BinaryMessage;
|
import bits.BinaryMessage;
|
||||||
|
|
||||||
public abstract class IdentifierUpdate extends TSBKMessage
|
public abstract class IdentifierUpdate extends TSBKMessage implements IBandIdentifier
|
||||||
implements IBandIdentifier
|
|
||||||
{
|
{
|
||||||
public static final int[] IDENTIFIER = { 80,81,82,83 };
|
public static final int[] IDENTIFIER = { 80,81,82,83 };
|
||||||
|
|
||||||
@@ -45,4 +62,22 @@ public abstract class IdentifierUpdate extends TSBKMessage
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public abstract long getTransmitOffset();
|
public abstract long getTransmitOffset();
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public long getDownlinkFrequency(int channelNumber)
|
||||||
|
{
|
||||||
|
return getBaseFrequency() + ( channelNumber * getChannelSpacing() );
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public long getUplinkFrequency(int channelNumber)
|
||||||
|
{
|
||||||
|
return getDownlinkFrequency(channelNumber) + getTransmitOffset();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isTDMA()
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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,8 +30,16 @@ 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() );
|
return sb.toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
public String toString()
|
||||||
|
{
|
||||||
|
StringBuilder sb = new StringBuilder();
|
||||||
|
|
||||||
|
sb.append( " ID:" + getIdentifier() );
|
||||||
sb.append( " BASE:" + getBaseFrequency() );
|
sb.append( " BASE:" + getBaseFrequency() );
|
||||||
sb.append( " BW:" + getBandwidth() );
|
sb.append( " BW:" + getBandwidth() );
|
||||||
sb.append( " SPACING:" + getChannelSpacing() );
|
sb.append( " SPACING:" + getChannelSpacing() );
|
||||||
@@ -73,6 +81,25 @@ public class IdentifierUpdateTDMA extends IdentifierUpdate
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public long getDownlinkFrequency(int channelNumber)
|
||||||
|
{
|
||||||
|
if(isTDMA())
|
||||||
|
{
|
||||||
|
return getBaseFrequency() + ( (channelNumber / getChannelType().getSlotsPerCarrier()) * getChannelSpacing() );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return super.getDownlinkFrequency(channelNumber);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isTDMA()
|
||||||
|
{
|
||||||
|
return getChannelType().getAccessType() == AccessType.TDMA;
|
||||||
|
}
|
||||||
|
|
||||||
public enum ChannelType
|
public enum ChannelType
|
||||||
{
|
{
|
||||||
TYPE_0( AccessType.FDMA, 12500, 1, Vocoder.HALF_RATE ),
|
TYPE_0( AccessType.FDMA, 12500, 1, Vocoder.HALF_RATE ),
|
||||||
@@ -109,7 +136,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,33 +1,44 @@
|
|||||||
|
/*******************************************************************************
|
||||||
|
* sdrtrunk
|
||||||
|
* Copyright (C) 2014-2017 Dennis Sheirer
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>
|
||||||
|
*
|
||||||
|
******************************************************************************/
|
||||||
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 module.decode.p25.reference.P25NetworkCallsign;
|
import module.decode.p25.reference.P25NetworkCallsign;
|
||||||
import alias.AliasList;
|
|
||||||
import bits.BinaryMessage;
|
|
||||||
|
|
||||||
public class NetworkStatusBroadcast extends TSBKMessage implements IdentifierReceiver
|
public class NetworkStatusBroadcast extends TSBKMessage implements IdentifierReceiver
|
||||||
{
|
{
|
||||||
public static final int[] LOCATION_REGISTRATION_AREA = { 80,81,82,83,84,85,
|
public static final int[] LOCATION_REGISTRATION_AREA = {80, 81, 82, 83, 84, 85, 86, 87};
|
||||||
86,87 };
|
public static final int[] WACN = {88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107};
|
||||||
public static final int[] WACN = { 88,89,90,91,92,93,94,95,96,97,98,99,100,
|
public static final int[] SYSTEM_ID = {108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119};
|
||||||
101,102,103,104,105,106,107 };
|
|
||||||
public static final int[] SYSTEM_ID = { 108,109,110,111,112,113,114,115,116,
|
|
||||||
117,118,119 };
|
|
||||||
public static final int[] IDENTIFIER = {120, 121, 122, 123};
|
public static final int[] IDENTIFIER = {120, 121, 122, 123};
|
||||||
public static final int[] CHANNEL = { 124,125,126,127,128,129,130,131,132,
|
public static final int[] CHANNEL = {124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135};
|
||||||
133,134,135 };
|
public static final int[] SYSTEM_SERVICE_CLASS = {136, 137, 138, 139, 140, 141, 142, 143};
|
||||||
public static final int[] SYSTEM_SERVICE_CLASS = { 136,137,138,139,140,141,
|
|
||||||
142,143 };
|
|
||||||
|
|
||||||
private IBandIdentifier mIdentifierUpdate;
|
private IBandIdentifier mIdentifierUpdate;
|
||||||
|
|
||||||
public NetworkStatusBroadcast( BinaryMessage message,
|
public NetworkStatusBroadcast(BinaryMessage message, DataUnitID duid, AliasList aliasList)
|
||||||
DataUnitID duid,
|
|
||||||
AliasList aliasList )
|
|
||||||
{
|
{
|
||||||
super(message, duid, aliasList);
|
super(message, duid, aliasList);
|
||||||
}
|
}
|
||||||
@@ -100,12 +111,22 @@ public class NetworkStatusBroadcast extends TSBKMessage implements IdentifierRec
|
|||||||
|
|
||||||
public long getDownlinkFrequency()
|
public long getDownlinkFrequency()
|
||||||
{
|
{
|
||||||
return calculateDownlink( mIdentifierUpdate, getChannel() );
|
if(mIdentifierUpdate != null)
|
||||||
|
{
|
||||||
|
return mIdentifierUpdate.getDownlinkFrequency(getChannel());
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public long getUplinkFrequency()
|
public long getUplinkFrequency()
|
||||||
{
|
{
|
||||||
return calculateUplink( mIdentifierUpdate, getChannel() );
|
if(mIdentifierUpdate != null)
|
||||||
|
{
|
||||||
|
return mIdentifierUpdate.getUplinkFrequency(getChannel());
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -1,33 +1,45 @@
|
|||||||
|
/*******************************************************************************
|
||||||
|
* sdrtrunk
|
||||||
|
* Copyright (C) 2014-2017 Dennis Sheirer
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>
|
||||||
|
*
|
||||||
|
******************************************************************************/
|
||||||
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 alias.AliasList;
|
|
||||||
import bits.BinaryMessage;
|
|
||||||
|
|
||||||
public class RFSSStatusBroadcast extends TSBKMessage implements IdentifierReceiver
|
public class RFSSStatusBroadcast extends TSBKMessage implements IdentifierReceiver
|
||||||
{
|
{
|
||||||
public static final int[] LOCATION_REGISTRATION_AREA = { 80,81,82,83,84,85,
|
public static final int[] LOCATION_REGISTRATION_AREA = {80, 81, 82, 83, 84, 85, 86, 87};
|
||||||
86,87 };
|
|
||||||
public static final int ACTIVE_NETWORK_CONNECTION_FLAG = 91;
|
public static final int ACTIVE_NETWORK_CONNECTION_FLAG = 91;
|
||||||
public static final int[] SYSTEM_ID = { 92,93,94,95,96,97,98,99,100,101,
|
public static final int[] SYSTEM_ID = {92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103};
|
||||||
102,103 };
|
|
||||||
public static final int[] RFSS_ID = {104, 105, 106, 107, 108, 109, 110, 111};
|
public static final int[] RFSS_ID = {104, 105, 106, 107, 108, 109, 110, 111};
|
||||||
public static final int[] SITE_ID = {112, 113, 114, 115, 116, 117, 118, 119};
|
public static final int[] SITE_ID = {112, 113, 114, 115, 116, 117, 118, 119};
|
||||||
public static final int[] IDENTIFIER = {120, 121, 122, 123};
|
public static final int[] IDENTIFIER = {120, 121, 122, 123};
|
||||||
public static final int[] CHANNEL = { 124,125,126,127,128,129,130,131,132,
|
public static final int[] CHANNEL = {124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135};
|
||||||
133,134,135 };
|
public static final int[] SYSTEM_SERVICE_CLASS = {136, 137, 138, 139, 140, 141, 142, 143};
|
||||||
public static final int[] SYSTEM_SERVICE_CLASS = { 136,137,138,139,140,141,
|
|
||||||
142,143 };
|
|
||||||
|
|
||||||
private IBandIdentifier mIdentifierUpdate;
|
private IBandIdentifier mIdentifierUpdate;
|
||||||
|
|
||||||
public RFSSStatusBroadcast( BinaryMessage message,
|
public RFSSStatusBroadcast(BinaryMessage message, DataUnitID duid, AliasList aliasList)
|
||||||
DataUnitID duid,
|
|
||||||
AliasList aliasList )
|
|
||||||
{
|
{
|
||||||
super(message, duid, aliasList);
|
super(message, duid, aliasList);
|
||||||
}
|
}
|
||||||
@@ -110,12 +122,22 @@ public class RFSSStatusBroadcast extends TSBKMessage implements IdentifierReceiv
|
|||||||
|
|
||||||
public long getDownlinkFrequency()
|
public long getDownlinkFrequency()
|
||||||
{
|
{
|
||||||
return calculateDownlink( mIdentifierUpdate, getChannel() );
|
if(mIdentifierUpdate != null)
|
||||||
|
{
|
||||||
|
return mIdentifierUpdate.getDownlinkFrequency(getChannel());
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public long getUplinkFrequency()
|
public long getUplinkFrequency()
|
||||||
{
|
{
|
||||||
return calculateUplink( mIdentifierUpdate, getChannel() );
|
if(mIdentifierUpdate != null)
|
||||||
|
{
|
||||||
|
return mIdentifierUpdate.getUplinkFrequency(getChannel());
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -1,35 +1,41 @@
|
|||||||
|
/*******************************************************************************
|
||||||
|
* sdrtrunk
|
||||||
|
* Copyright (C) 2014-2017 Dennis Sheirer
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>
|
||||||
|
*
|
||||||
|
******************************************************************************/
|
||||||
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;
|
public class SecondaryControlChannelBroadcast extends TSBKMessage implements IdentifierReceiver, Comparable<SecondaryControlChannelBroadcast>
|
||||||
import org.slf4j.LoggerFactory;
|
|
||||||
|
|
||||||
import alias.AliasList;
|
|
||||||
import bits.BinaryMessage;
|
|
||||||
|
|
||||||
public class SecondaryControlChannelBroadcast extends TSBKMessage
|
|
||||||
implements IdentifierReceiver, Comparable<SecondaryControlChannelBroadcast>
|
|
||||||
{
|
{
|
||||||
private final static Logger mLog =
|
|
||||||
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, 117, 118, 119};
|
||||||
public static final int[] SYSTEM_SERVICE_CLASS_1 = { 112,113,114,115,116,
|
|
||||||
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, 141, 142, 143};
|
||||||
public static final int[] SYSTEM_SERVICE_CLASS_2 = { 136,137,138,139,140,
|
|
||||||
141,142,143 };
|
|
||||||
|
|
||||||
private IBandIdentifier mIdentifierUpdate1;
|
private IBandIdentifier mIdentifierUpdate1;
|
||||||
private IBandIdentifier mIdentifierUpdate2;
|
private IBandIdentifier mIdentifierUpdate2;
|
||||||
@@ -61,8 +67,7 @@ public class SecondaryControlChannelBroadcast extends TSBKMessage
|
|||||||
|
|
||||||
sb.append(" UP1:" + getUplinkFrequency1());
|
sb.append(" UP1:" + getUplinkFrequency1());
|
||||||
|
|
||||||
sb.append( " SVC1:" +
|
sb.append(" SVC1:" + SystemService.toString(getSystemServiceClass1()));
|
||||||
SystemService.toString( getSystemServiceClass1() ) );
|
|
||||||
|
|
||||||
if(hasChannel2())
|
if(hasChannel2())
|
||||||
{
|
{
|
||||||
@@ -72,8 +77,7 @@ public class SecondaryControlChannelBroadcast extends TSBKMessage
|
|||||||
|
|
||||||
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();
|
||||||
@@ -127,22 +131,42 @@ public class SecondaryControlChannelBroadcast extends TSBKMessage
|
|||||||
|
|
||||||
public long getDownlinkFrequency1()
|
public long getDownlinkFrequency1()
|
||||||
{
|
{
|
||||||
return calculateDownlink( mIdentifierUpdate1, getChannel1() );
|
if(mIdentifierUpdate1 != null)
|
||||||
|
{
|
||||||
|
return mIdentifierUpdate1.getDownlinkFrequency(getChannel1());
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public long getUplinkFrequency1()
|
public long getUplinkFrequency1()
|
||||||
{
|
{
|
||||||
return calculateUplink( mIdentifierUpdate1, getChannel1() );
|
if(mIdentifierUpdate1 != null)
|
||||||
|
{
|
||||||
|
return mIdentifierUpdate1.getUplinkFrequency(getChannel1());
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public long getDownlinkFrequency2()
|
public long getDownlinkFrequency2()
|
||||||
{
|
{
|
||||||
return calculateDownlink( mIdentifierUpdate2, getChannel2() );
|
if(mIdentifierUpdate2 != null)
|
||||||
|
{
|
||||||
|
return mIdentifierUpdate2.getDownlinkFrequency(getChannel2());
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public long getUplinkFrequency2()
|
public long getUplinkFrequency2()
|
||||||
{
|
{
|
||||||
return calculateUplink( mIdentifierUpdate2, getChannel2() );
|
if(mIdentifierUpdate2 != null)
|
||||||
|
{
|
||||||
|
return mIdentifierUpdate2.getUplinkFrequency(getChannel2());
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -183,15 +207,10 @@ public class SecondaryControlChannelBroadcast extends TSBKMessage
|
|||||||
@Override
|
@Override
|
||||||
public int compareTo(SecondaryControlChannelBroadcast other)
|
public int compareTo(SecondaryControlChannelBroadcast other)
|
||||||
{
|
{
|
||||||
if( other.getSiteID().contentEquals( getSiteID() ) &&
|
if(other.getRFSS().contentEquals(getRFSS()) &&
|
||||||
|
other.getSiteID().contentEquals(getSiteID()) &&
|
||||||
other.getIdentifier1() == getIdentifier1() &&
|
other.getIdentifier1() == getIdentifier1() &&
|
||||||
other.getChannel1() == getChannel1() &&
|
other.getChannel1() == getChannel1())
|
||||||
other.getChannel2() == getChannel2() &&
|
|
||||||
other.getIdentifier2() == getIdentifier2() &&
|
|
||||||
other.getDownlinkFrequency1() == getDownlinkFrequency1() &&
|
|
||||||
other.getUplinkFrequency1() == getUplinkFrequency1() &&
|
|
||||||
other.getDownlinkFrequency2() == getDownlinkFrequency2() &&
|
|
||||||
other.getUplinkFrequency2() == getUplinkFrequency2() )
|
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@@ -204,4 +223,44 @@ public class SecondaryControlChannelBroadcast extends TSBKMessage
|
|||||||
return 1;
|
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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,17 +1,33 @@
|
|||||||
|
/*******************************************************************************
|
||||||
|
* sdrtrunk
|
||||||
|
* Copyright (C) 2014-2017 Dennis Sheirer
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>
|
||||||
|
*
|
||||||
|
******************************************************************************/
|
||||||
package module.decode.p25.message.tsbk.osp.data;
|
package module.decode.p25.message.tsbk.osp.data;
|
||||||
|
|
||||||
|
import alias.AliasList;
|
||||||
|
import bits.BinaryMessage;
|
||||||
import module.decode.p25.message.tsbk.GroupChannelGrant;
|
import module.decode.p25.message.tsbk.GroupChannelGrant;
|
||||||
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 alias.AliasList;
|
|
||||||
import bits.BinaryMessage;
|
|
||||||
|
|
||||||
public class GroupDataChannelGrant extends GroupChannelGrant
|
public class GroupDataChannelGrant extends GroupChannelGrant
|
||||||
|
|
||||||
{
|
{
|
||||||
public GroupDataChannelGrant( BinaryMessage message,
|
public GroupDataChannelGrant(BinaryMessage message, DataUnitID duid, AliasList aliasList)
|
||||||
DataUnitID duid,
|
|
||||||
AliasList aliasList )
|
|
||||||
{
|
{
|
||||||
super(message, duid, aliasList);
|
super(message, duid, aliasList);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,33 +1,43 @@
|
|||||||
|
/*******************************************************************************
|
||||||
|
* sdrtrunk
|
||||||
|
* Copyright (C) 2014-2017 Dennis Sheirer
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>
|
||||||
|
*
|
||||||
|
******************************************************************************/
|
||||||
package module.decode.p25.message.tsbk.osp.data;
|
package module.decode.p25.message.tsbk.osp.data;
|
||||||
|
|
||||||
|
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.reference.DataUnitID;
|
import module.decode.p25.reference.DataUnitID;
|
||||||
import alias.AliasList;
|
|
||||||
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 +158,21 @@ public class SNDCPDataChannelAnnouncementExplicit extends SNDCPData
|
|||||||
|
|
||||||
public long getDownlinkFrequency()
|
public long getDownlinkFrequency()
|
||||||
{
|
{
|
||||||
return calculateDownlink( mIdentifierUpdateTransmit, getReceiveChannelNumber() );
|
if(mIdentifierUpdateTransmit != null)
|
||||||
|
{
|
||||||
|
return mIdentifierUpdateTransmit.getDownlinkFrequency(getTransmitChannelNumber());
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public long getUplinkFrequency()
|
public long getUplinkFrequency()
|
||||||
{
|
{
|
||||||
return calculateUplink( mIdentifierUpdateReceive, getTransmitChannelNumber() );
|
if(mIdentifierUpdateReceive != null)
|
||||||
|
{
|
||||||
|
mIdentifierUpdateReceive.getUplinkFrequency(getReceiveChannelNumber());
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,33 +1,56 @@
|
|||||||
|
/*******************************************************************************
|
||||||
|
* sdrtrunk
|
||||||
|
* Copyright (C) 2014-2017 Dennis Sheirer
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>
|
||||||
|
*
|
||||||
|
******************************************************************************/
|
||||||
package module.decode.p25.message.tsbk.osp.data;
|
package module.decode.p25.message.tsbk.osp.data;
|
||||||
|
|
||||||
|
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.reference.DataUnitID;
|
import module.decode.p25.reference.DataUnitID;
|
||||||
import alias.AliasList;
|
|
||||||
import bits.BinaryMessage;
|
|
||||||
|
|
||||||
public class SNDCPDataChannelGrant extends SNDCPData implements IdentifierReceiver
|
public class SNDCPDataChannelGrant extends SNDCPData implements IdentifierReceiver
|
||||||
{
|
{
|
||||||
public static final int[] TRANSMIT_IDENTIFIER = {88, 89, 90, 91};
|
public static final int[] TRANSMIT_IDENTIFIER = {88, 89, 90, 91};
|
||||||
public static final int[] TRANSMIT_NUMBER = { 92,93,94,95,96,97,98,99,100,
|
public static final int[] TRANSMIT_NUMBER = {92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103};
|
||||||
101,102,103 };
|
|
||||||
public static final int[] RECEIVE_IDENTIFIER = {104, 105, 106, 107};
|
public static final int[] RECEIVE_IDENTIFIER = {104, 105, 106, 107};
|
||||||
public static final int[] RECEIVE_NUMBER = { 108,109,110,111,112,113,114,
|
public static final int[] RECEIVE_NUMBER = {108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119};
|
||||||
115,116,117,118,119 };
|
public static final int[] TARGET_ADDRESS = {120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133,
|
||||||
|
134, 135, 136, 137, 138, 139, 140, 141, 142, 143};
|
||||||
public static final int[] TARGET_ADDRESS = { 120,121,122,123,124,125,126,
|
|
||||||
127,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 SNDCPDataChannelGrant( BinaryMessage message,
|
public SNDCPDataChannelGrant(BinaryMessage message, DataUnitID duid, AliasList aliasList)
|
||||||
DataUnitID duid,
|
|
||||||
AliasList aliasList )
|
|
||||||
{
|
{
|
||||||
super(message, duid, aliasList);
|
super(message, duid, aliasList);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean isTDMAChannel()
|
||||||
|
{
|
||||||
|
if(mIdentifierUpdateTransmit != null)
|
||||||
|
{
|
||||||
|
return mIdentifierUpdateTransmit.isTDMA();
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
public String getMessage()
|
public String getMessage()
|
||||||
{
|
{
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
@@ -121,11 +144,21 @@ public class SNDCPDataChannelGrant extends SNDCPData implements IdentifierReceiv
|
|||||||
|
|
||||||
public long getDownlinkFrequency()
|
public long getDownlinkFrequency()
|
||||||
{
|
{
|
||||||
return calculateDownlink( mIdentifierUpdateTransmit, getTransmitChannelNumber() );
|
if(mIdentifierUpdateTransmit != null)
|
||||||
|
{
|
||||||
|
return mIdentifierUpdateTransmit.getDownlinkFrequency(getTransmitChannelNumber());
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public long getUplinkFrequency()
|
public long getUplinkFrequency()
|
||||||
{
|
{
|
||||||
return calculateUplink( mIdentifierUpdateReceive, getReceiveChannelNumber() );
|
if(mIdentifierUpdateReceive != null)
|
||||||
|
{
|
||||||
|
return mIdentifierUpdateReceive.getUplinkFrequency(getReceiveChannelNumber());
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -89,6 +89,7 @@ public class PlaylistManager implements ChannelEventListener
|
|||||||
@Override
|
@Override
|
||||||
public void receive(AliasEvent t)
|
public void receive(AliasEvent t)
|
||||||
{
|
{
|
||||||
|
//Save the playlist for all alias events
|
||||||
schedulePlaylistSave();
|
schedulePlaylistSave();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -98,6 +99,7 @@ public class PlaylistManager implements ChannelEventListener
|
|||||||
@Override
|
@Override
|
||||||
public void receive(ChannelMapEvent t)
|
public void receive(ChannelMapEvent t)
|
||||||
{
|
{
|
||||||
|
//Save the playlist for all channel map events
|
||||||
schedulePlaylistSave();
|
schedulePlaylistSave();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -107,7 +109,23 @@ public class PlaylistManager implements ChannelEventListener
|
|||||||
@Override
|
@Override
|
||||||
public void receive(BroadcastEvent broadcastEvent)
|
public void receive(BroadcastEvent broadcastEvent)
|
||||||
{
|
{
|
||||||
|
switch(broadcastEvent.getEvent())
|
||||||
|
{
|
||||||
|
case CONFIGURATION_ADD:
|
||||||
|
case CONFIGURATION_CHANGE:
|
||||||
|
case CONFIGURATION_DELETE:
|
||||||
schedulePlaylistSave();
|
schedulePlaylistSave();
|
||||||
|
break;
|
||||||
|
case BROADCASTER_ADD:
|
||||||
|
case BROADCASTER_QUEUE_CHANGE:
|
||||||
|
case BROADCASTER_STATE_CHANGE:
|
||||||
|
case BROADCASTER_STREAMED_COUNT_CHANGE:
|
||||||
|
case BROADCASTER_AGED_OFF_COUNT_CHANGE:
|
||||||
|
case BROADCASTER_DELETE:
|
||||||
|
default:
|
||||||
|
//Do nothing
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -29,38 +29,60 @@ import util.ThreadPool;
|
|||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
import java.util.Iterator;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
import java.util.concurrent.ScheduledFuture;
|
||||||
|
import java.util.concurrent.TimeUnit;
|
||||||
|
|
||||||
public class RecorderManager implements Listener<AudioPacket>
|
public class RecorderManager implements Listener<AudioPacket>
|
||||||
{
|
{
|
||||||
private static final Logger mLog = LoggerFactory.getLogger(RecorderManager.class);
|
private static final Logger mLog = LoggerFactory.getLogger(RecorderManager.class);
|
||||||
|
|
||||||
public static final int AUDIO_SAMPLE_RATE = 8000;
|
public static final int AUDIO_SAMPLE_RATE = 8000;
|
||||||
|
public static final long IDLE_RECORDER_REMOVAL_THRESHOLD = 6000; //6 seconds
|
||||||
|
|
||||||
private Map<String,RealBufferWaveRecorder> mRecorders = new HashMap<>();
|
private Map<String,RealBufferWaveRecorder> mRecorders = new HashMap<>();
|
||||||
|
private ScheduledFuture<?> mRecorderMonitorFuture;
|
||||||
|
|
||||||
private boolean mCanStartNewRecorders = true;
|
private boolean mCanStartNewRecorders = true;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Manages all audio recording for all processing channels. Reconstructs audio streams and distributes channel
|
* Audio recording manager. Monitors stream of audio packets produced by decoding channels and automatically starts
|
||||||
* audio to each of the recorders, starting and stopping the recorders as needed.
|
* audio recorders when the channel's metadata designates a call as recordable. Routes call audio to each recorder
|
||||||
|
* based on audio packet metadata. Recorders are shutdown when the channel sends an end-call audio packet
|
||||||
|
* indicating that the call is complete. A separate recording monitor periodically checks for idled recorders to
|
||||||
|
* be stopped for cases when the channel fails to send an end-call audio packet.
|
||||||
*/
|
*/
|
||||||
public RecorderManager()
|
public RecorderManager()
|
||||||
{
|
{
|
||||||
|
mRecorderMonitorFuture = ThreadPool.SCHEDULED.scheduleAtFixedRate(new RecorderMonitor(), 2,
|
||||||
|
2, TimeUnit.SECONDS);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Prepares this class for shutdown
|
||||||
|
*/
|
||||||
public void dispose()
|
public void dispose()
|
||||||
{
|
{
|
||||||
|
if(mRecorderMonitorFuture != null)
|
||||||
|
{
|
||||||
|
mRecorderMonitorFuture.cancel(true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Primary ingest point for audio packets from all decoding channels
|
||||||
|
* @param audioPacket to process
|
||||||
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void receive(AudioPacket audioPacket)
|
public void receive(AudioPacket audioPacket)
|
||||||
{
|
{
|
||||||
if(audioPacket.hasMetadata() &&
|
if(audioPacket.hasMetadata() && audioPacket.getMetadata().isRecordable())
|
||||||
audioPacket.getMetadata().isRecordable())
|
|
||||||
{
|
{
|
||||||
String identifier = audioPacket.getMetadata().getUniqueIdentifier();
|
String identifier = audioPacket.getMetadata().getUniqueIdentifier();
|
||||||
|
|
||||||
|
synchronized(mRecorders)
|
||||||
|
{
|
||||||
if(mRecorders.containsKey(identifier))
|
if(mRecorders.containsKey(identifier))
|
||||||
{
|
{
|
||||||
RealBufferWaveRecorder recorder = mRecorders.get(identifier);
|
RealBufferWaveRecorder recorder = mRecorders.get(identifier);
|
||||||
@@ -108,6 +130,7 @@ public class RecorderManager implements Listener<AudioPacket>
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructs a file name and path for an audio recording
|
* Constructs a file name and path for an audio recording
|
||||||
@@ -150,4 +173,31 @@ public class RecorderManager implements Listener<AudioPacket>
|
|||||||
|
|
||||||
return new ComplexBufferWaveRecorder(AUDIO_SAMPLE_RATE, sb.toString());
|
return new ComplexBufferWaveRecorder(AUDIO_SAMPLE_RATE, sb.toString());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Monitors currently running recorders and removes/closes any recorders that are idle more than 6 seconds
|
||||||
|
*/
|
||||||
|
public class RecorderMonitor implements Runnable
|
||||||
|
{
|
||||||
|
@Override
|
||||||
|
public void run()
|
||||||
|
{
|
||||||
|
synchronized(mRecorders)
|
||||||
|
{
|
||||||
|
Iterator<Map.Entry<String,RealBufferWaveRecorder>> it = mRecorders.entrySet().iterator();
|
||||||
|
|
||||||
|
while(it.hasNext())
|
||||||
|
{
|
||||||
|
Map.Entry<String,RealBufferWaveRecorder> entry = it.next();
|
||||||
|
|
||||||
|
if(entry.getValue().getLastBufferReceived() + IDLE_RECORDER_REMOVAL_THRESHOLD < System.currentTimeMillis())
|
||||||
|
{
|
||||||
|
mLog.info("Removing idle recorder [" + entry.getKey() + "]");
|
||||||
|
it.remove();
|
||||||
|
entry.getValue().stop();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,6 +18,7 @@
|
|||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
package record.wave;
|
package record.wave;
|
||||||
|
|
||||||
|
import org.apache.commons.lang3.Validate;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import sample.ConversionUtils;
|
import sample.ConversionUtils;
|
||||||
@@ -58,7 +59,7 @@ public class MonoWaveReader implements AutoCloseable
|
|||||||
*/
|
*/
|
||||||
public MonoWaveReader(Path path, boolean realTime) throws IOException
|
public MonoWaveReader(Path path, boolean realTime) throws IOException
|
||||||
{
|
{
|
||||||
assert( path != null );
|
Validate.isTrue(path != null);
|
||||||
mPath = path;
|
mPath = path;
|
||||||
mRealTime = realTime;
|
mRealTime = realTime;
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* SDR Trunk
|
* sdrtrunk
|
||||||
* Copyright (C) 2014,2015 Dennis Sheirer
|
* Copyright (C) 2014-2017 Dennis Sheirer
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@@ -14,9 +14,20 @@
|
|||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>
|
* along with this program. If not, see <http://www.gnu.org/licenses/>
|
||||||
|
*
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
package record.wave;
|
package record.wave;
|
||||||
|
|
||||||
|
import module.Module;
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
import sample.ConversionUtils;
|
||||||
|
import sample.Listener;
|
||||||
|
import sample.real.IFilteredRealBufferListener;
|
||||||
|
import sample.real.RealBuffer;
|
||||||
|
import util.TimeStamp;
|
||||||
|
|
||||||
|
import javax.sound.sampled.AudioFormat;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.nio.file.Path;
|
import java.nio.file.Path;
|
||||||
import java.nio.file.Paths;
|
import java.nio.file.Paths;
|
||||||
@@ -26,27 +37,13 @@ import java.util.concurrent.ScheduledFuture;
|
|||||||
import java.util.concurrent.TimeUnit;
|
import java.util.concurrent.TimeUnit;
|
||||||
import java.util.concurrent.atomic.AtomicBoolean;
|
import java.util.concurrent.atomic.AtomicBoolean;
|
||||||
|
|
||||||
import javax.sound.sampled.AudioFormat;
|
|
||||||
|
|
||||||
import module.Module;
|
|
||||||
|
|
||||||
import org.slf4j.Logger;
|
|
||||||
import org.slf4j.LoggerFactory;
|
|
||||||
|
|
||||||
import sample.ConversionUtils;
|
|
||||||
import sample.Listener;
|
|
||||||
import sample.real.IFilteredRealBufferListener;
|
|
||||||
import sample.real.RealBuffer;
|
|
||||||
import util.TimeStamp;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* WAVE audio recorder module for recording real sample buffers to a wave file
|
* WAVE audio recorder module for recording real sample buffers to a wave file
|
||||||
*/
|
*/
|
||||||
public class RealBufferWaveRecorder extends Module
|
public class RealBufferWaveRecorder extends Module
|
||||||
implements IFilteredRealBufferListener, Listener<RealBuffer>
|
implements IFilteredRealBufferListener, Listener<RealBuffer>
|
||||||
{
|
{
|
||||||
private final static Logger mLog =
|
private final static Logger mLog = LoggerFactory.getLogger(RealBufferWaveRecorder.class);
|
||||||
LoggerFactory.getLogger( RealBufferWaveRecorder.class );
|
|
||||||
|
|
||||||
private WaveWriter mWriter;
|
private WaveWriter mWriter;
|
||||||
private String mFilePrefix;
|
private String mFilePrefix;
|
||||||
@@ -55,8 +52,7 @@ public class RealBufferWaveRecorder extends Module
|
|||||||
|
|
||||||
private BufferProcessor mBufferProcessor;
|
private BufferProcessor mBufferProcessor;
|
||||||
private ScheduledFuture<?> mProcessorHandle;
|
private ScheduledFuture<?> mProcessorHandle;
|
||||||
private LinkedBlockingQueue<RealBuffer> mBuffers =
|
private LinkedBlockingQueue<RealBuffer> mBuffers = new LinkedBlockingQueue<>(500);
|
||||||
new LinkedBlockingQueue<>( 500 );
|
|
||||||
private long mLastBufferReceived;
|
private long mLastBufferReceived;
|
||||||
|
|
||||||
private AtomicBoolean mRunning = new AtomicBoolean();
|
private AtomicBoolean mRunning = new AtomicBoolean();
|
||||||
@@ -72,6 +68,14 @@ public class RealBufferWaveRecorder extends Module
|
|||||||
mFilePrefix = filePrefix;
|
mFilePrefix = filePrefix;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Indicates if the recorder is currently running.
|
||||||
|
*/
|
||||||
|
public boolean isRunning()
|
||||||
|
{
|
||||||
|
return mRunning.get();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Timestamp of when the latest buffer was received by this recorder
|
* Timestamp of when the latest buffer was received by this recorder
|
||||||
*/
|
*/
|
||||||
@@ -107,8 +111,7 @@ public class RealBufferWaveRecorder extends Module
|
|||||||
mWriter = new WaveWriter(mAudioFormat, mFile);
|
mWriter = new WaveWriter(mAudioFormat, mFile);
|
||||||
|
|
||||||
/* Schedule the processor to run every 500 milliseconds */
|
/* Schedule the processor to run every 500 milliseconds */
|
||||||
mProcessorHandle = executor.scheduleAtFixedRate(
|
mProcessorHandle = executor.scheduleAtFixedRate(mBufferProcessor, 0, 500, TimeUnit.MILLISECONDS);
|
||||||
mBufferProcessor, 0, 500, TimeUnit.MILLISECONDS );
|
|
||||||
}
|
}
|
||||||
catch(IOException io)
|
catch(IOException io)
|
||||||
{
|
{
|
||||||
@@ -119,10 +122,23 @@ public class RealBufferWaveRecorder extends Module
|
|||||||
|
|
||||||
public void stop()
|
public void stop()
|
||||||
{
|
{
|
||||||
/* Signal the buffer processor to end with a poison pill */
|
if(mRunning.compareAndSet(true, false))
|
||||||
receive( new PoisonPill() );
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
write();
|
||||||
|
|
||||||
mRunning.set( false );
|
if(mWriter != null)
|
||||||
|
{
|
||||||
|
mWriter.close();
|
||||||
|
mWriter = null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch(IOException ioe)
|
||||||
|
{
|
||||||
|
mLog.error("Error writing final audio buffers to recording during shutdown", ioe);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -134,9 +150,7 @@ public class RealBufferWaveRecorder extends Module
|
|||||||
|
|
||||||
if(!success)
|
if(!success)
|
||||||
{
|
{
|
||||||
mLog.error( "recorder buffer overflow - purging [" +
|
mLog.error("recorder buffer overflow - purging [" + mFile.toFile().getAbsolutePath() + "]");
|
||||||
mFile.toFile().getAbsolutePath() + "]" );
|
|
||||||
|
|
||||||
mBuffers.clear();
|
mBuffers.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -161,50 +175,28 @@ public class RealBufferWaveRecorder extends Module
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Writes all audio currently in the queue to the file
|
||||||
|
* @throws IOException if there are any errors writing the audio
|
||||||
|
*/
|
||||||
|
private void write() throws IOException
|
||||||
|
{
|
||||||
|
RealBuffer buffer = mBuffers.poll();
|
||||||
|
|
||||||
|
while(buffer != null)
|
||||||
|
{
|
||||||
|
mWriter.write(ConversionUtils.convertToSigned16BitSamples(buffer));
|
||||||
|
buffer = mBuffers.poll();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public class BufferProcessor implements Runnable
|
public class BufferProcessor implements Runnable
|
||||||
{
|
{
|
||||||
public void run()
|
public void run()
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
RealBuffer buffer = mBuffers.poll();
|
write();
|
||||||
|
|
||||||
while( buffer != null )
|
|
||||||
{
|
|
||||||
if( buffer instanceof PoisonPill )
|
|
||||||
{
|
|
||||||
buffer = null;
|
|
||||||
|
|
||||||
mBuffers.clear();
|
|
||||||
|
|
||||||
if( mWriter != null )
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
mWriter.close();
|
|
||||||
}
|
|
||||||
catch( IOException io )
|
|
||||||
{
|
|
||||||
mLog.error( "Error stopping complex wave recorder [" +
|
|
||||||
getFile() + "]", io );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if( mProcessorHandle != null )
|
|
||||||
{
|
|
||||||
mProcessorHandle.cancel( true );
|
|
||||||
}
|
|
||||||
|
|
||||||
mProcessorHandle = null;
|
|
||||||
mWriter = null;
|
|
||||||
mFile = null;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
mWriter.write( ConversionUtils.convertToSigned16BitSamples( buffer ) );
|
|
||||||
buffer = mBuffers.poll();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
catch(IOException ioe)
|
catch(IOException ioe)
|
||||||
{
|
{
|
||||||
@@ -212,20 +204,8 @@ public class RealBufferWaveRecorder extends Module
|
|||||||
mBuffers.clear();
|
mBuffers.clear();
|
||||||
stop();
|
stop();
|
||||||
|
|
||||||
mLog.error( "IOException while trying to write to the wave "
|
mLog.error("IO Exception while trying to write to the wave writer", ioe);
|
||||||
+ "writer", ioe );
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* This is used as a sentinel value to signal the buffer processor to end
|
|
||||||
*/
|
|
||||||
public class PoisonPill extends RealBuffer
|
|
||||||
{
|
|
||||||
public PoisonPill()
|
|
||||||
{
|
|
||||||
super( new float[ 1 ] );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* SDR Trunk
|
* sdrtrunk
|
||||||
* Copyright (C) 2014 Dennis Sheirer
|
* Copyright (C) 2014-2017 Dennis Sheirer
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@@ -14,9 +14,12 @@
|
|||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>
|
* along with this program. If not, see <http://www.gnu.org/licenses/>
|
||||||
|
*
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
package record.wave;
|
package record.wave;
|
||||||
|
|
||||||
|
import org.apache.commons.lang3.Validate;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.nio.ByteBuffer;
|
import java.nio.ByteBuffer;
|
||||||
import java.nio.channels.FileChannel;
|
import java.nio.channels.FileChannel;
|
||||||
@@ -32,10 +35,7 @@ import javax.sound.sampled.AudioFormat;
|
|||||||
|
|
||||||
public class WaveWriter implements AutoCloseable
|
public class WaveWriter implements AutoCloseable
|
||||||
{
|
{
|
||||||
// private final static Logger mLog = LoggerFactory.getLogger( WaveWriter.class );
|
private static final Pattern FILENAME_PATTERN = Pattern.compile( "(.*_)(\\d+)(\\.wav)" );
|
||||||
|
|
||||||
private static final Pattern FILENAME_PATTERN =
|
|
||||||
Pattern.compile( "(.*_)(\\d+)(\\.wav)" );
|
|
||||||
public static final long MAX_WAVE_SIZE = 2l * (long)Integer.MAX_VALUE;
|
public static final long MAX_WAVE_SIZE = 2l * (long)Integer.MAX_VALUE;
|
||||||
|
|
||||||
private AudioFormat mAudioFormat;
|
private AudioFormat mAudioFormat;
|
||||||
@@ -56,11 +56,10 @@ public class WaveWriter implements AutoCloseable
|
|||||||
* @param maxSize - maximum file size ( range: 1 - 4,294,967,294 bytes )
|
* @param maxSize - maximum file size ( range: 1 - 4,294,967,294 bytes )
|
||||||
* @throws IOException - if there are any IO issues
|
* @throws IOException - if there are any IO issues
|
||||||
*/
|
*/
|
||||||
public WaveWriter( AudioFormat format, Path file, long maxSize )
|
public WaveWriter( AudioFormat format, Path file, long maxSize ) throws IOException
|
||||||
throws IOException
|
|
||||||
{
|
{
|
||||||
assert( format != null );
|
Validate.isTrue(format != null);
|
||||||
assert( file != null );
|
Validate.isTrue( file != null );
|
||||||
|
|
||||||
mAudioFormat = format;
|
mAudioFormat = format;
|
||||||
mFile = file;
|
mFile = file;
|
||||||
@@ -100,15 +99,11 @@ public class WaveWriter implements AutoCloseable
|
|||||||
|
|
||||||
while( Files.exists( mFile ) )
|
while( Files.exists( mFile ) )
|
||||||
{
|
{
|
||||||
mFile = Paths.get( mFile.toFile().getAbsolutePath()
|
mFile = Paths.get( mFile.toFile().getAbsolutePath().replace( ".wav", "_" + version + ".wav" ) );
|
||||||
.replace( ".wav", "_" + version + ".wav" ) );
|
|
||||||
|
|
||||||
version++;
|
version++;
|
||||||
}
|
}
|
||||||
|
|
||||||
Files.createFile( mFile );
|
mFileChannel = (FileChannel.open( mFile, StandardOpenOption.WRITE, StandardOpenOption.CREATE_NEW ) );
|
||||||
|
|
||||||
mFileChannel = (FileChannel.open( mFile, StandardOpenOption.WRITE ) );
|
|
||||||
|
|
||||||
ByteBuffer header = WaveUtils.getWaveHeader( mAudioFormat );
|
ByteBuffer header = WaveUtils.getWaveHeader( mAudioFormat );
|
||||||
|
|
||||||
@@ -127,6 +122,15 @@ public class WaveWriter implements AutoCloseable
|
|||||||
{
|
{
|
||||||
mFileChannel.force( true );
|
mFileChannel.force( true );
|
||||||
mFileChannel.close();
|
mFileChannel.close();
|
||||||
|
mFileChannel = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void finalize() throws IOException
|
||||||
|
{
|
||||||
|
mFileChannel.force( true );
|
||||||
|
mFileChannel.close();
|
||||||
|
mFileChannel = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -20,6 +20,7 @@ package sample.adapter;
|
|||||||
import java.nio.ByteBuffer;
|
import java.nio.ByteBuffer;
|
||||||
import java.nio.ByteOrder;
|
import java.nio.ByteOrder;
|
||||||
|
|
||||||
|
import org.apache.commons.lang3.Validate;
|
||||||
import source.mixer.MixerChannel;
|
import source.mixer.MixerChannel;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -34,7 +35,7 @@ public class ChannelShortAdapter implements ISampleAdapter
|
|||||||
public ChannelShortAdapter( MixerChannel channel )
|
public ChannelShortAdapter( MixerChannel channel )
|
||||||
{
|
{
|
||||||
/* Only use with LEFT/RIGHT channels */
|
/* Only use with LEFT/RIGHT channels */
|
||||||
assert( channel != MixerChannel.MONO );
|
Validate.isTrue(channel != MixerChannel.MONO);
|
||||||
|
|
||||||
mMixerChannel = channel;
|
mMixerChannel = channel;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,6 +17,7 @@
|
|||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
package sample.complex;
|
package sample.complex;
|
||||||
|
|
||||||
|
import org.apache.commons.lang3.Validate;
|
||||||
import sample.Listener;
|
import sample.Listener;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -32,7 +33,7 @@ public class ComplexToComplexBufferAssembler implements ComplexSampleListener
|
|||||||
|
|
||||||
public ComplexToComplexBufferAssembler( int bufferSize )
|
public ComplexToComplexBufferAssembler( int bufferSize )
|
||||||
{
|
{
|
||||||
assert( bufferSize % 2 == 0 );
|
Validate.isTrue(bufferSize % 2 == 0);
|
||||||
|
|
||||||
mBufferSize = bufferSize;
|
mBufferSize = bufferSize;
|
||||||
mBuffer = new float[ mBufferSize ];
|
mBuffer = new float[ mBufferSize ];
|
||||||
|
|||||||
@@ -113,7 +113,16 @@ public class FCD2TunerController extends FCDTunerController
|
|||||||
FCD2TunerConfiguration fcd2 = (FCD2TunerConfiguration)config;
|
FCD2TunerConfiguration fcd2 = (FCD2TunerConfiguration)config;
|
||||||
|
|
||||||
setFrequencyCorrection(fcd2.getFrequencyCorrection());
|
setFrequencyCorrection(fcd2.getFrequencyCorrection());
|
||||||
setFrequency(fcd2.getFrequency());
|
|
||||||
|
long frequency = MINIMUM_TUNABLE_FREQUENCY;
|
||||||
|
|
||||||
|
if(fcd2.getFrequency() >= MINIMUM_TUNABLE_FREQUENCY &&
|
||||||
|
fcd2.getFrequency() <= MAXIMUM_TUNABLE_FREQUENCY)
|
||||||
|
{
|
||||||
|
frequency = fcd2.getFrequency();
|
||||||
|
}
|
||||||
|
|
||||||
|
setFrequency(frequency);
|
||||||
setLNAGain(fcd2.getGainLNA());
|
setLNAGain(fcd2.getGainLNA());
|
||||||
setMixerGain(fcd2.getGainMixer());
|
setMixerGain(fcd2.getGainMixer());
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* SDR Trunk
|
* sdrtrunk
|
||||||
* Copyright (C) 2014,2015 Dennis Sheirer
|
* Copyright (C) 2014-2017 Dennis Sheirer
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@@ -14,31 +14,17 @@
|
|||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>
|
* along with this program. If not, see <http://www.gnu.org/licenses/>
|
||||||
|
*
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
package spectrum;
|
package spectrum;
|
||||||
|
|
||||||
import java.awt.BasicStroke;
|
import controller.channel.Channel;
|
||||||
import java.awt.Color;
|
import controller.channel.Channel.ChannelType;
|
||||||
import java.awt.Font;
|
import controller.channel.ChannelEvent;
|
||||||
import java.awt.FontMetrics;
|
import controller.channel.ChannelEventListener;
|
||||||
import java.awt.Graphics;
|
import controller.channel.ChannelModel;
|
||||||
import java.awt.Graphics2D;
|
|
||||||
import java.awt.Point;
|
|
||||||
import java.awt.RenderingHints;
|
|
||||||
import java.awt.Stroke;
|
|
||||||
import java.awt.event.ComponentEvent;
|
|
||||||
import java.awt.event.ComponentListener;
|
|
||||||
import java.awt.geom.Line2D;
|
|
||||||
import java.awt.geom.Rectangle2D;
|
|
||||||
import java.text.DecimalFormat;
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.concurrent.CopyOnWriteArrayList;
|
|
||||||
|
|
||||||
import javax.swing.JPanel;
|
|
||||||
|
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
import settings.ColorSetting;
|
import settings.ColorSetting;
|
||||||
import settings.ColorSetting.ColorSettingName;
|
import settings.ColorSetting.ColorSettingName;
|
||||||
import settings.Setting;
|
import settings.Setting;
|
||||||
@@ -47,34 +33,34 @@ import settings.SettingsManager;
|
|||||||
import source.tuner.TunerChannel;
|
import source.tuner.TunerChannel;
|
||||||
import source.tuner.frequency.FrequencyChangeEvent;
|
import source.tuner.frequency.FrequencyChangeEvent;
|
||||||
import source.tuner.frequency.IFrequencyChangeProcessor;
|
import source.tuner.frequency.IFrequencyChangeProcessor;
|
||||||
import controller.channel.Channel;
|
|
||||||
import controller.channel.Channel.ChannelType;
|
|
||||||
import controller.channel.ChannelEvent;
|
|
||||||
import controller.channel.ChannelEventListener;
|
|
||||||
import controller.channel.ChannelModel;
|
|
||||||
|
|
||||||
public class OverlayPanel extends JPanel
|
import javax.swing.*;
|
||||||
implements ChannelEventListener,
|
import java.awt.*;
|
||||||
IFrequencyChangeProcessor,
|
import java.awt.event.ComponentEvent;
|
||||||
|
import java.awt.event.ComponentListener;
|
||||||
|
import java.awt.geom.Line2D;
|
||||||
|
import java.awt.geom.Rectangle2D;
|
||||||
|
import java.text.DecimalFormat;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.concurrent.CopyOnWriteArrayList;
|
||||||
|
|
||||||
|
public class OverlayPanel extends JPanel implements ChannelEventListener, IFrequencyChangeProcessor,
|
||||||
SettingChangeListener
|
SettingChangeListener
|
||||||
{
|
{
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
private final static Logger mLog =
|
private final static Logger mLog = LoggerFactory.getLogger(OverlayPanel.class);
|
||||||
LoggerFactory.getLogger( OverlayPanel.class );
|
|
||||||
|
|
||||||
private final static RenderingHints RENDERING_HINTS =
|
private final static RenderingHints RENDERING_HINTS = new RenderingHints(RenderingHints.KEY_ANTIALIASING,
|
||||||
new RenderingHints( RenderingHints.KEY_ANTIALIASING,
|
|
||||||
RenderingHints.VALUE_ANTIALIAS_ON);
|
RenderingHints.VALUE_ANTIALIAS_ON);
|
||||||
|
|
||||||
static
|
static
|
||||||
{
|
{
|
||||||
RENDERING_HINTS.put( RenderingHints.KEY_RENDERING,
|
RENDERING_HINTS.put(RenderingHints.KEY_RENDERING, RenderingHints.VALUE_RENDER_QUALITY);
|
||||||
RenderingHints.VALUE_RENDER_QUALITY );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private final static BasicStroke DASHED_STROKE = new BasicStroke(0.8f,
|
private final static BasicStroke DASHED_STROKE = new BasicStroke(0.8f, BasicStroke.CAP_BUTT,
|
||||||
BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER, 5.0f, new float[] {2.0f, 4.0f}, 0.0f);
|
BasicStroke.JOIN_MITER, 5.0f, new float[]{2.0f, 4.0f}, 0.0f);
|
||||||
|
|
||||||
private static DecimalFormat CURSOR_FORMAT = new DecimalFormat("000.00000");
|
private static DecimalFormat CURSOR_FORMAT = new DecimalFormat("000.00000");
|
||||||
private long mFrequency = 0;
|
private long mFrequency = 0;
|
||||||
@@ -107,13 +93,13 @@ public class OverlayPanel extends JPanel
|
|||||||
|
|
||||||
private SettingsManager mSettingsManager;
|
private SettingsManager mSettingsManager;
|
||||||
private ChannelModel mChannelModel;
|
private ChannelModel mChannelModel;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Translucent overlay panel for displaying channel configurations,
|
* Translucent overlay panel for displaying channel configurations,
|
||||||
* processing channels, selected channels, frequency labels and lines, and
|
* processing channels, selected channels, frequency labels and lines, and
|
||||||
* a cursor with a frequency readout.
|
* a cursor with a frequency readout.
|
||||||
*/
|
*/
|
||||||
public OverlayPanel( SettingsManager settingsManager,
|
public OverlayPanel(SettingsManager settingsManager, ChannelModel channelModel)
|
||||||
ChannelModel channelModel )
|
|
||||||
{
|
{
|
||||||
mSettingsManager = settingsManager;
|
mSettingsManager = settingsManager;
|
||||||
|
|
||||||
@@ -222,18 +208,15 @@ public class OverlayPanel extends JPanel
|
|||||||
{
|
{
|
||||||
mColorChannelConfig = getColor(ColorSettingName.CHANNEL_CONFIG);
|
mColorChannelConfig = getColor(ColorSettingName.CHANNEL_CONFIG);
|
||||||
|
|
||||||
mColorChannelConfigProcessing =
|
mColorChannelConfigProcessing = getColor(ColorSettingName.CHANNEL_CONFIG_PROCESSING);
|
||||||
getColor( ColorSettingName.CHANNEL_CONFIG_PROCESSING );
|
|
||||||
|
|
||||||
mColorChannelConfigSelected =
|
mColorChannelConfigSelected = getColor(ColorSettingName.CHANNEL_CONFIG_SELECTED);
|
||||||
getColor( ColorSettingName.CHANNEL_CONFIG_SELECTED );
|
|
||||||
|
|
||||||
mColorSpectrumCursor = getColor(ColorSettingName.SPECTRUM_CURSOR);
|
mColorSpectrumCursor = getColor(ColorSettingName.SPECTRUM_CURSOR);
|
||||||
|
|
||||||
mColorSpectrumLine = getColor(ColorSettingName.SPECTRUM_LINE);
|
mColorSpectrumLine = getColor(ColorSettingName.SPECTRUM_LINE);
|
||||||
|
|
||||||
mColorSpectrumBackground =
|
mColorSpectrumBackground = getColor(ColorSettingName.SPECTRUM_BACKGROUND);
|
||||||
getColor( ColorSettingName.SPECTRUM_BACKGROUND );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -310,21 +293,23 @@ public class OverlayPanel extends JPanel
|
|||||||
{
|
{
|
||||||
if(mCursorVisible)
|
if(mCursorVisible)
|
||||||
{
|
{
|
||||||
drawFrequencyLine( graphics,
|
drawFrequencyLine(graphics, mCursorLocation.x, mColorSpectrumCursor);
|
||||||
mCursorLocation.x,
|
|
||||||
mColorSpectrumCursor );
|
|
||||||
|
|
||||||
String frequency = CURSOR_FORMAT.format(
|
String frequency = CURSOR_FORMAT.format(getFrequencyFromAxis(mCursorLocation.getX()) / 1E6D);
|
||||||
getFrequencyFromAxis( mCursorLocation.getX() ) / 1E6D );
|
|
||||||
|
|
||||||
graphics.drawString( frequency ,
|
FontMetrics fontMetrics = graphics.getFontMetrics(this.getFont());
|
||||||
mCursorLocation.x + 5,
|
|
||||||
mCursorLocation.y );
|
Rectangle2D rect = fontMetrics.getStringBounds(frequency, graphics);
|
||||||
|
|
||||||
|
if(mCursorLocation.y > rect.getHeight())
|
||||||
|
{
|
||||||
|
graphics.drawString(frequency, mCursorLocation.x + 5, mCursorLocation.y);
|
||||||
|
}
|
||||||
|
|
||||||
if(mZoom != 0)
|
if(mZoom != 0)
|
||||||
{
|
{
|
||||||
graphics.drawString( "Zoom: " + (int)Math.pow( 2.0, mZoom ) + "x",
|
graphics.drawString("Zoom: " + (int)Math.pow(2.0, mZoom) + "x", mCursorLocation.x + 17,
|
||||||
mCursorLocation.x + 17, mCursorLocation.y + 11 );
|
mCursorLocation.y + 11);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -336,8 +321,6 @@ public class OverlayPanel extends JPanel
|
|||||||
{
|
{
|
||||||
Stroke currentStroke = graphics.getStroke();
|
Stroke currentStroke = graphics.getStroke();
|
||||||
|
|
||||||
// graphics.setStroke( DASHED_STROKE );
|
|
||||||
|
|
||||||
long minFrequency = getMinDisplayFrequency();
|
long minFrequency = getMinDisplayFrequency();
|
||||||
long maxFrequency = getMaxDisplayFrequency();
|
long maxFrequency = getMaxDisplayFrequency();
|
||||||
|
|
||||||
@@ -372,8 +355,6 @@ public class OverlayPanel extends JPanel
|
|||||||
|
|
||||||
frequency += minor;
|
frequency += minor;
|
||||||
}
|
}
|
||||||
|
|
||||||
// graphics.setStroke( currentStroke );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -415,8 +396,7 @@ public class OverlayPanel extends JPanel
|
|||||||
{
|
{
|
||||||
graphics.setColor(color);
|
graphics.setColor(color);
|
||||||
|
|
||||||
graphics.draw( new Line2D.Double( xaxis, 0.0d,
|
graphics.draw(new Line2D.Double(xaxis, 0.0d, xaxis, getSize().getHeight() - mSpectrumInset));
|
||||||
xaxis, getSize().getHeight() - mSpectrumInset ) );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -428,8 +408,7 @@ public class OverlayPanel extends JPanel
|
|||||||
|
|
||||||
graphics.setColor(Color.LIGHT_GRAY);
|
graphics.setColor(Color.LIGHT_GRAY);
|
||||||
|
|
||||||
graphics.draw( new Line2D.Double( xaxis, height * 0.65d,
|
graphics.draw(new Line2D.Double(xaxis, height * 0.65d, xaxis, height - 1.0d));
|
||||||
xaxis, height - 1.0d ) );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -443,12 +422,10 @@ public class OverlayPanel extends JPanel
|
|||||||
graphics.setColor(Color.YELLOW);
|
graphics.setColor(Color.YELLOW);
|
||||||
|
|
||||||
//Vertical frequency error line
|
//Vertical frequency error line
|
||||||
graphics.draw( new Line2D.Double( errorAxis, lineHeight,
|
graphics.draw(new Line2D.Double(errorAxis, lineHeight, errorAxis, height - 1.0d));
|
||||||
errorAxis, height - 1.0d ) );
|
|
||||||
|
|
||||||
//Horizontal line connecting frequency and error lines
|
//Horizontal line connecting frequency and error lines
|
||||||
graphics.draw( new Line2D.Double( frequencyAxis, lineHeight,
|
graphics.draw(new Line2D.Double(frequencyAxis, lineHeight, errorAxis, lineHeight));
|
||||||
errorAxis, lineHeight ) );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -484,8 +461,7 @@ public class OverlayPanel extends JPanel
|
|||||||
|
|
||||||
double offset = xAxis / width;
|
double offset = xAxis / width;
|
||||||
|
|
||||||
long frequency = getMinDisplayFrequency() +
|
long frequency = getMinDisplayFrequency() + Math.round((double)getDisplayBandwidth() * offset);
|
||||||
Math.round( (double)getDisplayBandwidth() * offset );
|
|
||||||
|
|
||||||
if(frequency > (getMaxFrequency()))
|
if(frequency > (getMaxFrequency()))
|
||||||
{
|
{
|
||||||
@@ -498,9 +474,7 @@ public class OverlayPanel extends JPanel
|
|||||||
/**
|
/**
|
||||||
* Draws a frequency label at the x-axis position, at the bottom of the panel
|
* Draws a frequency label at the x-axis position, at the bottom of the panel
|
||||||
*/
|
*/
|
||||||
private void drawFrequencyLabel( Graphics2D graphics,
|
private void drawFrequencyLabel(Graphics2D graphics, double xaxis, long frequency)
|
||||||
double xaxis,
|
|
||||||
long frequency )
|
|
||||||
{
|
{
|
||||||
String label = mLabelSizeMonitor.format(frequency);
|
String label = mLabelSizeMonitor.format(frequency);
|
||||||
|
|
||||||
@@ -510,8 +484,7 @@ public class OverlayPanel extends JPanel
|
|||||||
|
|
||||||
float xOffset = (float)rect.getWidth() / 2;
|
float xOffset = (float)rect.getWidth() / 2;
|
||||||
|
|
||||||
graphics.drawString( label, (float)( xaxis - xOffset ),
|
graphics.drawString(label, (float)(xaxis - xOffset), (float)(getSize().getHeight() - 2.0f));
|
||||||
(float)( getSize().getHeight() - 2.0f ) );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -523,8 +496,7 @@ public class OverlayPanel extends JPanel
|
|||||||
for(Channel channel : mVisibleChannels)
|
for(Channel channel : mVisibleChannels)
|
||||||
{
|
{
|
||||||
if(mChannelDisplay == ChannelDisplay.ALL ||
|
if(mChannelDisplay == ChannelDisplay.ALL ||
|
||||||
( mChannelDisplay == ChannelDisplay.ENABLED &&
|
(mChannelDisplay == ChannelDisplay.ENABLED && channel.getEnabled()))
|
||||||
channel.getEnabled() ) )
|
|
||||||
{
|
{
|
||||||
//Choose the correct background color to use
|
//Choose the correct background color to use
|
||||||
if(channel.isSelected())
|
if(channel.isSelected())
|
||||||
@@ -546,12 +518,10 @@ public class OverlayPanel extends JPanel
|
|||||||
{
|
{
|
||||||
double xAxis = getAxisFromFrequency(tunerChannel.getFrequency());
|
double xAxis = getAxisFromFrequency(tunerChannel.getFrequency());
|
||||||
|
|
||||||
double width = (double)( tunerChannel.getBandwidth() ) /
|
double width = (double)(tunerChannel.getBandwidth()) / (double)getDisplayBandwidth() * getSize().getWidth();
|
||||||
(double)getDisplayBandwidth() * getSize().getWidth();
|
|
||||||
|
|
||||||
Rectangle2D.Double box =
|
Rectangle2D.Double box =
|
||||||
new Rectangle2D.Double( xAxis - ( width / 2.0d ),
|
new Rectangle2D.Double(xAxis - (width / 2.0d), 0.0d, width, getSize().getHeight() - mSpectrumInset);
|
||||||
0.0d, width, getSize().getHeight() - mSpectrumInset );
|
|
||||||
|
|
||||||
//Fill the box with the correct color
|
//Fill the box with the correct color
|
||||||
graphics.fill(box);
|
graphics.fill(box);
|
||||||
@@ -567,30 +537,15 @@ public class OverlayPanel extends JPanel
|
|||||||
//Draw the system label and adjust the y-axis position
|
//Draw the system label and adjust the y-axis position
|
||||||
String system = channel.hasSystem() ? channel.getSystem() : " ";
|
String system = channel.hasSystem() ? channel.getSystem() : " ";
|
||||||
|
|
||||||
yAxis += drawLabel( graphics,
|
yAxis += drawLabel(graphics, system, this.getFont(), xAxis, yAxis, width);
|
||||||
system,
|
|
||||||
this.getFont(),
|
|
||||||
xAxis,
|
|
||||||
yAxis,
|
|
||||||
width );
|
|
||||||
|
|
||||||
//Draw the site label and adjust the y-axis position
|
//Draw the site label and adjust the y-axis position
|
||||||
String site = channel.hasSite() ? channel.getSite() : " ";
|
String site = channel.hasSite() ? channel.getSite() : " ";
|
||||||
|
|
||||||
yAxis += drawLabel( graphics,
|
yAxis += drawLabel(graphics, site, this.getFont(), xAxis, yAxis, width);
|
||||||
site,
|
|
||||||
this.getFont(),
|
|
||||||
xAxis,
|
|
||||||
yAxis,
|
|
||||||
width );
|
|
||||||
|
|
||||||
//Draw the channel label and adjust the y-axis position
|
//Draw the channel label and adjust the y-axis position
|
||||||
yAxis += drawLabel( graphics,
|
yAxis += drawLabel(graphics, channel.getName(), this.getFont(), xAxis, yAxis, width);
|
||||||
channel.getName(),
|
|
||||||
this.getFont(),
|
|
||||||
xAxis,
|
|
||||||
yAxis,
|
|
||||||
width );
|
|
||||||
|
|
||||||
//Draw the decoder label
|
//Draw the decoder label
|
||||||
drawLabel(graphics, channel.getDecodeConfiguration().getDecoderType().getShortDisplayString(),
|
drawLabel(graphics, channel.getDecodeConfiguration().getDecoderType().getShortDisplayString(),
|
||||||
@@ -623,8 +578,7 @@ public class OverlayPanel extends JPanel
|
|||||||
*
|
*
|
||||||
* @return height of the drawn label
|
* @return height of the drawn label
|
||||||
*/
|
*/
|
||||||
private double drawLabel( Graphics2D graphics, String text, Font font,
|
private double drawLabel(Graphics2D graphics, String text, Font font, double x, double baseY, double maxWidth)
|
||||||
double x, double baseY, double maxWidth )
|
|
||||||
{
|
{
|
||||||
FontMetrics fontMetrics = graphics.getFontMetrics(font);
|
FontMetrics fontMetrics = graphics.getFontMetrics(font);
|
||||||
|
|
||||||
@@ -639,15 +593,11 @@ public class OverlayPanel extends JPanel
|
|||||||
*/
|
*/
|
||||||
if(offset > (maxWidth / 2.0d))
|
if(offset > (maxWidth / 2.0d))
|
||||||
{
|
{
|
||||||
label.setRect( x - ( maxWidth / 2.0d ),
|
label.setRect(x - (maxWidth / 2.0d), y - label.getHeight(), maxWidth, label.getHeight());
|
||||||
y - label.getHeight(),
|
|
||||||
maxWidth,
|
|
||||||
label.getHeight() );
|
|
||||||
|
|
||||||
graphics.setClip(label);
|
graphics.setClip(label);
|
||||||
|
|
||||||
graphics.drawString( text,
|
graphics.drawString(text, (float)(x - (maxWidth / 2.0d)), (float)y);
|
||||||
(float)( x - ( maxWidth / 2.0d ) ), (float)y );
|
|
||||||
|
|
||||||
graphics.setClip(null);
|
graphics.setClip(null);
|
||||||
}
|
}
|
||||||
@@ -683,9 +633,7 @@ public class OverlayPanel extends JPanel
|
|||||||
* Reset the visible channels list
|
* Reset the visible channels list
|
||||||
*/
|
*/
|
||||||
mVisibleChannels.clear();
|
mVisibleChannels.clear();
|
||||||
mVisibleChannels.addAll(
|
mVisibleChannels.addAll(mChannelModel.getChannelsInFrequencyRange(getMinFrequency(), getMaxFrequency()));
|
||||||
mChannelModel.getChannelsInFrequencyRange( getMinFrequency(),
|
|
||||||
getMaxFrequency() ) );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -701,8 +649,7 @@ public class OverlayPanel extends JPanel
|
|||||||
{
|
{
|
||||||
case NOTIFICATION_ADD:
|
case NOTIFICATION_ADD:
|
||||||
case NOTIFICATION_PROCESSING_START:
|
case NOTIFICATION_PROCESSING_START:
|
||||||
if( !mVisibleChannels.contains( channel ) &&
|
if(!mVisibleChannels.contains(channel) && channel.isWithin(getMinFrequency(), getMaxFrequency()))
|
||||||
channel.isWithin( getMinFrequency(), getMaxFrequency() ) )
|
|
||||||
{
|
{
|
||||||
mVisibleChannels.add(channel);
|
mVisibleChannels.add(channel);
|
||||||
}
|
}
|
||||||
@@ -717,14 +664,12 @@ public class OverlayPanel extends JPanel
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case NOTIFICATION_CONFIGURATION_CHANGE:
|
case NOTIFICATION_CONFIGURATION_CHANGE:
|
||||||
if( mVisibleChannels.contains( channel ) &&
|
if(mVisibleChannels.contains(channel) && !channel.isWithin(getMinFrequency(), getMaxFrequency()))
|
||||||
!channel.isWithin( getMinFrequency(), getMaxFrequency() ) )
|
|
||||||
{
|
{
|
||||||
mVisibleChannels.remove(channel);
|
mVisibleChannels.remove(channel);
|
||||||
}
|
}
|
||||||
|
|
||||||
if( !mVisibleChannels.contains( channel ) &&
|
if(!mVisibleChannels.contains(channel) && channel.isWithin(getMinFrequency(), getMaxFrequency()))
|
||||||
channel.isWithin( getMinFrequency(), getMaxFrequency() ) )
|
|
||||||
{
|
{
|
||||||
mVisibleChannels.add(channel);
|
mVisibleChannels.add(channel);
|
||||||
}
|
}
|
||||||
@@ -796,9 +741,7 @@ public class OverlayPanel extends JPanel
|
|||||||
{
|
{
|
||||||
TunerChannel channel = config.getTunerChannel();
|
TunerChannel channel = config.getTunerChannel();
|
||||||
|
|
||||||
if( channel != null &&
|
if(channel != null && channel.getMinFrequency() <= frequency && channel.getMaxFrequency() >= frequency)
|
||||||
channel.getMinFrequency() <= frequency &&
|
|
||||||
channel.getMaxFrequency() >= frequency )
|
|
||||||
{
|
{
|
||||||
configs.add(config);
|
configs.add(config);
|
||||||
}
|
}
|
||||||
@@ -808,7 +751,8 @@ public class OverlayPanel extends JPanel
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void settingDeleted( Setting setting ) { /* not implemented */ }
|
public void settingDeleted(Setting setting)
|
||||||
|
{ /* not implemented */ }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Calculates correct spacing and format for frequency labels and major/minor
|
* Calculates correct spacing and format for frequency labels and major/minor
|
||||||
@@ -858,9 +802,7 @@ public class OverlayPanel extends JPanel
|
|||||||
|
|
||||||
int maxLabelWidth = fontMetrics.stringWidth(format(getMaxDisplayFrequency()));
|
int maxLabelWidth = fontMetrics.stringWidth(format(getMaxDisplayFrequency()));
|
||||||
|
|
||||||
double maxLabels = ( (double)OverlayPanel.this.getWidth() *
|
double maxLabels = ((double)OverlayPanel.this.getWidth() * LABEL_FILL_THRESHOLD) / (double)maxLabelWidth;
|
||||||
LABEL_FILL_THRESHOLD ) /
|
|
||||||
(double)maxLabelWidth;
|
|
||||||
|
|
||||||
//Calculate the next smallest base 10 value for the major increment
|
//Calculate the next smallest base 10 value for the major increment
|
||||||
int power = (int)Math.log10((double)getDisplayBandwidth() / maxLabels);
|
int power = (int)Math.log10((double)getDisplayBandwidth() / maxLabels);
|
||||||
@@ -874,9 +816,7 @@ public class OverlayPanel extends JPanel
|
|||||||
|
|
||||||
int labelIncrement = start;
|
int labelIncrement = start;
|
||||||
|
|
||||||
while( ( (double)getDisplayBandwidth() /
|
while(((double)getDisplayBandwidth() / (double)labelIncrement) < maxLabels && labelIncrement >= minimum)
|
||||||
(double)labelIncrement ) < maxLabels &&
|
|
||||||
labelIncrement >= minimum )
|
|
||||||
{
|
{
|
||||||
labelIncrement /= 2;
|
labelIncrement /= 2;
|
||||||
precision++;
|
precision++;
|
||||||
@@ -930,9 +870,17 @@ public class OverlayPanel extends JPanel
|
|||||||
update();
|
update();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void componentHidden( ComponentEvent arg0 ) {}
|
public void componentHidden(ComponentEvent arg0)
|
||||||
public void componentMoved( ComponentEvent arg0 ) {}
|
{
|
||||||
public void componentShown( ComponentEvent arg0 ) {}
|
}
|
||||||
|
|
||||||
|
public void componentMoved(ComponentEvent arg0)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public void componentShown(ComponentEvent arg0)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -30,6 +30,7 @@ import java.util.Arrays;
|
|||||||
|
|
||||||
import javax.swing.JPanel;
|
import javax.swing.JPanel;
|
||||||
|
|
||||||
|
import org.apache.commons.lang3.Validate;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
@@ -282,7 +283,7 @@ public class SpectrumPanel extends JPanel
|
|||||||
*/
|
*/
|
||||||
public void setZoom( int zoom )
|
public void setZoom( int zoom )
|
||||||
{
|
{
|
||||||
assert( 0 <= zoom && zoom <= 5 );
|
Validate.isTrue( 0 <= zoom && zoom <= 5 );
|
||||||
|
|
||||||
mZoom = zoom;
|
mZoom = zoom;
|
||||||
}
|
}
|
||||||
@@ -305,7 +306,7 @@ public class SpectrumPanel extends JPanel
|
|||||||
*/
|
*/
|
||||||
public void setSampleSize( double sampleSize )
|
public void setSampleSize( double sampleSize )
|
||||||
{
|
{
|
||||||
assert( 2.0 <= sampleSize && sampleSize <= 32.0 );
|
Validate.isTrue(2.0 <= sampleSize && sampleSize <= 32.0);
|
||||||
|
|
||||||
mDBScale = (float)( 20.0 * Math.log10( Math.pow( 2.0, sampleSize - 1 ) ) );
|
mDBScale = (float)( 20.0 * Math.log10( Math.pow( 2.0, sampleSize - 1 ) ) );
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,6 +18,8 @@
|
|||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
package util;
|
package util;
|
||||||
|
|
||||||
|
import org.apache.commons.lang3.Validate;
|
||||||
|
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
|
||||||
public class XTEA
|
public class XTEA
|
||||||
@@ -58,7 +60,7 @@ public class XTEA
|
|||||||
*/
|
*/
|
||||||
public void setKey(byte[] key)
|
public void setKey(byte[] key)
|
||||||
{
|
{
|
||||||
assert(key.length == 16);
|
Validate.isTrue(key.length == 16);
|
||||||
|
|
||||||
int keyInts[] = new int[8];
|
int keyInts[] = new int[8];
|
||||||
|
|
||||||
@@ -94,7 +96,7 @@ public class XTEA
|
|||||||
*/
|
*/
|
||||||
public byte[] encrypt(byte[] plainText)
|
public byte[] encrypt(byte[] plainText)
|
||||||
{
|
{
|
||||||
assert(plainText.length == 8);
|
Validate.isTrue(plainText.length == 8);
|
||||||
|
|
||||||
//Convert the 8 bytes of plaintext to 2 integers
|
//Convert the 8 bytes of plaintext to 2 integers
|
||||||
int result0 = (plainText[3] << 0) & MASK0 | (plainText[2] << 8) & MASK1 |
|
int result0 = (plainText[3] << 0) & MASK0 | (plainText[2] << 8) & MASK1 |
|
||||||
|
|||||||
Reference in New Issue
Block a user