#296 APCO25 Phase II Decoder Implementation (#589)

P25 Phase 2 Decoder implementation.
This commit is contained in:
Denny Sheirer
2019-11-17 06:56:52 -05:00
committed by GitHub
parent d5b802e794
commit f934676bd0
561 changed files with 35609 additions and 6215 deletions

View File

@@ -1,21 +1,23 @@
/*
* ******************************************************************************
* sdrtrunk
* Copyright (C) 2014-2018 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.identifier;
@@ -25,26 +27,32 @@ package io.github.dsheirer.identifier;
public enum Form
{
ALIAS_LIST,
CALL_PROGRESS_TONE,
CHANNEL,
CHANNEL_DESCRIPTOR,
CHANNEL_NAME,
CHANNEL_FREQUENCY,
DECODER_TYPE,
DTMF,
ENCRYPTION_KEY,
ESN,
FULLY_QUALIFIED_IDENTIFIER,
IPV4_ADDRESS,
KNOX_TONE,
LOCATION_REGISTRATION_AREA,
LOJACK,
NEIGHBOR_SITE,
NETWORK_ACCESS_CODE,
PATCH_GROUP,
RF_SUBSYSTEM,
SCRAMBLE_PARAMETERS,
SHORT_DATA_MESSAGE,
SITE,
STATE,
SYSTEM,
TALKGROUP,
TELEPHONE_NUMBER,
TONE,
UNIT_IDENTIFIER,
UNIT_STATUS,
USER_STATUS,

View File

@@ -1,21 +1,23 @@
/*
* ******************************************************************************
* 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.identifier;
@@ -40,15 +42,31 @@ public class IdentifierCollection
protected List<Identifier> mIdentifiers = new ArrayList<>();
protected AliasListConfigurationIdentifier mAliasListConfigurationIdentifier;
private boolean mUpdated = false;
private int mTimeslot = 0;
/**
* Constructs an empty identifier collection for the specified timeslot
* @param timeslot
*/
public IdentifierCollection(int timeslot)
{
mTimeslot = timeslot;
}
/**
* Constructs an empty identifier collection
*/
public IdentifierCollection()
{
this(0);
}
public IdentifierCollection(Collection<Identifier> identifiers)
{
this(identifiers, 0);
}
public IdentifierCollection(Collection<Identifier> identifiers, int timeslot)
{
for(Identifier identifier: identifiers)
{
@@ -66,14 +84,14 @@ public class IdentifierCollection
}
}
public IdentifierCollection(Identifier identifier)
public int getTimeslot()
{
if(identifier == null)
{
throw new IllegalArgumentException("Identifier cannot be null");
}
return mTimeslot;
}
mIdentifiers.add(identifier);
public void setTimeslot(int timeslot)
{
mTimeslot = timeslot;
}
/**

View File

@@ -1,21 +1,23 @@
/*
* ******************************************************************************
* 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.identifier;
@@ -27,15 +29,17 @@ public class IdentifierUpdateNotification
{
private Identifier<?> mIdentifier;
private Operation mOperation;
private int mTimeslot;
/**
* Constructs an identifier update notification
* @param identifier that has been updated
*/
public IdentifierUpdateNotification(Identifier<?> identifier, Operation operation)
public IdentifierUpdateNotification(Identifier<?> identifier, Operation operation, int timeslot)
{
mIdentifier = identifier;
mOperation = operation;
mTimeslot = timeslot;
}
public Identifier<?> getIdentifier()
@@ -48,6 +52,11 @@ public class IdentifierUpdateNotification
return mOperation;
}
public int getTimeslot()
{
return mTimeslot;
}
public boolean isAdd()
{
return mOperation == Operation.ADD;

View File

@@ -1,21 +1,23 @@
/*
* ******************************************************************************
* 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.identifier;
@@ -37,12 +39,25 @@ public class MutableIdentifierCollection extends IdentifierCollection implements
private final static Logger mLog = LoggerFactory.getLogger(MutableIdentifierCollection.class);
private Listener<IdentifierUpdateNotification> mListener;
public MutableIdentifierCollection(int timeslot)
{
super(timeslot);
}
public MutableIdentifierCollection()
{
super(0);
}
public MutableIdentifierCollection(Collection<Identifier> identifiers)
{
this(identifiers, 0);
}
public MutableIdentifierCollection(Collection<Identifier> identifiers, int timeslot)
{
super(timeslot);
for(Identifier identifier: identifiers)
{
update(identifier);
@@ -86,7 +101,7 @@ public class MutableIdentifierCollection extends IdentifierCollection implements
setUpdated(true);
if(mListener != null)
{
mListener.receive(new IdentifierUpdateNotification(identifier, IdentifierUpdateNotification.Operation.ADD));
mListener.receive(new IdentifierUpdateNotification(identifier, IdentifierUpdateNotification.Operation.ADD, getTimeslot()));
}
}
@@ -99,7 +114,7 @@ public class MutableIdentifierCollection extends IdentifierCollection implements
if(mListener != null)
{
mListener.receive(new IdentifierUpdateNotification(identifier,
IdentifierUpdateNotification.Operation.REMOVE));
IdentifierUpdateNotification.Operation.REMOVE, getTimeslot()));
}
}
@@ -365,26 +380,25 @@ public class MutableIdentifierCollection extends IdentifierCollection implements
* Implements the listener interface to receive notifications of identifier updates. This allows an
* identifier collection to maintain a synchronized state with a remote identifier collection.
*
* Note: this method performs a silent add/update/remove on on the local collection and does not rebroadcast
* the update to a registered listener in order to prevent infinite loop updates.
*
* @param identifierUpdateNotification to add or remove an identifier
*/
@Override
public void receive(IdentifierUpdateNotification identifierUpdateNotification)
{
if(identifierUpdateNotification.isAdd())
//Only process notifications that match this timeslot
if(identifierUpdateNotification.getTimeslot() == getTimeslot())
{
update(identifierUpdateNotification.getIdentifier());
}
else if(identifierUpdateNotification.isRemove())
{
remove(identifierUpdateNotification.getIdentifier());
}
else if(identifierUpdateNotification.isSilentAdd())
{
silentUpdate(identifierUpdateNotification.getIdentifier());
}
else if(identifierUpdateNotification.isSilentRemove())
{
silentRemove(identifierUpdateNotification.getIdentifier());
if(identifierUpdateNotification.isAdd() || identifierUpdateNotification.isSilentAdd())
{
silentUpdate(identifierUpdateNotification.getIdentifier());
}
else if(identifierUpdateNotification.isRemove() || identifierUpdateNotification.isSilentRemove())
{
silentRemove(identifierUpdateNotification.getIdentifier());
}
}
}
@@ -394,7 +408,7 @@ public class MutableIdentifierCollection extends IdentifierCollection implements
*/
public IdentifierCollection copyOf()
{
IdentifierCollection copy = new IdentifierCollection(getIdentifiers());
IdentifierCollection copy = new IdentifierCollection(getIdentifiers(), getTimeslot());
copy.setUpdated(isUpdated());
setUpdated(false);
return copy;

View File

@@ -1,28 +1,30 @@
/*
* ******************************************************************************
* sdrtrunk
* Copyright (C) 2014-2018 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.identifier.encryption;
import java.util.Objects;
public class EncryptionKey implements Comparable<EncryptionKey>
public abstract class EncryptionKey implements Comparable<EncryptionKey>
{
private int mAlgorithm;
private int mKey;
@@ -33,10 +35,7 @@ public class EncryptionKey implements Comparable<EncryptionKey>
mKey = key;
}
public boolean isEncrypted()
{
return mAlgorithm != 0x80;
}
public abstract boolean isEncrypted();
public int getAlgorithm()
{

View File

@@ -1,21 +1,23 @@
/*
* ******************************************************************************
* sdrtrunk
* Copyright (C) 2014-2018 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.identifier.encryption;
@@ -24,13 +26,28 @@ import io.github.dsheirer.identifier.Form;
import io.github.dsheirer.identifier.Identifier;
import io.github.dsheirer.identifier.IdentifierClass;
import io.github.dsheirer.identifier.Role;
import io.github.dsheirer.protocol.Protocol;
public abstract class EncryptionKeyIdentifier extends Identifier<EncryptionKey>
public class EncryptionKeyIdentifier extends Identifier<EncryptionKey>
{
public EncryptionKeyIdentifier(EncryptionKey value, IdentifierClass identifierClass, Form form, Role role)
{
super(value, identifierClass, form, role);
}
@Override
public Protocol getProtocol()
{
return Protocol.APCO25;
}
public boolean isEncrypted()
{
return getValue() != null && getValue().isEncrypted();
}
public static EncryptionKeyIdentifier create(EncryptionKey encryptionKey)
{
return new EncryptionKeyIdentifier(encryptionKey, IdentifierClass.USER, Form.ENCRYPTION_KEY, Role.ANY);
}
}

View File

@@ -0,0 +1,64 @@
/*
*
* * ******************************************************************************
* * 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.identifier.scramble;
import io.github.dsheirer.identifier.Form;
import io.github.dsheirer.identifier.Identifier;
import io.github.dsheirer.identifier.IdentifierClass;
import io.github.dsheirer.identifier.Role;
import io.github.dsheirer.module.decode.p25.phase2.enumeration.ScrambleParameters;
import io.github.dsheirer.protocol.Protocol;
/**
* APCO25 Phase II Scramble Parameters Identifier
*/
public class ScrambleParameterIdentifier extends Identifier<ScrambleParameters>
{
/**
* Constructs an instance
* @param value to wrap in this instance
*/
private ScrambleParameterIdentifier(ScrambleParameters value)
{
super(value, IdentifierClass.NETWORK, Form.SCRAMBLE_PARAMETERS, Role.BROADCAST);
}
/**
* P25P2 Protocol
*/
@Override
public Protocol getProtocol()
{
return Protocol.APCO25_PHASE2;
}
/**
* Creates an instance
* @param scrambleParameters to wrap in an identifier
*/
public static ScrambleParameterIdentifier create(ScrambleParameters scrambleParameters)
{
return new ScrambleParameterIdentifier(scrambleParameters);
}
}

View File

@@ -0,0 +1,41 @@
/*
*
* * ******************************************************************************
* * 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.identifier.string;
import io.github.dsheirer.identifier.Form;
import io.github.dsheirer.identifier.Identifier;
import io.github.dsheirer.identifier.IdentifierClass;
import io.github.dsheirer.identifier.Role;
import java.util.List;
/**
* String identifier base class
*/
public abstract class StringListIdentifier extends Identifier<List<String>>
{
public StringListIdentifier(List<String> values, IdentifierClass identifierClass, Form form, Role role)
{
super(values, identifierClass, form, role);
}
}

View File

@@ -0,0 +1,64 @@
/*
*
* * ******************************************************************************
* * 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.identifier.talkgroup;
/**
* Fully qualified radio identifier
*/
public class FullyQualifiedIdentifier
{
private int mWacn;
private int mSystem;
private int mId;
/**
* Constructs an instance
* @param wacn
* @param system
* @param id
*/
public FullyQualifiedIdentifier(int wacn, int system, int id)
{
mWacn = wacn;
mSystem = system;
mId = id;
}
@Override
public String toString()
{
return mWacn + "." + mSystem + "." + mId;
}
/**
* Creates an instance with the specified values
* @param wacn value
* @param system value
* @param id value
* @return instance
*/
public static FullyQualifiedIdentifier create(int wacn, int system, int id)
{
return new FullyQualifiedIdentifier(wacn, system, id);
}
}

View File

@@ -0,0 +1,48 @@
/*
*
* * ******************************************************************************
* * 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.identifier.tone;
import com.google.common.base.Joiner;
import io.github.dsheirer.identifier.Form;
import io.github.dsheirer.identifier.IdentifierClass;
import io.github.dsheirer.identifier.Role;
import io.github.dsheirer.identifier.string.StringListIdentifier;
import java.util.List;
/**
* Call Progress (ie dial tone, busy tone) tones identifier
*/
public abstract class CallProgressIdentifier extends StringListIdentifier
{
public CallProgressIdentifier(List<String> values)
{
super(values, IdentifierClass.USER, Form.CALL_PROGRESS_TONE, Role.TO);
}
@Override
public String toString()
{
return "CALL:" + Joiner.on("").join(getValue());
}
}

View File

@@ -0,0 +1,48 @@
/*
*
* * ******************************************************************************
* * 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.identifier.tone;
import com.google.common.base.Joiner;
import io.github.dsheirer.identifier.Form;
import io.github.dsheirer.identifier.IdentifierClass;
import io.github.dsheirer.identifier.Role;
import io.github.dsheirer.identifier.string.StringListIdentifier;
import java.util.List;
/**
* Dual-Tone Multi-Frequency (DTMF) tones identifier
*/
public abstract class DtmfIdentifier extends StringListIdentifier
{
public DtmfIdentifier(List<String> values)
{
super(values, IdentifierClass.USER, Form.DTMF, Role.TO);
}
@Override
public String toString()
{
return "DTMF:" + Joiner.on("").join(getValue());
}
}

View File

@@ -0,0 +1,48 @@
/*
*
* * ******************************************************************************
* * 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.identifier.tone;
import com.google.common.base.Joiner;
import io.github.dsheirer.identifier.Form;
import io.github.dsheirer.identifier.IdentifierClass;
import io.github.dsheirer.identifier.Role;
import io.github.dsheirer.identifier.string.StringListIdentifier;
import java.util.List;
/**
* Knox tones identifier
*/
public abstract class KnoxIdentifier extends StringListIdentifier
{
public KnoxIdentifier(List<String> values)
{
super(values, IdentifierClass.USER, Form.KNOX_TONE, Role.TO);
}
@Override
public String toString()
{
return "KNOX:" + Joiner.on("").join(getValue());
}
}

View File

@@ -0,0 +1,46 @@
/*
*
* * ******************************************************************************
* * 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.identifier.tone;
import io.github.dsheirer.protocol.Protocol;
import java.util.List;
public class P25CallProgressIdentifier extends CallProgressIdentifier
{
public P25CallProgressIdentifier(List<String> values)
{
super(values);
}
@Override
public Protocol getProtocol()
{
return Protocol.APCO25;
}
public static P25CallProgressIdentifier create(List<String> values)
{
return new P25CallProgressIdentifier(values);
}
}

View File

@@ -0,0 +1,46 @@
/*
*
* * ******************************************************************************
* * 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.identifier.tone;
import io.github.dsheirer.protocol.Protocol;
import java.util.List;
public class P25DtmfIdentifier extends DtmfIdentifier
{
public P25DtmfIdentifier(List<String> values)
{
super(values);
}
@Override
public Protocol getProtocol()
{
return Protocol.APCO25;
}
public static P25DtmfIdentifier create(List<String> values)
{
return new P25DtmfIdentifier(values);
}
}

View File

@@ -0,0 +1,46 @@
/*
*
* * ******************************************************************************
* * 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.identifier.tone;
import io.github.dsheirer.protocol.Protocol;
import java.util.List;
public class P25KnoxIdentifier extends KnoxIdentifier
{
public P25KnoxIdentifier(List<String> values)
{
super(values);
}
@Override
public Protocol getProtocol()
{
return Protocol.APCO25;
}
public static P25KnoxIdentifier create(List<String> values)
{
return new P25KnoxIdentifier(values);
}
}

View File

@@ -0,0 +1,46 @@
/*
*
* * ******************************************************************************
* * 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.identifier.tone;
import io.github.dsheirer.protocol.Protocol;
import java.util.List;
public class P25ToneIdentifier extends ToneIdentifier
{
public P25ToneIdentifier(List<String> values)
{
super(values);
}
@Override
public Protocol getProtocol()
{
return Protocol.APCO25;
}
public static P25ToneIdentifier create(List<String> values)
{
return new P25ToneIdentifier(values);
}
}

View File

@@ -0,0 +1,48 @@
/*
*
* * ******************************************************************************
* * 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.identifier.tone;
import com.google.common.base.Joiner;
import io.github.dsheirer.identifier.Form;
import io.github.dsheirer.identifier.IdentifierClass;
import io.github.dsheirer.identifier.Role;
import io.github.dsheirer.identifier.string.StringListIdentifier;
import java.util.List;
/**
* Pass-band audio tones identifier
*/
public abstract class ToneIdentifier extends StringListIdentifier
{
public ToneIdentifier(List<String> values)
{
super(values, IdentifierClass.USER, Form.TONE, Role.TO);
}
@Override
public String toString()
{
return "TONES:" + Joiner.on("").join(getValue());
}
}