Files
sdrtrunk/src/module/decode/p25/message/tdu/lc/RFSSStatusBroadcast.java
denny f4d8ea281d Initial commit of redesigned internal processing and audio management.
Note: Several of the decoders are currently non-functioning in this
commit.  If you want the latest functioning codebase, please checkout
the commit prior to this one.  All decoders will eventually be updated
with this new architecture.

Currently broken:
- Logging and recording
- Aux decoders (Fleetsync/MDC/LoJack/Tait)
- LTR/Passport decoders

Changes in this commit:
- Module architecture for decoders and components with central
provisioning by the DecoderFactory
- Transition from Complex sample stream processing to float buffer
processing for improved memory management
- Redesigned filter structures - to support buffers and streams
- Resolved several memory leak issues
- Universal sharing of the thread pool manager
- Added centralized audio management with call/user prioritization and
new gui with mute/volume controls
- Embedded audio metadata for eventual streaming support
- Redesigned ProcessingChain to support independent re-use
- Added new TrafficChannelManager to handle traffic channel allocations
- Traffic Channel pool size and Call timeout available in P25 and
MPT1327 configs
- Redesigned channel and decoder gui components
2015-09-01 07:10:26 -04:00

133 lines
3.0 KiB
Java

package module.decode.p25.message.tdu.lc;
import module.decode.p25.message.IBandIdentifier;
import module.decode.p25.message.IdentifierReceiver;
import module.decode.p25.message.tsbk.osp.control.SystemService;
import module.decode.p25.reference.LinkControlOpcode;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public class RFSSStatusBroadcast extends TDULinkControlMessage
implements IdentifierReceiver
{
private final static Logger mLog =
LoggerFactory.getLogger( RFSSStatusBroadcast.class );
public static final int[] LRA = { 72,73,74,75,88,89,
90,91 };
public static final int[] SYSTEM_ID = { 96,97,98,99,112,113,114,115,116,117,
118,119 };
public static final int[] RFSS_ID = { 120,121,122,123,136,137,138,
139 };
public static final int[] SITE_ID = { 140,141,142,143,144,145,146,147 };
public static final int[] IDENTIFIER = { 160,161,162,163 };
public static final int[] CHANNEL = { 164,165,166,167,168,169,170,
171,184,185,186,187 };
public static final int[] SYSTEM_SERVICE_CLASS = { 188,189,190,191,192,193,
194,195 };
private IBandIdentifier mIdentifierUpdate;
public RFSSStatusBroadcast( TDULinkControlMessage source )
{
super( source );
}
@Override
public String getEventType()
{
return LinkControlOpcode.RFSS_STATUS_BROADCAST.getDescription();
}
@Override
public String getMessage()
{
StringBuilder sb = new StringBuilder();
sb.append( getMessageStub() );
sb.append( " LRA:" + getLocationRegistrationArea() );
sb.append( " SYS:" + getSystem() );
sb.append( " SITE:" + getRFSubsystemID() + "-" + getSiteID() );
sb.append( " CHAN:" + getChannelNumber() );
sb.append( " " + SystemService.toString( getSystemServiceClass() ) );
sb.append( " " + mMessage.toString() );
return sb.toString();
}
public String getLocationRegistrationArea()
{
return mMessage.getHex( LRA, 2 );
}
public String getSystem()
{
return mMessage.getHex( SYSTEM_ID, 3 );
}
public String getRFSubsystemID()
{
return mMessage.getHex( RFSS_ID, 2 );
}
public String getSiteID()
{
return mMessage.getHex( SITE_ID, 2 );
}
public int getIdentifier()
{
return mMessage.getInt( IDENTIFIER );
}
public String getChannel()
{
return getIdentifier() + "-" + getChannelNumber();
}
public int getChannelNumber()
{
return mMessage.getInt( CHANNEL );
}
public int getSystemServiceClass()
{
return mMessage.getInt( SYSTEM_SERVICE_CLASS );
}
@Override
public void setIdentifierMessage( int identifier, IBandIdentifier message )
{
mIdentifierUpdate = message;
}
@Override
public int[] getIdentifiers()
{
int[] identifiers = new int[ 1 ];
identifiers[ 0 ] = getIdentifier();
return identifiers;
}
public long getDownlinkFrequency()
{
return calculateDownlink( mIdentifierUpdate, getChannelNumber() );
}
public long getUplinkFrequency()
{
return calculateUplink( mIdentifierUpdate, getChannelNumber() );
}
}