mirror of
https://github.com/DSheirer/sdrtrunk.git
synced 2026-11-12 16:47:31 -05:00
Initial code check in continued
This commit is contained in:
63
src/message/Message.java
Normal file
63
src/message/Message.java
Normal file
@@ -0,0 +1,63 @@
|
||||
/*******************************************************************************
|
||||
* SDR Trunk
|
||||
* Copyright (C) 2014 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 message;
|
||||
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import map.Plottable;
|
||||
import controller.activity.MessageDetailsProvider;
|
||||
|
||||
public abstract class Message implements MessageDetailsProvider
|
||||
{
|
||||
protected long mTimeReceived;
|
||||
protected MessageType mType;
|
||||
|
||||
public Message()
|
||||
{
|
||||
this( MessageType.UN_KNWN );
|
||||
}
|
||||
|
||||
public Message( MessageType type )
|
||||
{
|
||||
mTimeReceived = System.currentTimeMillis();
|
||||
mType = type;
|
||||
}
|
||||
|
||||
public abstract Plottable getPlottable();
|
||||
|
||||
public abstract String toString();
|
||||
|
||||
public abstract boolean isValid();
|
||||
|
||||
public long getTimeReceived()
|
||||
{
|
||||
return mTimeReceived;
|
||||
}
|
||||
|
||||
public Date getDateReceived()
|
||||
{
|
||||
return new Date( mTimeReceived );
|
||||
}
|
||||
|
||||
public MessageType getType()
|
||||
{
|
||||
return mType;
|
||||
}
|
||||
|
||||
}
|
||||
24
src/message/MessageDirection.java
Normal file
24
src/message/MessageDirection.java
Normal file
@@ -0,0 +1,24 @@
|
||||
/*******************************************************************************
|
||||
* SDR Trunk
|
||||
* Copyright (C) 2014 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 message;
|
||||
|
||||
public enum MessageDirection
|
||||
{
|
||||
ISW, //Inbound Status Word
|
||||
OSW; //Outbound Status Word
|
||||
}
|
||||
74
src/message/MessageType.java
Normal file
74
src/message/MessageType.java
Normal file
@@ -0,0 +1,74 @@
|
||||
/*******************************************************************************
|
||||
* SDR Trunk
|
||||
* Copyright (C) 2014 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 message;
|
||||
|
||||
public enum MessageType
|
||||
{
|
||||
CA_STRT( "Call Start" ),
|
||||
CA_ENDD( "Call End" ),
|
||||
CA_TOUT( "Call Timeout" ),
|
||||
CA_PAGE( "Call Page" ),
|
||||
DA_STRT( "Data Start" ),
|
||||
DA_ENDD( "Data End" ),
|
||||
DA_TOUT( "Data Timeout" ),
|
||||
FQ_CCHN( "Control Channel Frequency" ),
|
||||
FQ_RXCV( "Receive Frequency" ),
|
||||
FQ_RXLO( "Receive Frequency Low" ),
|
||||
FQ_RXHI( "Receive Frequency High" ),
|
||||
FQ_TXMT( "Transmit Frequency" ),
|
||||
FQ_TXLO( "Transmit Frequency Low" ),
|
||||
FQ_TXHI( "Transmit Frequency High" ),
|
||||
ID_ANIX( "ANI ID" ),
|
||||
ID_CHAN( "Channel ID" ),
|
||||
ID_ESNX( "ESN ID" ),
|
||||
ID_ESNH( "ESN ID Low" ),
|
||||
ID_ESNL( "ESN ID High" ),
|
||||
ID_FROM( "From ID" ),
|
||||
ID_MIDN( "Mobile ID" ),
|
||||
ID_NBOR( "Neighbor ID" ),
|
||||
ID_RDIO( "Radio ID" ),
|
||||
ID_SITE( "Site ID" ),
|
||||
ID_SYST( "System ID" ),
|
||||
ID_TGAS( "Assign Talkgroup ID" ),
|
||||
ID_TOTO( "To ID" ),
|
||||
ID_UNIQ( "Unique ID" ),
|
||||
MA_CHAN( "Channel Map" ),
|
||||
MA_CHNL( "Channel Map Low" ),
|
||||
MA_CHNH( "Channel Map High" ),
|
||||
MS_TEXT( "Text Message" ),
|
||||
MS_MGPS( "GPS Message"),
|
||||
MS_STAT( "Status Message" ),
|
||||
RA_KILL( "Radio Kill" ),
|
||||
RA_REGI( "Radio Register" ),
|
||||
RA_STUN( "Radio Stun" ),
|
||||
RQ_ACCE( "Request Access" ),
|
||||
SY_IDLE( "System Idle" ),
|
||||
UN_KNWN( "Unknown" );
|
||||
|
||||
private String mDisplayText;
|
||||
|
||||
MessageType( String displayText )
|
||||
{
|
||||
mDisplayText = displayText;
|
||||
}
|
||||
|
||||
public String getDisplayText()
|
||||
{
|
||||
return mDisplayText;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user