mirror of
https://github.com/DSheirer/sdrtrunk.git
synced 2026-11-12 16:47:31 -05:00
* WIP - Adds support for aliasing P25 Phase 2 tones.Playlist editor - adds editor support for alias actions * Playlist editor implementation and integration into application is complete. Adds JavaFX window monitoring to persist window size/location across application runs. Co-authored-by: Denny <denny@denny-desktop>
This commit is contained in:
@@ -35,7 +35,7 @@ public class DecodeConfigLTRStandard extends DecodeConfiguration
|
||||
@JacksonXmlProperty(isAttribute = true, localName = "type", namespace = "http://www.w3.org/2001/XMLSchema-instance")
|
||||
public DecoderType getDecoderType()
|
||||
{
|
||||
return DecoderType.LTR_STANDARD;
|
||||
return DecoderType.LTR;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -61,7 +61,7 @@ public class LTRStandardDecoder extends Decoder implements IReusableBufferListen
|
||||
@Override
|
||||
public DecoderType getDecoderType()
|
||||
{
|
||||
return DecoderType.LTR_STANDARD;
|
||||
return DecoderType.LTR;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -1,112 +0,0 @@
|
||||
/*******************************************************************************
|
||||
* SDR Trunk
|
||||
* Copyright (C) 2014-2016 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.module.decode.ltrstandard;
|
||||
|
||||
import io.github.dsheirer.controller.channel.Channel;
|
||||
import io.github.dsheirer.gui.editor.Editor;
|
||||
import io.github.dsheirer.gui.editor.EditorValidationException;
|
||||
import io.github.dsheirer.gui.editor.ValidatingEditor;
|
||||
import io.github.dsheirer.message.MessageDirection;
|
||||
import io.github.dsheirer.module.decode.config.DecodeConfiguration;
|
||||
import net.miginfocom.swing.MigLayout;
|
||||
|
||||
import javax.swing.DefaultComboBoxModel;
|
||||
import javax.swing.JComboBox;
|
||||
import javax.swing.JLabel;
|
||||
import java.awt.event.ActionEvent;
|
||||
import java.awt.event.ActionListener;
|
||||
|
||||
public class LTRStandardDecoderEditor extends ValidatingEditor<Channel>
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
private JComboBox<MessageDirection> mComboDirection;
|
||||
|
||||
public LTRStandardDecoderEditor()
|
||||
{
|
||||
init();
|
||||
}
|
||||
|
||||
private void init()
|
||||
{
|
||||
setLayout(new MigLayout("insets 0 0 0 0,wrap 4", "[right][grow,fill][right][grow,fill]", ""));
|
||||
|
||||
mComboDirection = new JComboBox<MessageDirection>();
|
||||
mComboDirection.setModel(new DefaultComboBoxModel<MessageDirection>(MessageDirection.values()));
|
||||
mComboDirection.setSelectedItem(MessageDirection.OSW);
|
||||
mComboDirection.setEnabled(false);
|
||||
mComboDirection.addActionListener(new ActionListener()
|
||||
{
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent e)
|
||||
{
|
||||
setModified(true);
|
||||
}
|
||||
});
|
||||
|
||||
add(new JLabel("Format:"));
|
||||
add(mComboDirection);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void validate(Editor<Channel> editor) throws EditorValidationException
|
||||
{
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setItem(Channel item)
|
||||
{
|
||||
super.setItem(item);
|
||||
|
||||
if(hasItem())
|
||||
{
|
||||
mComboDirection.setEnabled(true);
|
||||
|
||||
DecodeConfiguration config = getItem().getDecodeConfiguration();
|
||||
|
||||
if(config instanceof DecodeConfigLTRStandard)
|
||||
{
|
||||
DecodeConfigLTRStandard ltr = (DecodeConfigLTRStandard)config;
|
||||
mComboDirection.setSelectedItem(ltr.getMessageDirection());
|
||||
setModified(false);
|
||||
}
|
||||
else
|
||||
{
|
||||
mComboDirection.setSelectedItem(MessageDirection.OSW);
|
||||
setModified(true);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
mComboDirection.setEnabled(false);
|
||||
setModified(false);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void save()
|
||||
{
|
||||
if(hasItem() && isModified())
|
||||
{
|
||||
DecodeConfigLTRStandard ltr = new DecodeConfigLTRStandard();
|
||||
ltr.setMessageDirection((MessageDirection)mComboDirection.getSelectedItem());
|
||||
getItem().setDecodeConfiguration(ltr);
|
||||
}
|
||||
|
||||
setModified(false);
|
||||
}
|
||||
}
|
||||
@@ -39,7 +39,7 @@ import io.github.dsheirer.module.decode.ltrstandard.channel.LtrChannel;
|
||||
import io.github.dsheirer.module.decode.ltrstandard.message.Call;
|
||||
import io.github.dsheirer.module.decode.ltrstandard.message.CallEnd;
|
||||
import io.github.dsheirer.module.decode.ltrstandard.message.Idle;
|
||||
import io.github.dsheirer.module.decode.ltrstandard.message.LTRStandardMessage;
|
||||
import io.github.dsheirer.module.decode.ltrstandard.message.LTRMessage;
|
||||
import io.github.dsheirer.protocol.Protocol;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
@@ -70,15 +70,15 @@ public class LTRStandardDecoderState extends DecoderState
|
||||
@Override
|
||||
public DecoderType getDecoderType()
|
||||
{
|
||||
return DecoderType.LTR_STANDARD;
|
||||
return DecoderType.LTR;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void receive(IMessage message)
|
||||
{
|
||||
if(message.isValid() && message instanceof LTRStandardMessage)
|
||||
if(message.isValid() && message instanceof LTRMessage)
|
||||
{
|
||||
switch(((LTRStandardMessage)message).getMessageType())
|
||||
switch(((LTRMessage)message).getMessageType())
|
||||
{
|
||||
case CALL:
|
||||
if(message instanceof Call)
|
||||
@@ -98,7 +98,7 @@ public class LTRStandardDecoderState extends DecoderState
|
||||
getIdentifierCollection().remove(IdentifierClass.USER);
|
||||
getIdentifierCollection().update(start.getTalkgroup());
|
||||
mCurrentCallEvent = DecodeEvent.builder(start.getTimestamp())
|
||||
.protocol(Protocol.LTR_STANDARD)
|
||||
.protocol(Protocol.LTR)
|
||||
.identifiers(getIdentifierCollection().copyOf())
|
||||
.channel(getCurrentChannel())
|
||||
.eventDescription("Call")
|
||||
@@ -201,7 +201,7 @@ public class LTRStandardDecoderState extends DecoderState
|
||||
if(mLCNTracker.getCurrentChannel() != original)
|
||||
{
|
||||
getIdentifierCollection().update(DecoderLogicalChannelNameIdentifier
|
||||
.create(String.valueOf(mLCNTracker.getCurrentChannel()), Protocol.LTR_STANDARD));
|
||||
.create(String.valueOf(mLCNTracker.getCurrentChannel()), Protocol.LTR));
|
||||
|
||||
LtrChannel ltrChannel = new LtrChannel(mLCNTracker.getCurrentChannel());
|
||||
|
||||
|
||||
@@ -23,8 +23,7 @@ package io.github.dsheirer.module.decode.ltrstandard;
|
||||
import io.github.dsheirer.filter.Filter;
|
||||
import io.github.dsheirer.filter.FilterElement;
|
||||
import io.github.dsheirer.message.IMessage;
|
||||
import io.github.dsheirer.module.decode.ltrstandard.message.LTRStandardMessage;
|
||||
import io.github.dsheirer.module.decode.mdc1200.MDCMessageType;
|
||||
import io.github.dsheirer.module.decode.ltrstandard.message.LTRMessage;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
@@ -47,7 +46,7 @@ public class LTRStandardMessageFilter extends Filter<IMessage>
|
||||
{
|
||||
if(mEnabled && canProcess(message))
|
||||
{
|
||||
LTRStandardMessage ltr = (LTRStandardMessage)message;
|
||||
LTRMessage ltr = (LTRMessage)message;
|
||||
|
||||
if(mElements.containsKey(ltr.getMessageType()))
|
||||
{
|
||||
@@ -60,7 +59,7 @@ public class LTRStandardMessageFilter extends Filter<IMessage>
|
||||
|
||||
public boolean canProcess(IMessage message)
|
||||
{
|
||||
return message instanceof LTRStandardMessage;
|
||||
return message instanceof LTRMessage;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -27,7 +27,7 @@ import io.github.dsheirer.message.MessageDirection;
|
||||
import io.github.dsheirer.module.decode.ltrstandard.message.Call;
|
||||
import io.github.dsheirer.module.decode.ltrstandard.message.CallEnd;
|
||||
import io.github.dsheirer.module.decode.ltrstandard.message.Idle;
|
||||
import io.github.dsheirer.module.decode.ltrstandard.message.LTRStandardMessage;
|
||||
import io.github.dsheirer.module.decode.ltrstandard.message.LTRMessage;
|
||||
import io.github.dsheirer.module.decode.ltrstandard.message.UnknownMessage;
|
||||
import io.github.dsheirer.sample.Listener;
|
||||
|
||||
@@ -62,12 +62,12 @@ public class LTRStandardMessageProcessor implements Listener<CorrectedBinaryMess
|
||||
|
||||
if(crc.passes())
|
||||
{
|
||||
LTRStandardMessage message;
|
||||
LTRMessage message;
|
||||
|
||||
int channel = binaryMessage.getInt(LTRStandardMessage.CHANNEL);
|
||||
int home = binaryMessage.getInt(LTRStandardMessage.HOME_REPEATER);
|
||||
int free = binaryMessage.getInt(LTRStandardMessage.FREE);
|
||||
int group = binaryMessage.getInt(LTRStandardMessage.GROUP);
|
||||
int channel = binaryMessage.getInt(LTRMessage.CHANNEL);
|
||||
int home = binaryMessage.getInt(LTRMessage.HOME_REPEATER);
|
||||
int free = binaryMessage.getInt(LTRMessage.FREE);
|
||||
int group = binaryMessage.getInt(LTRMessage.GROUP);
|
||||
|
||||
if(isValidChannel(channel) && isValidChannel(home) && isValidChannel(free))
|
||||
{
|
||||
|
||||
@@ -83,7 +83,7 @@ public class LtrChannel implements IChannelDescriptor, Comparable<LtrChannel>
|
||||
@Override
|
||||
public Protocol getProtocol()
|
||||
{
|
||||
return Protocol.LTR_STANDARD;
|
||||
return Protocol.LTR;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -28,7 +28,7 @@ import io.github.dsheirer.module.decode.ltrstandard.LtrStandardMessageType;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class Call extends LTRStandardMessage
|
||||
public class Call extends LTRMessage
|
||||
{
|
||||
private List<Identifier> mIdentifiers;
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@ import io.github.dsheirer.module.decode.ltrstandard.LtrStandardMessageType;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class CallEnd extends LTRStandardMessage
|
||||
public class CallEnd extends LTRMessage
|
||||
{
|
||||
private List<Identifier> mIdentifiers;
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@ import java.util.List;
|
||||
/**
|
||||
* Indicates the repeater is IDLE and available for use
|
||||
*/
|
||||
public class Idle extends LTRStandardMessage
|
||||
public class Idle extends LTRMessage
|
||||
{
|
||||
public Idle(CorrectedBinaryMessage message, MessageDirection direction, CRC crc)
|
||||
{
|
||||
|
||||
@@ -30,7 +30,7 @@ import io.github.dsheirer.protocol.Protocol;
|
||||
/**
|
||||
* LTR Standard Base Message
|
||||
*/
|
||||
public abstract class LTRStandardMessage extends Message
|
||||
public abstract class LTRMessage extends Message
|
||||
{
|
||||
public static final int[] SYNC = {0, 1, 2, 3, 4, 5, 6, 7, 8};
|
||||
public static final int[] AREA = {9};
|
||||
@@ -51,7 +51,7 @@ public abstract class LTRStandardMessage extends Message
|
||||
* @param direction of the messsage, ISW or OSW
|
||||
* @param crc error check
|
||||
*/
|
||||
public LTRStandardMessage(CorrectedBinaryMessage message, MessageDirection direction, CRC crc)
|
||||
public LTRMessage(CorrectedBinaryMessage message, MessageDirection direction, CRC crc)
|
||||
{
|
||||
mMessage = message;
|
||||
mMessageDirection = direction;
|
||||
@@ -134,7 +134,7 @@ public abstract class LTRStandardMessage extends Message
|
||||
{
|
||||
if(mTalkgroup == null)
|
||||
{
|
||||
mTalkgroup = LTRTalkgroup.create((getHomeRepeater() << 8) + getGroup());
|
||||
mTalkgroup = LTRTalkgroup.create((getArea() << 13) + (getHomeRepeater() << 8) + getGroup());
|
||||
}
|
||||
|
||||
return mTalkgroup;
|
||||
@@ -143,6 +143,6 @@ public abstract class LTRStandardMessage extends Message
|
||||
@Override
|
||||
public Protocol getProtocol()
|
||||
{
|
||||
return Protocol.LTR_STANDARD;
|
||||
return Protocol.LTR;
|
||||
}
|
||||
}
|
||||
@@ -31,7 +31,7 @@ import java.util.List;
|
||||
/**
|
||||
* Unknown message type
|
||||
*/
|
||||
public class UnknownMessage extends LTRStandardMessage
|
||||
public class UnknownMessage extends LTRMessage
|
||||
{
|
||||
public UnknownMessage(CorrectedBinaryMessage message, MessageDirection direction, CRC crc)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user