Skip to content

Commit

Permalink
#296 APCO25 Phase II Decoder Implementation (#589)
Browse files Browse the repository at this point in the history
P25 Phase 2 Decoder implementation.
  • Loading branch information
DSheirer authored Nov 17, 2019
1 parent d5b802e commit f934676
Show file tree
Hide file tree
Showing 561 changed files with 35,560 additions and 6,166 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ out/
*.class
*.log
# Package Files #
*.jar
#*.jar

# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*
Expand Down
2 changes: 2 additions & 0 deletions .idea/compiler.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 1 addition & 3 deletions .idea/libraries/imports.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,15 @@ dependencies {
compile 'ch.qos.logback:logback-core:1.2.3'
compile 'ch.qos.logback:logback-classic:1.2.3'
compile 'com.fasterxml.jackson.dataformat:jackson-dataformat-xml:2.9.8'
compile 'com.fazecast:jSerialComm:2.5.0'
compile 'com.github.jiconfont:jiconfont-font_awesome:4.7.0.1'
compile 'com.github.jiconfont:jiconfont-javafx:1.0.0'
compile 'com.github.jiconfont:jiconfont-swing:1.0.1'
compile 'com.github.wendykierp:JTransforms:3.1'
compile 'com.google.guava:guava:27.0.1-jre'
compile 'com.jidesoft:jide-oss:3.6.18'
compile 'com.miglayout:miglayout-swing:5.2'
compile 'eu.hansolo:charts:1.0.5'
compile 'io.github.dsheirer:radio-reference-api:15.0.1'
compile 'javax.usb:usb-api:1.0.2'
compile 'net.coderazzi:tablefilter-swing:5.4.0'
Expand Down Expand Up @@ -100,7 +102,7 @@ task buildSdr(type: Jar) {
attributes 'Implementation-Title': 'SdrTrunk project',
'Implementation-Version': version,
'Main-Class': 'io.github.dsheirer.gui.SDRTrunk',
'Class-Path': 'jmbe-0.3.2.jar jmbe-0.3.3.jar'
'Class-Path': 'jmbe-1.0.0.jar'
}
baseName = project.name + '-all'
from { configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } }
Expand Down
Binary file not shown.
337 changes: 260 additions & 77 deletions sdr-trunk.ipr

Large diffs are not rendered by default.

43 changes: 23 additions & 20 deletions src/main/java/io/github/dsheirer/audio/AudioModule.java
Original file line number Diff line number Diff line change
@@ -1,25 +1,28 @@
/*
* ******************************************************************************
* sdrtrunk
* Copyright (C) 2014-2019 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.
* * ******************************************************************************
* * Copyright (C) 2014-2019 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/>
* * *****************************************************************************
*
* 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 io.github.dsheirer.audio;

import io.github.dsheirer.audio.squelch.SquelchState;
import io.github.dsheirer.audio.squelch.SquelchStateEvent;
import io.github.dsheirer.dsp.filter.design.FilterDesignException;
import io.github.dsheirer.dsp.filter.fir.FIRFilterSpecification;
import io.github.dsheirer.dsp.filter.fir.real.RealFIRFilter2;
Expand Down Expand Up @@ -136,7 +139,7 @@ public void stop()


@Override
public Listener<SquelchState> getSquelchStateListener()
public Listener<SquelchStateEvent> getSquelchStateListener()
{
return mSquelchStateListener;
}
Expand Down Expand Up @@ -169,7 +172,7 @@ public void receive(ReusableFloatBuffer reusableFloatBuffer)
}

@Override
public Listener getReusableBufferListener()
public Listener<ReusableFloatBuffer> getReusableBufferListener()
{
//Redirect received reusable buffers to the receive(buffer) method
return this;
Expand All @@ -178,12 +181,12 @@ public Listener getReusableBufferListener()
/**
* Wrapper for squelch state listener
*/
public class SquelchStateListener implements Listener<SquelchState>
public class SquelchStateListener implements Listener<SquelchStateEvent>
{
@Override
public void receive(SquelchState state)
public void receive(SquelchStateEvent event)
{
if(state == SquelchState.SQUELCH && hasAudioPacketListener())
if(event.getSquelchState() == SquelchState.SQUELCH && hasAudioPacketListener())
{
ReusableAudioPacket endAudioPacket = mAudioPacketQueue.getEndAudioBuffer();
endAudioPacket.resetAttributes();
Expand All @@ -192,7 +195,7 @@ public void receive(SquelchState state)
getAudioPacketListener().receive(endAudioPacket);
}

mSquelchState = state;
mSquelchState = event.getSquelchState();
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
/*
*
* * ******************************************************************************
* * Copyright (C) 2014-2019 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 io.github.dsheirer.audio.codec.mbe;

import io.github.dsheirer.preference.UserPreferences;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public abstract class AmbeAudioModule extends JmbeAudioModule
{
private static final Logger mLog = LoggerFactory.getLogger(AmbeAudioModule.class);
private static final String AMBE_CODEC = "AMBE 3600 x 2450";
private static boolean sLibraryStatusLogged = false;

public AmbeAudioModule(UserPreferences userPreferences)
{
super(userPreferences);

if(!sLibraryStatusLogged)
{
if(getAudioCodec() != null)
{
mLog.info("AMBE CODEC successfully loaded - P25-2/DMR/NXDN audio will be available");
}
else
{
mLog.warn("AMBE CODEC not loaded - P25-2/DMR/NXDN audio will NOT be available");
}

sLibraryStatusLogged = true;
}
}

@Override
protected String getCodecName()
{
return AMBE_CODEC;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
/*
*
* * ******************************************************************************
* * Copyright (C) 2014-2019 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 io.github.dsheirer.audio.codec.mbe;

import io.github.dsheirer.identifier.encryption.EncryptionKeyIdentifier;

/**
* P25 Encryption Parameters
*/
public interface IEncryptionSyncParameters
{
/**
* Encryption key identifier
*/
EncryptionKeyIdentifier getEncryptionKey();

/**
* Message Indicator
* @return key generator fill values
*/
String getMessageIndicator();
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
/*
*
* * ******************************************************************************
* * Copyright (C) 2014-2019 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 io.github.dsheirer.audio.codec.mbe;

import io.github.dsheirer.preference.UserPreferences;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public abstract class ImbeAudioModule extends JmbeAudioModule
{
private static final Logger mLog = LoggerFactory.getLogger(ImbeAudioModule.class);
private static final String IMBE_CODEC = "IMBE";
private static boolean sLibraryStatusLogged = false;

public ImbeAudioModule(UserPreferences userPreferences)
{
super(userPreferences);

if(!sLibraryStatusLogged)
{
if(getAudioCodec() != null)
{
mLog.info("JMBE audio conversion library IMBE CODEC successfully loaded - P25-1 audio will be available");
}
else
{
mLog.warn("JMBE audio conversion library, IMBE CODEC not loaded - P25-1 audio will NOT be available");
}

sLibraryStatusLogged = true;
}
}

@Override
protected String getCodecName()
{
return IMBE_CODEC;
}
}
Loading

0 comments on commit f934676

Please sign in to comment.