mirror of
https://github.com/DSheirer/sdrtrunk.git
synced 2026-11-15 01:57:39 -05:00
Compare commits
22 Commits
v0.3.0-bet
...
v0.3.0-bet
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5efd89632e | ||
|
|
1dc3863489 | ||
|
|
441286ba13 | ||
|
|
e4323df347 | ||
|
|
a872e0d664 | ||
|
|
fbc92cfe31 | ||
|
|
1a432197ac | ||
|
|
fbc6e508bd | ||
|
|
f9b6e67b00 | ||
|
|
a628800a71 | ||
|
|
25f71a76c4 | ||
|
|
5fe8ccd478 | ||
|
|
069f951a86 | ||
|
|
dab6df7836 | ||
|
|
89da46b63c | ||
|
|
5f2ce2a9f2 | ||
|
|
7a0b377971 | ||
|
|
5dbe0ecce3 | ||
|
|
6647c581a6 | ||
|
|
a2ab5bfa95 | ||
|
|
ed486440b8 | ||
|
|
13464e01fc |
@@ -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="-beta8"/>
|
<property name="release" value="-beta12"/>
|
||||||
<property name="filename" value="sdrtrunk_${major}.${minor}.${patch}${release}"/>
|
<property name="filename" value="sdrtrunk_${major}.${minor}.${patch}${release}"/>
|
||||||
|
|
||||||
<!-- Build properties -->
|
<!-- Build properties -->
|
||||||
|
|||||||
@@ -90,7 +90,8 @@ public class AudioChannelPanel extends JPanel
|
|||||||
|
|
||||||
private void init()
|
private void init()
|
||||||
{
|
{
|
||||||
setLayout(new MigLayout("align center center, insets 0 0 0 0", "[][][align right]0[grow,fill]", ""));
|
setLayout(new MigLayout("align center center, insets 0 0 0 0",
|
||||||
|
"[][][align right]0[grow,fill]", ""));
|
||||||
setBackground(mBackgroundColor);
|
setBackground(mBackgroundColor);
|
||||||
|
|
||||||
mMutedLabel.setFont(mFont);
|
mMutedLabel.setFont(mFont);
|
||||||
@@ -109,7 +110,7 @@ public class AudioChannelPanel extends JPanel
|
|||||||
|
|
||||||
mTo.setFont(mFont);
|
mTo.setFont(mFont);
|
||||||
mTo.setForeground(mValueColor);
|
mTo.setForeground(mValueColor);
|
||||||
add(mTo);
|
add(mTo,"wmin 10lp");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -159,29 +160,39 @@ public class AudioChannelPanel extends JPanel
|
|||||||
* does not occur on the Swing event thread -- wrap any calls to this
|
* does not occur on the Swing event thread -- wrap any calls to this
|
||||||
* method with an event thread call.
|
* method with an event thread call.
|
||||||
*/
|
*/
|
||||||
private void updateLabel(JLabel valueLabel, String value, JLabel aliasLabel, Alias alias)
|
private void updateLabel(JLabel textLabel, String value, JLabel iconLabel, Alias alias)
|
||||||
{
|
{
|
||||||
if(value != null)
|
if(value != null)
|
||||||
{
|
{
|
||||||
|
|
||||||
if(alias != null)
|
if(alias != null)
|
||||||
{
|
{
|
||||||
valueLabel.setText(alias.getName());
|
iconLabel.setIcon(mIconManager.getIcon(alias.getIconName(), 18));
|
||||||
aliasLabel.setIcon(mIconManager.getIcon(alias.getIconName(), 18));
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
valueLabel.setText(value);
|
|
||||||
aliasLabel.setIcon(null);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
valueLabel.setText("-----");
|
|
||||||
aliasLabel.setIcon(null);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
String aliasName = alias.getName();
|
||||||
|
|
||||||
|
//Truncate label if length exceeds 33 characters - hack!
|
||||||
|
if(aliasName.length() > 33)
|
||||||
|
{
|
||||||
|
textLabel.setText(aliasName.substring(0,30) + "...");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
textLabel.setText(aliasName);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
iconLabel.setIcon(null);
|
||||||
|
textLabel.setText(value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
iconLabel.setIcon(null);
|
||||||
|
textLabel.setText("-----");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Processes audio metadata to update this panel's display values
|
* Processes audio metadata to update this panel's display values
|
||||||
|
|||||||
@@ -33,8 +33,7 @@ public class AudioChannelsPanel extends JPanel
|
|||||||
|
|
||||||
public AudioChannelsPanel(IconManager iconManager, SettingsManager settingsManager, IAudioController controller)
|
public AudioChannelsPanel(IconManager iconManager, SettingsManager settingsManager, IAudioController controller)
|
||||||
{
|
{
|
||||||
// setLayout(new MigLayout("insets 0 0 0 0", "[][grow,fill][][grow,fill]", "[grow,fill]"));
|
setLayout(new MigLayout("insets 0 0 0 0", "[][sg abc,grow,fill][][sg abc,grow,fill]", "[grow,fill]"));
|
||||||
setLayout(new MigLayout("insets 0 0 0 0", "[][sg,grow,fill][][sg,grow,fill]", "[grow,fill]"));
|
|
||||||
|
|
||||||
setBackground(Color.BLACK);
|
setBackground(Color.BLACK);
|
||||||
|
|
||||||
@@ -44,7 +43,7 @@ public class AudioChannelsPanel extends JPanel
|
|||||||
|
|
||||||
for(int x = 0; x < outputs.size(); x++)
|
for(int x = 0; x < outputs.size(); x++)
|
||||||
{
|
{
|
||||||
add(new AudioChannelPanel(iconManager, settingsManager, outputs.get(x)), "growx");
|
add(new AudioChannelPanel(iconManager, settingsManager, outputs.get(x)));
|
||||||
|
|
||||||
if(x < outputs.size() - 1)
|
if(x < outputs.size() - 1)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -63,13 +63,11 @@ public class TrafficChannelManager extends Module implements ICallEventProvider,
|
|||||||
private Listener<CallEvent> mCallEventListener;
|
private Listener<CallEvent> mCallEventListener;
|
||||||
|
|
||||||
private ChannelModel mChannelModel;
|
private ChannelModel mChannelModel;
|
||||||
private ChannelProcessingManager mChannelProcessingManager;
|
|
||||||
private DecodeConfiguration mDecodeConfiguration;
|
private DecodeConfiguration mDecodeConfiguration;
|
||||||
private RecordConfiguration mRecordConfiguration;
|
private RecordConfiguration mRecordConfiguration;
|
||||||
private String mSystem;
|
private String mSystem;
|
||||||
private String mSite;
|
private String mSite;
|
||||||
private String mAliasListName;
|
private String mAliasListName;
|
||||||
private CallEvent mPreviousDoNotMonitorCallEvent;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Monitors call events and allocates traffic decoder channels in response
|
* Monitors call events and allocates traffic decoder channels in response
|
||||||
@@ -77,7 +75,6 @@ public class TrafficChannelManager extends Module implements ICallEventProvider,
|
|||||||
* traffic channel allocations.
|
* traffic channel allocations.
|
||||||
*
|
*
|
||||||
* @param channelModel containing channels currently in use
|
* @param channelModel containing channels currently in use
|
||||||
* @param channelProcessingManager
|
|
||||||
* @param decodeConfiguration - decoder configuration to use for each
|
* @param decodeConfiguration - decoder configuration to use for each
|
||||||
* traffic channel allocation.
|
* traffic channel allocation.
|
||||||
* @param recordConfiguration - recording options for each traffic channel
|
* @param recordConfiguration - recording options for each traffic channel
|
||||||
@@ -88,7 +85,6 @@ public class TrafficChannelManager extends Module implements ICallEventProvider,
|
|||||||
* in the pool
|
* in the pool
|
||||||
*/
|
*/
|
||||||
public TrafficChannelManager(ChannelModel channelModel,
|
public TrafficChannelManager(ChannelModel channelModel,
|
||||||
ChannelProcessingManager channelProcessingManager,
|
|
||||||
DecodeConfiguration decodeConfiguration,
|
DecodeConfiguration decodeConfiguration,
|
||||||
RecordConfiguration recordConfiguration,
|
RecordConfiguration recordConfiguration,
|
||||||
String system,
|
String system,
|
||||||
@@ -97,7 +93,6 @@ public class TrafficChannelManager extends Module implements ICallEventProvider,
|
|||||||
int trafficChannelPoolSize)
|
int trafficChannelPoolSize)
|
||||||
{
|
{
|
||||||
mChannelModel = channelModel;
|
mChannelModel = channelModel;
|
||||||
mChannelProcessingManager = channelProcessingManager;
|
|
||||||
mDecodeConfiguration = decodeConfiguration;
|
mDecodeConfiguration = decodeConfiguration;
|
||||||
mRecordConfiguration = recordConfiguration;
|
mRecordConfiguration = recordConfiguration;
|
||||||
mSystem = system;
|
mSystem = system;
|
||||||
@@ -120,7 +115,6 @@ public class TrafficChannelManager extends Module implements ICallEventProvider,
|
|||||||
|
|
||||||
mCallEventListener = null;
|
mCallEventListener = null;
|
||||||
mDecodeConfiguration = null;
|
mDecodeConfiguration = null;
|
||||||
mPreviousDoNotMonitorCallEvent = null;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -197,21 +191,7 @@ public class TrafficChannelManager extends Module implements ICallEventProvider,
|
|||||||
|
|
||||||
long frequency = callEvent.getFrequency();
|
long frequency = callEvent.getFrequency();
|
||||||
|
|
||||||
/* Check the from/to aliases for do not monitor priority */
|
if(frequency > 0)
|
||||||
if(isDoNotMonitor(callEvent))
|
|
||||||
{
|
|
||||||
callEvent.setCallEventType(CallEventType.CALL_DO_NOT_MONITOR);
|
|
||||||
|
|
||||||
if(isSameCallEvent(mPreviousDoNotMonitorCallEvent, callEvent))
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
mPreviousDoNotMonitorCallEvent = callEvent;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if(frequency > 0)
|
|
||||||
{
|
{
|
||||||
Channel channel = getChannel(callEvent.getChannel(), new TunerChannel(Type.TRAFFIC,
|
Channel channel = getChannel(callEvent.getChannel(), new TunerChannel(Type.TRAFFIC,
|
||||||
frequency, mDecodeConfiguration.getDecoderType().getChannelBandwidth()));
|
frequency, mDecodeConfiguration.getDecoderType().getChannelBandwidth()));
|
||||||
@@ -330,31 +310,6 @@ public class TrafficChannelManager extends Module implements ICallEventProvider,
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Checks for aliases that contain a do not follow/process priority.
|
|
||||||
*
|
|
||||||
* @param event
|
|
||||||
* @return - true if there is an alias that has a do not process alias id
|
|
||||||
*/
|
|
||||||
private boolean isDoNotMonitor(CallEvent event)
|
|
||||||
{
|
|
||||||
Alias to = event.getToIDAlias();
|
|
||||||
|
|
||||||
if(to != null && to.hasCallPriority() && to.getCallPriority() == Priority.DO_NOT_MONITOR)
|
|
||||||
{
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
Alias from = event.getFromIDAlias();
|
|
||||||
|
|
||||||
if(from != null && from.hasCallPriority() && from.getCallPriority() == Priority.DO_NOT_MONITOR)
|
|
||||||
{
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Listener<DecoderStateEvent> getDecoderStateListener()
|
public Listener<DecoderStateEvent> getDecoderStateListener()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -320,7 +320,13 @@ public class ProcessingChain implements IChannelEventListener
|
|||||||
|
|
||||||
if(module instanceof IFrequencyChangeListener)
|
if(module instanceof IFrequencyChangeListener)
|
||||||
{
|
{
|
||||||
mFrequencyChangeEventBroadcaster.addListener(((IFrequencyChangeListener) module).getFrequencyChangeListener());
|
Listener<FrequencyChangeEvent> frequencyChangeEventListener =
|
||||||
|
((IFrequencyChangeListener)module).getFrequencyChangeListener();
|
||||||
|
|
||||||
|
if(frequencyChangeEventListener != null)
|
||||||
|
{
|
||||||
|
mFrequencyChangeEventBroadcaster.addListener(frequencyChangeEventListener);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(module instanceof IMessageListener)
|
if(module instanceof IMessageListener)
|
||||||
|
|||||||
@@ -222,7 +222,7 @@ public class DecoderFactory
|
|||||||
|
|
||||||
if(channelType == ChannelType.STANDARD)
|
if(channelType == ChannelType.STANDARD)
|
||||||
{
|
{
|
||||||
modules.add(new TrafficChannelManager(channelModel, channelProcessingManager, decodeConfig,
|
modules.add(new TrafficChannelManager(channelModel, decodeConfig,
|
||||||
channel.getRecordConfiguration(), channel.getSystem(), channel.getSite(),
|
channel.getRecordConfiguration(), channel.getSystem(), channel.getSite(),
|
||||||
(aliasList != null ? aliasList.getName() : null), mptConfig.getTrafficChannelPoolSize()));
|
(aliasList != null ? aliasList.getName() : null), mptConfig.getTrafficChannelPoolSize()));
|
||||||
}
|
}
|
||||||
@@ -263,7 +263,7 @@ public class DecoderFactory
|
|||||||
|
|
||||||
if(channelType == ChannelType.STANDARD)
|
if(channelType == ChannelType.STANDARD)
|
||||||
{
|
{
|
||||||
modules.add(new TrafficChannelManager(channelModel, channelProcessingManager, decodeConfig,
|
modules.add(new TrafficChannelManager(channelModel, decodeConfig,
|
||||||
channel.getRecordConfiguration(), channel.getSystem(), channel.getSite(),
|
channel.getRecordConfiguration(), channel.getSystem(), channel.getSite(),
|
||||||
(aliasList != null ? aliasList.getName() : null), p25Config.getTrafficChannelPoolSize()));
|
(aliasList != null ? aliasList.getName() : null), p25Config.getTrafficChannelPoolSize()));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ public class LJ1200DecoderState extends DecoderState
|
|||||||
super(aliasList);
|
super(aliasList);
|
||||||
|
|
||||||
mAddressAttribute = new AliasedStringAttributeMonitor(Attribute.SECONDARY_ADDRESS_TO,
|
mAddressAttribute = new AliasedStringAttributeMonitor(Attribute.SECONDARY_ADDRESS_TO,
|
||||||
getAttributeChangeRequestListener(), getAliasList(), AliasIDType.LOJACK);
|
getAttributeChangeRequestListener(), getAliasList(), AliasIDType.SITE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -315,6 +315,8 @@ public class P25DecoderState extends DecoderState
|
|||||||
*/
|
*/
|
||||||
public void registerCallEvent(P25CallEvent event)
|
public void registerCallEvent(P25CallEvent event)
|
||||||
{
|
{
|
||||||
|
String channel = event.getChannel();
|
||||||
|
|
||||||
if(mChannelCallMap.containsKey(event.getChannel()))
|
if(mChannelCallMap.containsKey(event.getChannel()))
|
||||||
{
|
{
|
||||||
P25CallEvent previousEvent = mChannelCallMap.remove(event.getChannel());
|
P25CallEvent previousEvent = mChannelCallMap.remove(event.getChannel());
|
||||||
@@ -419,7 +421,7 @@ public class P25DecoderState extends DecoderState
|
|||||||
mCurrentCallEvent = new P25CallEvent.Builder(CallEventType.CALL)
|
mCurrentCallEvent = new P25CallEvent.Builder(CallEventType.CALL)
|
||||||
.aliasList(getAliasList())
|
.aliasList(getAliasList())
|
||||||
.channel(mCurrentChannel)
|
.channel(mCurrentChannel)
|
||||||
.details((hdu.isEncrypted() ? "ENCRYPTED " : ""))
|
.details((hdu.isEncryptedAudio() ? "ENCRYPTED " : ""))
|
||||||
.frequency(mCurrentChannelFrequency)
|
.frequency(mCurrentChannelFrequency)
|
||||||
.to(to)
|
.to(to)
|
||||||
.build();
|
.build();
|
||||||
@@ -1105,7 +1107,7 @@ public class P25DecoderState extends DecoderState
|
|||||||
broadcast(new P25CallEvent.Builder(CallEventType.CALL_DETECT)
|
broadcast(new P25CallEvent.Builder(CallEventType.CALL_DETECT)
|
||||||
.aliasList(getAliasList())
|
.aliasList(getAliasList())
|
||||||
.channel(gvcu.getChannelA())
|
.channel(gvcu.getChannelA())
|
||||||
.details((gvcu.isEncrypted() ? "ENCRYPTED" : ""))
|
.details((gvcu.isEncryptedLinkControlWord() ? "ENCRYPTED" : ""))
|
||||||
.frequency(gvcu.getDownlinkFrequencyA())
|
.frequency(gvcu.getDownlinkFrequencyA())
|
||||||
.to(userA)
|
.to(userA)
|
||||||
.build());
|
.build());
|
||||||
@@ -1120,7 +1122,7 @@ public class P25DecoderState extends DecoderState
|
|||||||
broadcast(new P25CallEvent.Builder(CallEventType.CALL_DETECT)
|
broadcast(new P25CallEvent.Builder(CallEventType.CALL_DETECT)
|
||||||
.aliasList(getAliasList())
|
.aliasList(getAliasList())
|
||||||
.channel(gvcu.getChannelB())
|
.channel(gvcu.getChannelB())
|
||||||
.details((gvcu.isEncrypted() ? "ENCRYPTED" : ""))
|
.details((gvcu.isEncryptedLinkControlWord() ? "ENCRYPTED" : ""))
|
||||||
.frequency(gvcu.getDownlinkFrequencyB())
|
.frequency(gvcu.getDownlinkFrequencyB())
|
||||||
.to(userB)
|
.to(userB)
|
||||||
.build());
|
.build());
|
||||||
@@ -1149,7 +1151,7 @@ public class P25DecoderState extends DecoderState
|
|||||||
broadcast(new P25CallEvent.Builder(CallEventType.CALL_DETECT)
|
broadcast(new P25CallEvent.Builder(CallEventType.CALL_DETECT)
|
||||||
.aliasList(getAliasList())
|
.aliasList(getAliasList())
|
||||||
.channel(gvcue.getTransmitChannel())
|
.channel(gvcue.getTransmitChannel())
|
||||||
.details((gvcue.isEncrypted() ? "ENCRYPTED" : ""))
|
.details((gvcue.isEncryptedLinkControlWord() ? "ENCRYPTED" : ""))
|
||||||
.frequency(gvcue.getDownlinkFrequency())
|
.frequency(gvcue.getDownlinkFrequency())
|
||||||
.to(group)
|
.to(group)
|
||||||
.build());
|
.build());
|
||||||
@@ -1185,7 +1187,7 @@ public class P25DecoderState extends DecoderState
|
|||||||
if(mCurrentCallEvent.getDetails() == null)
|
if(mCurrentCallEvent.getDetails() == null)
|
||||||
{
|
{
|
||||||
mCurrentCallEvent.setDetails(
|
mCurrentCallEvent.setDetails(
|
||||||
(gvcuser.isEncrypted() ? "ENCRYPTED " : "") +
|
(gvcuser.isEncryptedLinkControlWord() ? "ENCRYPTED " : "") +
|
||||||
(gvcuser.isEmergency() ? "EMERGENCY " : ""));
|
(gvcuser.isEmergency() ? "EMERGENCY " : ""));
|
||||||
|
|
||||||
broadcast(mCurrentCallEvent);
|
broadcast(mCurrentCallEvent);
|
||||||
@@ -1397,7 +1399,7 @@ public class P25DecoderState extends DecoderState
|
|||||||
if(mCurrentCallEvent.getDetails() == null)
|
if(mCurrentCallEvent.getDetails() == null)
|
||||||
{
|
{
|
||||||
mCurrentCallEvent.setDetails(
|
mCurrentCallEvent.setDetails(
|
||||||
(tivcu.isEncrypted() ? "ENCRYPTED " : "") +
|
(tivcu.isEncryptedLinkControlWord() ? "ENCRYPTED " : "") +
|
||||||
(tivcu.isEmergency() ? "EMERGENCY " : ""));
|
(tivcu.isEmergency() ? "EMERGENCY " : ""));
|
||||||
|
|
||||||
broadcast(mCurrentCallEvent);
|
broadcast(mCurrentCallEvent);
|
||||||
@@ -1480,7 +1482,7 @@ public class P25DecoderState extends DecoderState
|
|||||||
if(mCurrentCallEvent.getDetails() == null)
|
if(mCurrentCallEvent.getDetails() == null)
|
||||||
{
|
{
|
||||||
mCurrentCallEvent.setDetails(
|
mCurrentCallEvent.setDetails(
|
||||||
(uuvcu.isEncrypted() ? "ENCRYPTED " : "") +
|
(uuvcu.isEncryptedLinkControlWord() ? "ENCRYPTED " : "") +
|
||||||
(uuvcu.isEmergency() ? "EMERGENCY " : ""));
|
(uuvcu.isEmergency() ? "EMERGENCY " : ""));
|
||||||
|
|
||||||
broadcast(mCurrentCallEvent);
|
broadcast(mCurrentCallEvent);
|
||||||
@@ -1557,6 +1559,7 @@ public class P25DecoderState extends DecoderState
|
|||||||
break;
|
break;
|
||||||
case IDENTIFIER_UPDATE_NON_VUHF:
|
case IDENTIFIER_UPDATE_NON_VUHF:
|
||||||
case IDENTIFIER_UPDATE_VHF_UHF_BANDS:
|
case IDENTIFIER_UPDATE_VHF_UHF_BANDS:
|
||||||
|
case IDENTIFIER_UPDATE_TDMA:
|
||||||
IdentifierUpdate iu = (IdentifierUpdate)tsbk;
|
IdentifierUpdate iu = (IdentifierUpdate)tsbk;
|
||||||
|
|
||||||
if(!mBands.containsKey(iu.getIdentifier()))
|
if(!mBands.containsKey(iu.getIdentifier()))
|
||||||
@@ -2735,6 +2738,7 @@ public class P25DecoderState extends DecoderState
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
StringBuilder details = new StringBuilder();
|
StringBuilder details = new StringBuilder();
|
||||||
|
details.append(pgvcg.isTDMAChannel() ? "TDMA " : "");
|
||||||
details.append(pgvcg.isEmergency() ? "EMERGENCY " : "");
|
details.append(pgvcg.isEmergency() ? "EMERGENCY " : "");
|
||||||
details.append("PRI:").append(pgvcg.getPriority());
|
details.append("PRI:").append(pgvcg.getPriority());
|
||||||
details.append(pgvcg.isEncryptedChannel() ? " ENCRYPTED" : "");
|
details.append(pgvcg.isEncryptedChannel() ? " ENCRYPTED" : "");
|
||||||
@@ -2742,7 +2746,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 + (pgvcg.isTDMAChannel() ? " TDMA" : ""))
|
.channel(channel)
|
||||||
.details(details.toString())
|
.details(details.toString())
|
||||||
.frequency(pgvcg.getDownlinkFrequency())
|
.frequency(pgvcg.getDownlinkFrequency())
|
||||||
.from(from)
|
.from(from)
|
||||||
@@ -2775,8 +2779,9 @@ 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 + (gvcgu.isTDMAChannel1() ? " TDMA" : ""))
|
.channel(channel)
|
||||||
.details((gvcgu.isEncrypted() ? "ENCRYPTED " : ""))
|
.details((gvcgu.isTDMAChannel1() ? "TDMA " : "") +
|
||||||
|
(gvcgu.isEncrypted() ? "ENCRYPTED " : ""))
|
||||||
.frequency(gvcgu.getDownlinkFrequency1())
|
.frequency(gvcgu.getDownlinkFrequency1())
|
||||||
.to(to)
|
.to(to)
|
||||||
.build();
|
.build();
|
||||||
@@ -2801,8 +2806,9 @@ 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(channel2 + (gvcgu.isTDMAChannel2() ? " TDMA" : ""))
|
.channel(channel2)
|
||||||
.details((gvcgu.isEncrypted() ? "ENCRYPTED " : ""))
|
.details((gvcgu.isTDMAChannel2() ? "TDMA " : "") +
|
||||||
|
(gvcgu.isEncrypted() ? "ENCRYPTED " : ""))
|
||||||
.frequency(gvcgu.getDownlinkFrequency2())
|
.frequency(gvcgu.getDownlinkFrequency2())
|
||||||
.to(to2)
|
.to(to2)
|
||||||
.build();
|
.build();
|
||||||
@@ -2866,6 +2872,7 @@ public class P25DecoderState extends DecoderState
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
StringBuilder details = new StringBuilder();
|
StringBuilder details = new StringBuilder();
|
||||||
|
details.append(gdcg.isTDMAChannel() ? "TDMA " : "");
|
||||||
details.append(gdcg.isEmergency() ? "EMERGENCY " : "");
|
details.append(gdcg.isEmergency() ? "EMERGENCY " : "");
|
||||||
details.append("PRI:").append(gdcg.getPriority()).append(" ");
|
details.append("PRI:").append(gdcg.getPriority()).append(" ");
|
||||||
details.append(gdcg.isEncryptedChannel() ? "ENCRYPTED " : "");
|
details.append(gdcg.isEncryptedChannel() ? "ENCRYPTED " : "");
|
||||||
@@ -2873,7 +2880,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 + (gdcg.isTDMAChannel() ? " TDMA" : ""))
|
.channel(channel)
|
||||||
.details(details.toString())
|
.details(details.toString())
|
||||||
.frequency(gdcg.getDownlinkFrequency())
|
.frequency(gdcg.getDownlinkFrequency())
|
||||||
.from(from)
|
.from(from)
|
||||||
@@ -2904,6 +2911,7 @@ public class P25DecoderState extends DecoderState
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
StringBuilder details = new StringBuilder();
|
StringBuilder details = new StringBuilder();
|
||||||
|
details.append(gvcg.isTDMAChannel() ? "TDMA " : "");
|
||||||
details.append(gvcg.isEmergency() ? "EMERGENCY " : "");
|
details.append(gvcg.isEmergency() ? "EMERGENCY " : "");
|
||||||
details.append("PRI:").append(gvcg.getPriority()).append(" ");
|
details.append("PRI:").append(gvcg.getPriority()).append(" ");
|
||||||
details.append(gvcg.isEncryptedChannel() ? "ENCRYPTED " : "");
|
details.append(gvcg.isEncryptedChannel() ? "ENCRYPTED " : "");
|
||||||
@@ -2911,7 +2919,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 + (gvcg.isTDMAChannel() ? " TDMA" : ""))
|
.channel(channel)
|
||||||
.details(details.toString())
|
.details(details.toString())
|
||||||
.frequency(gvcg.getDownlinkFrequency())
|
.frequency(gvcg.getDownlinkFrequency())
|
||||||
.from(from)
|
.from(from)
|
||||||
@@ -2928,8 +2936,7 @@ public class P25DecoderState extends DecoderState
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case GROUP_VOICE_CHANNEL_GRANT_UPDATE:
|
case GROUP_VOICE_CHANNEL_GRANT_UPDATE:
|
||||||
GroupVoiceChannelGrantUpdate gvcgu =
|
GroupVoiceChannelGrantUpdate gvcgu = (GroupVoiceChannelGrantUpdate)message;
|
||||||
(GroupVoiceChannelGrantUpdate)message;
|
|
||||||
|
|
||||||
channel = gvcgu.getChannel1();
|
channel = gvcgu.getChannel1();
|
||||||
from = null;
|
from = null;
|
||||||
@@ -2942,6 +2949,7 @@ public class P25DecoderState extends DecoderState
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
StringBuilder details = new StringBuilder();
|
StringBuilder details = new StringBuilder();
|
||||||
|
details.append(gvcgu.isTDMAChannel() ? "TDMA " : "");
|
||||||
details.append(gvcgu.isEmergency() ? "EMERGENCY " : "");
|
details.append(gvcgu.isEmergency() ? "EMERGENCY " : "");
|
||||||
details.append("PRI:").append(gvcgu.getPriority()).append(" ");
|
details.append("PRI:").append(gvcgu.getPriority()).append(" ");
|
||||||
details.append(gvcgu.isEncryptedChannel() ? "ENCRYPTED " : "");
|
details.append(gvcgu.isEncryptedChannel() ? "ENCRYPTED " : "");
|
||||||
@@ -2949,7 +2957,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(gvcgu.getChannel1() + (gvcgu.isTDMAChannel1() ? " TDMA" : ""))
|
.channel(gvcgu.getChannel1())
|
||||||
.details(details.toString())
|
.details(details.toString())
|
||||||
.frequency(gvcgu.getDownlinkFrequency1())
|
.frequency(gvcgu.getDownlinkFrequency1())
|
||||||
.from(from)
|
.from(from)
|
||||||
@@ -2977,6 +2985,7 @@ public class P25DecoderState extends DecoderState
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
StringBuilder details = new StringBuilder();
|
StringBuilder details = new StringBuilder();
|
||||||
|
details.append(gvcgu.isTDMAChannel() ? "TDMA " : "");
|
||||||
details.append(gvcgu.isEmergency() ? "EMERGENCY " : "");
|
details.append(gvcgu.isEmergency() ? "EMERGENCY " : "");
|
||||||
details.append("PRI:").append(gvcgu.getPriority()).append(" ");
|
details.append("PRI:").append(gvcgu.getPriority()).append(" ");
|
||||||
details.append(gvcgu.isEncryptedChannel() ? "ENCRYPTED " : "");
|
details.append(gvcgu.isEncryptedChannel() ? "ENCRYPTED " : "");
|
||||||
@@ -2984,7 +2993,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() + (gvcgu.isTDMAChannel2() ? " TDMA" : ""))
|
.channel(gvcgu.getChannel2())
|
||||||
.details(details.toString())
|
.details(details.toString())
|
||||||
.frequency(gvcgu.getDownlinkFrequency2())
|
.frequency(gvcgu.getDownlinkFrequency2())
|
||||||
.to(gvcgu.getGroupAddress2())
|
.to(gvcgu.getGroupAddress2())
|
||||||
@@ -3016,6 +3025,7 @@ public class P25DecoderState extends DecoderState
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
StringBuilder details = new StringBuilder();
|
StringBuilder details = new StringBuilder();
|
||||||
|
details.append(gvcgue.isTDMAChannel() ? "TDMA " : "");
|
||||||
details.append(gvcgue.isEmergency() ? "EMERGENCY " : "");
|
details.append(gvcgue.isEmergency() ? "EMERGENCY " : "");
|
||||||
details.append("PRI:").append(gvcgue.getPriority()).append(" ");
|
details.append("PRI:").append(gvcgue.getPriority()).append(" ");
|
||||||
details.append(gvcgue.isEncryptedChannel() ? "ENCRYPTED " : "");
|
details.append(gvcgue.isEncryptedChannel() ? "ENCRYPTED " : "");
|
||||||
@@ -3023,7 +3033,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 + (gvcgue.isTDMAChannel() ? " TDMA" : ""))
|
.channel(channel)
|
||||||
.details(details.toString())
|
.details(details.toString())
|
||||||
.frequency(gvcgue.getDownlinkFrequency())
|
.frequency(gvcgue.getDownlinkFrequency())
|
||||||
.from(from)
|
.from(from)
|
||||||
@@ -3053,6 +3063,7 @@ public class P25DecoderState extends DecoderState
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
StringBuilder details = new StringBuilder();
|
StringBuilder details = new StringBuilder();
|
||||||
|
details.append(idcg.isTDMAChannel() ? "TDMA " : "");
|
||||||
details.append(idcg.isEmergency() ? "EMERGENCY " : "");
|
details.append(idcg.isEmergency() ? "EMERGENCY " : "");
|
||||||
details.append("PRI:").append(idcg.getPriority()).append(" ");
|
details.append("PRI:").append(idcg.getPriority()).append(" ");
|
||||||
details.append(idcg.isEncryptedChannel() ? "ENCRYPTED " : "");
|
details.append(idcg.isEncryptedChannel() ? "ENCRYPTED " : "");
|
||||||
@@ -3060,7 +3071,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 + (idcg.isTDMAChannel() ? " TDMA" : ""))
|
.channel(channel)
|
||||||
.details(details.toString())
|
.details(details.toString())
|
||||||
.frequency(idcg.getDownlinkFrequency())
|
.frequency(idcg.getDownlinkFrequency())
|
||||||
.from(from)
|
.from(from)
|
||||||
@@ -3090,13 +3101,14 @@ public class P25DecoderState extends DecoderState
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
StringBuilder details = new StringBuilder();
|
StringBuilder details = new StringBuilder();
|
||||||
|
details.append(sdcg.isTDMAChannel() ? "TDMA " : "");
|
||||||
details.append(sdcg.isEmergency() ? "EMERGENCY " : "");
|
details.append(sdcg.isEmergency() ? "EMERGENCY " : "");
|
||||||
details.append(sdcg.isEncryptedChannel() ? "ENCRYPTED " : "");
|
details.append(sdcg.isEncryptedChannel() ? "ENCRYPTED " : "");
|
||||||
details.append(sdcg.getSessionMode().name());
|
details.append(sdcg.getSessionMode().name());
|
||||||
|
|
||||||
P25CallEvent event = new P25CallEvent.Builder(CallEventType.DATA_CALL)
|
P25CallEvent event = new P25CallEvent.Builder(CallEventType.DATA_CALL)
|
||||||
.aliasList(getAliasList())
|
.aliasList(getAliasList())
|
||||||
.channel(channel + (sdcg.isTDMAChannel() ? " TDMA" : ""))
|
.channel(channel)
|
||||||
.details(details.toString())
|
.details(details.toString())
|
||||||
.frequency(sdcg.getDownlinkFrequency())
|
.frequency(sdcg.getDownlinkFrequency())
|
||||||
.from(from)
|
.from(from)
|
||||||
@@ -3128,6 +3140,7 @@ public class P25DecoderState extends DecoderState
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
StringBuilder details = new StringBuilder();
|
StringBuilder details = new StringBuilder();
|
||||||
|
details.append(tivcg.isTDMAChannel() ? "TDMA " : "");
|
||||||
details.append(tivcg.isEmergency() ? "EMERGENCY " : "");
|
details.append(tivcg.isEmergency() ? "EMERGENCY " : "");
|
||||||
details.append("PRI:").append(tivcg.getPriority()).append(" ");
|
details.append("PRI:").append(tivcg.getPriority()).append(" ");
|
||||||
details.append(tivcg.isEncryptedChannel() ? "ENCRYPTED " : "");
|
details.append(tivcg.isEncryptedChannel() ? "ENCRYPTED " : "");
|
||||||
@@ -3137,7 +3150,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 + (tivcg.isTDMAChannel() ? " TDMA" : ""))
|
.channel(channel)
|
||||||
.details(details.toString())
|
.details(details.toString())
|
||||||
.frequency(tivcg.getDownlinkFrequency())
|
.frequency(tivcg.getDownlinkFrequency())
|
||||||
.from(from)
|
.from(from)
|
||||||
@@ -3170,6 +3183,7 @@ public class P25DecoderState extends DecoderState
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
StringBuilder details = new StringBuilder();
|
StringBuilder details = new StringBuilder();
|
||||||
|
details.append(tivcgu.isTDMAChannel() ? "TDMA " : "");
|
||||||
details.append(tivcgu.isEmergency() ? "EMERGENCY " : "");
|
details.append(tivcgu.isEmergency() ? "EMERGENCY " : "");
|
||||||
details.append("PRI:").append(tivcgu.getPriority()).append(" ");
|
details.append("PRI:").append(tivcgu.getPriority()).append(" ");
|
||||||
details.append(tivcgu.isEncryptedChannel() ? "ENCRYPTED " : "");
|
details.append(tivcgu.isEncryptedChannel() ? "ENCRYPTED " : "");
|
||||||
@@ -3179,7 +3193,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 + (tivcgu.isTDMAChannel() ? " TDMA" : ""))
|
.channel(channel)
|
||||||
.details(details.toString())
|
.details(details.toString())
|
||||||
.frequency(tivcgu.getDownlinkFrequency())
|
.frequency(tivcgu.getDownlinkFrequency())
|
||||||
.from(from)
|
.from(from)
|
||||||
@@ -3209,6 +3223,7 @@ public class P25DecoderState extends DecoderState
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
StringBuilder details = new StringBuilder();
|
StringBuilder details = new StringBuilder();
|
||||||
|
details.append(uuvcg.isTDMAChannel() ? "TDMA " : "");
|
||||||
details.append(uuvcg.isEmergency() ? "EMERGENCY " : "");
|
details.append(uuvcg.isEmergency() ? "EMERGENCY " : "");
|
||||||
details.append("PRI:").append(uuvcg.getPriority()).append(" ");
|
details.append("PRI:").append(uuvcg.getPriority()).append(" ");
|
||||||
details.append(uuvcg.isEncryptedChannel() ? " ENCRYPTED " : "");
|
details.append(uuvcg.isEncryptedChannel() ? " ENCRYPTED " : "");
|
||||||
@@ -3217,7 +3232,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 + (uuvcg.isTDMAChannel() ? " TDMA" : ""))
|
.channel(channel)
|
||||||
.details(details.toString())
|
.details(details.toString())
|
||||||
.frequency(uuvcg.getDownlinkFrequency())
|
.frequency(uuvcg.getDownlinkFrequency())
|
||||||
.from(from)
|
.from(from)
|
||||||
@@ -3247,6 +3262,7 @@ public class P25DecoderState extends DecoderState
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
StringBuilder details = new StringBuilder();
|
StringBuilder details = new StringBuilder();
|
||||||
|
details.append(uuvcgu.isTDMAChannel() ? "TDMA " : "");
|
||||||
details.append(uuvcgu.isEmergency() ? "EMERGENCY " : "");
|
details.append(uuvcgu.isEmergency() ? "EMERGENCY " : "");
|
||||||
details.append("PRI:").append(uuvcgu.getPriority()).append(" ");
|
details.append("PRI:").append(uuvcgu.getPriority()).append(" ");
|
||||||
details.append(uuvcgu.isEncryptedChannel() ? "ENCRYPTED " : "");
|
details.append(uuvcgu.isEncryptedChannel() ? "ENCRYPTED " : "");
|
||||||
@@ -3255,7 +3271,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 + (uuvcgu.isTDMAChannel() ? " TDMA" : ""))
|
.channel(channel)
|
||||||
.details(details.toString())
|
.details(details.toString())
|
||||||
.frequency(uuvcgu.getDownlinkFrequency())
|
.frequency(uuvcgu.getDownlinkFrequency())
|
||||||
.from(from)
|
.from(from)
|
||||||
|
|||||||
@@ -12,6 +12,9 @@ import jmbe.iface.AudioConverter;
|
|||||||
import message.IMessageListener;
|
import message.IMessageListener;
|
||||||
import message.Message;
|
import message.Message;
|
||||||
import module.Module;
|
import module.Module;
|
||||||
|
import module.decode.p25.message.hdu.HDUMessage;
|
||||||
|
import module.decode.p25.message.ldu.LDU1Message;
|
||||||
|
import module.decode.p25.message.ldu.LDU2Message;
|
||||||
import module.decode.p25.message.ldu.LDUMessage;
|
import module.decode.p25.message.ldu.LDUMessage;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
@@ -25,14 +28,18 @@ public class P25AudioModule extends Module implements Listener<Message>, IAudioP
|
|||||||
private final static Logger mLog = LoggerFactory.getLogger(P25AudioModule.class);
|
private final static Logger mLog = LoggerFactory.getLogger(P25AudioModule.class);
|
||||||
|
|
||||||
private static final String IMBE_CODEC = "IMBE";
|
private static final String IMBE_CODEC = "IMBE";
|
||||||
|
|
||||||
private static boolean mLibraryLoadStatusLogged = false;
|
private static boolean mLibraryLoadStatusLogged = false;
|
||||||
|
|
||||||
private boolean mCanConvertAudio = false;
|
private boolean mCanConvertAudio = false;
|
||||||
|
private boolean mEncryptedCall = false;
|
||||||
|
private boolean mEncryptedCallStateEstablished = false;
|
||||||
|
|
||||||
private AudioConverter mAudioConverter;
|
private AudioConverter mAudioConverter;
|
||||||
private Listener<AudioPacket> mAudioPacketListener;
|
private Listener<AudioPacket> mAudioPacketListener;
|
||||||
private SquelchStateListener mSquelchStateListener = new SquelchStateListener();
|
private SquelchStateListener mSquelchStateListener = new SquelchStateListener();
|
||||||
private NonClippingGain mGain = new NonClippingGain(5.0f, 0.95f);
|
private NonClippingGain mGain = new NonClippingGain(5.0f, 0.95f);
|
||||||
private Metadata mMetadata;
|
private Metadata mMetadata;
|
||||||
|
private LDU1Message mCachedLDU1Message = null;
|
||||||
|
|
||||||
public P25AudioModule(Metadata metadata)
|
public P25AudioModule(Metadata metadata)
|
||||||
{
|
{
|
||||||
@@ -76,21 +83,60 @@ public class P25AudioModule extends Module implements Listener<Message>, IAudioP
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Primary processing method for p25 imbe audio frame messages. Each LDU
|
* Processes call header (HDU) and voice frame (LDU1/LDU2) messages to decode audio and to determine the
|
||||||
* audio message contains 9 imbe voice frames. Each frame is converted to
|
* encrypted audio status of a call event. Only the HDU and LDU2 messages convey encrypted call status. If an
|
||||||
* audio when the JMBE library is loaded, processed by auto-gain, and
|
* LDU1 message is received without a preceding HDU message, then the LDU1 message is cached until the first
|
||||||
* broadcast to the audio packet listener.
|
* LDU2 message is received and the encryption state can be determined. Both the LDU1 and the LDU2 message are
|
||||||
|
* then processed for audio if the call is unencrypted.
|
||||||
*/
|
*/
|
||||||
public void receive(Message message)
|
public void receive(Message message)
|
||||||
{
|
{
|
||||||
if(mCanConvertAudio && mAudioPacketListener != null)
|
if(mCanConvertAudio && mAudioPacketListener != null)
|
||||||
|
{
|
||||||
|
if(mEncryptedCallStateEstablished)
|
||||||
{
|
{
|
||||||
if(message instanceof LDUMessage)
|
if(message instanceof LDUMessage)
|
||||||
{
|
{
|
||||||
LDUMessage ldu = (LDUMessage) message;
|
processAudio((LDUMessage)message);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if(message instanceof HDUMessage)
|
||||||
|
{
|
||||||
|
mEncryptedCallStateEstablished = true;
|
||||||
|
mEncryptedCall = ((HDUMessage)message).isEncryptedAudio();
|
||||||
|
}
|
||||||
|
else if(message instanceof LDU1Message)
|
||||||
|
{
|
||||||
|
//When we receive an LDU1 message with first receiving the HDU message, cache the LDU1 Message
|
||||||
|
//until we can determine the encrypted call state from the next LDU2 message
|
||||||
|
mCachedLDU1Message = (LDU1Message)message;
|
||||||
|
}
|
||||||
|
else if(message instanceof LDU2Message)
|
||||||
|
{
|
||||||
|
mEncryptedCallStateEstablished = true;
|
||||||
|
LDU2Message ldu2 = (LDU2Message)message;
|
||||||
|
mEncryptedCall = ldu2.isEncryptedAudio();
|
||||||
|
|
||||||
/* Only process unencrypted audio frames */
|
if(mCachedLDU1Message != null)
|
||||||
if (!(ldu.isValid() && ldu.isEncrypted()))
|
{
|
||||||
|
processAudio(mCachedLDU1Message);
|
||||||
|
mCachedLDU1Message = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
processAudio(ldu2);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Processes an audio packet by decoding the IMBE audio frames and rebroadcasting them as PCM audio packets.
|
||||||
|
*/
|
||||||
|
private void processAudio(LDUMessage ldu)
|
||||||
|
{
|
||||||
|
if(!mEncryptedCall)
|
||||||
{
|
{
|
||||||
for(byte[] frame : ldu.getIMBEFrames())
|
for(byte[] frame : ldu.getIMBEFrames())
|
||||||
{
|
{
|
||||||
@@ -101,7 +147,9 @@ public class P25AudioModule extends Module implements Listener<Message>, IAudioP
|
|||||||
mAudioPacketListener.receive(new AudioPacket(audio, mMetadata.copyOf()));
|
mAudioPacketListener.receive(new AudioPacket(audio, mMetadata.copyOf()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
else
|
||||||
|
{
|
||||||
|
//Encrypted audio processing not implemented
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -196,20 +244,26 @@ public class P25AudioModule extends Module implements Listener<Message>, IAudioP
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Wrapper for squelch state listener. Internally, the P25 audio module
|
* Wrapper for squelch state to process end of call actions. At call end the encrypted call state established
|
||||||
* doesn't have a squelch state. If there are IMBE audio frames, we have
|
* flag is reset so that the encrypted audio state for the next call can be properly detected and we send an
|
||||||
* audio. We use this listener to signal to the recorder manager that the
|
* END audio packet so that downstream processors like the audio recorder can properly close out a call sequence.
|
||||||
* channel state is resetting and it should end the recording.
|
|
||||||
*/
|
*/
|
||||||
public class SquelchStateListener implements Listener<SquelchState>
|
public class SquelchStateListener implements Listener<SquelchState>
|
||||||
{
|
{
|
||||||
@Override
|
@Override
|
||||||
public void receive(SquelchState state)
|
public void receive(SquelchState state)
|
||||||
{
|
{
|
||||||
if (state == SquelchState.SQUELCH && mAudioPacketListener != null)
|
if(state == SquelchState.SQUELCH)
|
||||||
|
{
|
||||||
|
if(mAudioPacketListener != null)
|
||||||
{
|
{
|
||||||
mAudioPacketListener.receive(new AudioPacket(AudioPacket.Type.END, mMetadata.copyOf()));
|
mAudioPacketListener.receive(new AudioPacket(AudioPacket.Type.END, mMetadata.copyOf()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
mEncryptedCallStateEstablished = false;
|
||||||
|
mEncryptedCall = false;
|
||||||
|
mCachedLDU1Message = null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -245,7 +245,7 @@ public class HDUMessage extends P25Message
|
|||||||
return Encryption.fromValue( mMessage.getInt( ALGORITHM_ID ) );
|
return Encryption.fromValue( mMessage.getInt( ALGORITHM_ID ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isEncrypted()
|
public boolean isEncryptedAudio()
|
||||||
{
|
{
|
||||||
return getEncryption() != Encryption.UNENCRYPTED;
|
return getEncryption() != Encryption.UNENCRYPTED;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,24 +1,22 @@
|
|||||||
package module.decode.p25.message.ldu;
|
package module.decode.p25.message.ldu;
|
||||||
|
|
||||||
import module.decode.p25.reference.DataUnitID;
|
|
||||||
import module.decode.p25.reference.LinkControlOpcode;
|
|
||||||
import module.decode.p25.reference.Vendor;
|
|
||||||
import module.decode.p25.reference.VendorLinkControlOpcode;
|
|
||||||
|
|
||||||
import org.slf4j.Logger;
|
|
||||||
import org.slf4j.LoggerFactory;
|
|
||||||
|
|
||||||
import alias.AliasList;
|
import alias.AliasList;
|
||||||
import bits.BinaryMessage;
|
import bits.BinaryMessage;
|
||||||
import edac.CRC;
|
import edac.CRC;
|
||||||
import edac.Hamming10;
|
import edac.Hamming10;
|
||||||
import edac.ReedSolomon_63_47_17;
|
import edac.ReedSolomon_63_47_17;
|
||||||
|
import module.decode.p25.reference.DataUnitID;
|
||||||
|
import module.decode.p25.reference.LinkControlOpcode;
|
||||||
|
import module.decode.p25.reference.Vendor;
|
||||||
|
import module.decode.p25.reference.VendorLinkControlOpcode;
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
public class LDU1Message extends LDUMessage
|
public class LDU1Message extends LDUMessage
|
||||||
{
|
{
|
||||||
private final static Logger mLog = LoggerFactory.getLogger(LDU1Message.class);
|
private final static Logger mLog = LoggerFactory.getLogger(LDU1Message.class);
|
||||||
|
|
||||||
public static final int ENCRYPTION_FLAG = 352;
|
public static final int ENCRYPTED_LINK_CONTROL_WORD_FLAG = 352;
|
||||||
public static final int IMPLICIT_VENDOR_FLAG = 353;
|
public static final int IMPLICIT_VENDOR_FLAG = 353;
|
||||||
public static final int[] OPCODE = {354, 355, 356, 357, 362, 363};
|
public static final int[] OPCODE = {354, 355, 356, 357, 362, 363};
|
||||||
public static final int[] VENDOR = {364, 365, 366, 367, 372, 373, 374, 375};
|
public static final int[] VENDOR = {364, 365, 366, 367, 372, 373, 374, 375};
|
||||||
@@ -81,10 +79,14 @@ public class LDU1Message extends LDUMessage
|
|||||||
mCRC = message.mCRC;
|
mCRC = message.mCRC;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
/**
|
||||||
public boolean isEncrypted()
|
* Indicates if the contents of the Link Control Word are encrypted.
|
||||||
|
*
|
||||||
|
* @return true if the contents of the LCW are encrypted.
|
||||||
|
*/
|
||||||
|
public boolean isEncryptedLinkControlWord()
|
||||||
{
|
{
|
||||||
return mMessage.get( ENCRYPTION_FLAG );
|
return mMessage.get(ENCRYPTED_LINK_CONTROL_WORD_FLAG);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void checkCRC()
|
private void checkCRC()
|
||||||
@@ -197,7 +199,7 @@ public class LDU1Message extends LDUMessage
|
|||||||
|
|
||||||
sb.append(super.getMessageStub());
|
sb.append(super.getMessageStub());
|
||||||
|
|
||||||
if( isEncrypted() )
|
if(isEncryptedLinkControlWord())
|
||||||
{
|
{
|
||||||
sb.append("ENCRYPTED");
|
sb.append("ENCRYPTED");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -73,8 +73,10 @@ public class LDU2Message extends LDUMessage
|
|||||||
checkCRC();
|
checkCRC();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
/**
|
||||||
public boolean isEncrypted()
|
* Indicates if the audio stream is encrypted
|
||||||
|
*/
|
||||||
|
public boolean isEncryptedAudio()
|
||||||
{
|
{
|
||||||
Encryption encryption = getEncryption();
|
Encryption encryption = getEncryption();
|
||||||
|
|
||||||
|
|||||||
@@ -35,8 +35,6 @@ public abstract class LDUMessage extends P25Message
|
|||||||
super( message, duid, aliasList );
|
super( message, duid, aliasList );
|
||||||
}
|
}
|
||||||
|
|
||||||
public abstract boolean isEncrypted();
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getMessage()
|
public String getMessage()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ public class IdentifierUpdateTDMA extends IdentifierUpdate
|
|||||||
|
|
||||||
sb.append( " ID:" + getIdentifier() );
|
sb.append( " ID:" + getIdentifier() );
|
||||||
sb.append( " BASE:" + getBaseFrequency() );
|
sb.append( " BASE:" + getBaseFrequency() );
|
||||||
sb.append( " BW:" + getBandwidth() );
|
sb.append( " BANDWIDTH:" + getBandwidth() );
|
||||||
sb.append( " SPACING:" + getChannelSpacing() );
|
sb.append( " SPACING:" + getChannelSpacing() );
|
||||||
sb.append( " OFFSET:" + getTransmitOffset() );
|
sb.append( " OFFSET:" + getTransmitOffset() );
|
||||||
sb.append( " TYPE:" + getChannelType().toString() );
|
sb.append( " TYPE:" + getChannelType().toString() );
|
||||||
@@ -137,7 +137,7 @@ public class IdentifierUpdateTDMA extends IdentifierUpdate
|
|||||||
|
|
||||||
sb.append( mAccessType.name() );
|
sb.append( mAccessType.name() );
|
||||||
sb.append( " BANDWIDTH:" + mBandwidth );
|
sb.append( " BANDWIDTH:" + mBandwidth );
|
||||||
sb.append( " SLOT/CARRIER:" + mSlotsPerCarrier );
|
sb.append( " TIMESLOTS PER CARRIER:" + mSlotsPerCarrier );
|
||||||
sb.append( " VOCODER:" + mVocoder.name() );
|
sb.append( " VOCODER:" + mVocoder.name() );
|
||||||
|
|
||||||
return sb.toString();
|
return sb.toString();
|
||||||
|
|||||||
Reference in New Issue
Block a user