mirror of
https://github.com/DSheirer/sdrtrunk.git
synced 2026-11-12 16:47:31 -05:00
LJ1200 added message field parsing
This commit is contained in:
@@ -60,8 +60,8 @@ public enum DecoderType
|
||||
DecoderType.LTR_STANDARD,
|
||||
DecoderType.MPT1327,
|
||||
DecoderType.NBFM,
|
||||
DecoderType.PASSPORT,
|
||||
DecoderType.P25_PHASE1 );
|
||||
// DecoderType.P25_PHASE1,
|
||||
DecoderType.PASSPORT );
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -65,7 +65,7 @@ public class LJ1200CallEvent extends CallEvent
|
||||
@Override
|
||||
public long getFrequency()
|
||||
{
|
||||
return 0;
|
||||
return 173075000;
|
||||
}
|
||||
|
||||
public static class Builder
|
||||
@@ -94,7 +94,7 @@ public class LJ1200CallEvent extends CallEvent
|
||||
{
|
||||
mFromID = val;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
public Builder details( String details )
|
||||
{
|
||||
@@ -128,12 +128,11 @@ public class LJ1200CallEvent extends CallEvent
|
||||
|
||||
public static LJ1200CallEvent getLJ1200Event( LJ1200Message message )
|
||||
{
|
||||
CallEventType type = CallEventType.UNKNOWN;
|
||||
StringBuilder sbDetails = new StringBuilder();
|
||||
sbDetails.append( "LJ-1200 " );
|
||||
CallEventType type = CallEventType.REQUEST;
|
||||
|
||||
return new LJ1200CallEvent.Builder( type )
|
||||
.details( sbDetails.toString() )
|
||||
.to( message.getAddress() )
|
||||
.details( message.getMessage() )
|
||||
.build();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,7 +20,6 @@ package decode.lj1200;
|
||||
import message.Message;
|
||||
import controller.state.AuxChannelState;
|
||||
import controller.state.ChannelState;
|
||||
import controller.state.ChannelState.State;
|
||||
|
||||
public class LJ1200ChannelState extends AuxChannelState
|
||||
{
|
||||
@@ -50,10 +49,9 @@ public class LJ1200ChannelState extends AuxChannelState
|
||||
if( message instanceof LJ1200Message )
|
||||
{
|
||||
mActivitySummary.receive( message );
|
||||
|
||||
/* Set the state to CALL on the parent channel state, so that the
|
||||
* parent state timer can track turning off any updates we apply */
|
||||
mParentChannelState.setState( State.CALL );
|
||||
|
||||
mParentChannelState.receiveCallEvent(
|
||||
LJ1200CallEvent.getLJ1200Event( (LJ1200Message)message ) );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -33,15 +33,16 @@ public class LJ1200Message extends Message
|
||||
{
|
||||
public static int[] SYNC = { 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15 };
|
||||
|
||||
public static int[] MESSAGE = { 16,17,18,19,20,21,22,23,
|
||||
24,25,26,27,28,29,30,31,
|
||||
32,33,34,35,36,37,38,39,
|
||||
40,41,42,43,44,45,46,47,
|
||||
48,49,50,51,52,53,54,55,
|
||||
56,57,58,59,60,61,62,63 };
|
||||
public static int[] VRC = { 16,17,18,19,20,21,22,23 };
|
||||
|
||||
public static int[] LRC = { 24,25,26,27,28,29,30,31 };
|
||||
|
||||
public static int[] CRC = { 64,65,66,67,68,69,70,71,
|
||||
72,73,74,75,76,77,78,79 };
|
||||
public static int[] FUNCTION = { 32,33,34,35 };
|
||||
|
||||
public static int[] ADDRESS = { 36,37,38,39,40,41,42,43,44,45,46,47,
|
||||
48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63 };
|
||||
|
||||
public static int[] CRC = { 64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79 };
|
||||
|
||||
private static SimpleDateFormat mSDF = new SimpleDateFormat( "yyyyMMdd HHmmss" );
|
||||
|
||||
@@ -90,16 +91,34 @@ public class LJ1200Message extends Message
|
||||
return true;
|
||||
}
|
||||
|
||||
public int getVRC()
|
||||
{
|
||||
return mMessage.getInt( VRC );
|
||||
}
|
||||
|
||||
public int getLRC()
|
||||
{
|
||||
return mMessage.getInt( LRC );
|
||||
}
|
||||
|
||||
public int getFunction()
|
||||
{
|
||||
return mMessage.getInt( FUNCTION );
|
||||
}
|
||||
|
||||
public String getAddress()
|
||||
{
|
||||
return mMessage.getHex( ADDRESS, 7 );
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString()
|
||||
{
|
||||
StringBuilder sb = new StringBuilder();
|
||||
|
||||
sb.append( mSDF.format( new Date( System.currentTimeMillis() ) ) );
|
||||
|
||||
sb.append( " LJ1200 [" );
|
||||
sb.append( mMessage.toString() );
|
||||
sb.append( "]" );
|
||||
sb.append( "VRC: " + getVRC() );
|
||||
sb.append( " LRC: " + getLRC() );
|
||||
sb.append( " FUNCTION: " + getFunction() );
|
||||
|
||||
return sb.toString();
|
||||
}
|
||||
@@ -149,7 +168,7 @@ public class LJ1200Message extends Message
|
||||
@Override
|
||||
public String getProtocol()
|
||||
{
|
||||
return "LJ 1200";
|
||||
return "LJ-1200";
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -173,7 +192,7 @@ public class LJ1200Message extends Message
|
||||
@Override
|
||||
public String getToID()
|
||||
{
|
||||
return null;
|
||||
return getAddress();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user