#701 P25 Phase 2 Tone Metadata and Channel State (#702)

* Resolves #701 Updates P25P2 Tone metadata handling and P25P2 channel state management.
This commit is contained in:
Denny Sheirer
2020-03-28 09:51:11 +00:00
committed by GitHub
parent 41df207bb9
commit 158c8b4b8a
25 changed files with 493 additions and 611 deletions

View File

@@ -94,7 +94,7 @@ public class SingleChannelState extends AbstractChannelState implements IDecoder
private DecoderStateEventReceiver mDecoderStateEventReceiver = new DecoderStateEventReceiver();
private SourceEventListener mInternalSourceEventListener;
private ChannelMetadata mChannelMetadata;
private StateMachine mStateMachine = new StateMachine(0);
private StateMachine mStateMachine = new StateMachine(0, State.SINGLE_CHANNEL_ACTIVE_STATES);
private StateMonitoringSquelchController mSquelchController = new StateMonitoringSquelchController(0);
public SingleChannelState(Channel channel, AliasModel aliasModel)
@@ -123,7 +123,7 @@ public class SingleChannelState extends AbstractChannelState implements IDecoder
public void stateChanged(State state, int timeslot)
{
//Broadcast current channel state so that channel rotation monitor can track
if(state.isActiveState())
if(State.SINGLE_CHANNEL_ACTIVE_STATES.contains(state))
{
broadcast(DecoderStateEvent.activeState(timeslot));
}
@@ -377,7 +377,7 @@ public class SingleChannelState extends AbstractChannelState implements IDecoder
case NOTIFICATION_MEASURED_FREQUENCY_ERROR:
//Rebroadcast frequency error measurements to external listener if we're currently
//in an active (ie sync locked) state.
if(mStateMachine.getState().isActiveState())
if(State.SINGLE_CHANNEL_ACTIVE_STATES.contains(mStateMachine.getState()))
{
broadcast(SourceEvent.frequencyErrorMeasurementSyncLocked(sourceEvent.getValue().longValue(),
mChannel.getChannelType().name()));
@@ -411,7 +411,7 @@ public class SingleChannelState extends AbstractChannelState implements IDecoder
case CONTINUATION:
case DECODE:
case START:
if(State.CALL_STATES.contains(event.getState()))
if(State.SINGLE_CHANNEL_ACTIVE_STATES.contains(event.getState()))
{
mStateMachine.setState(event.getState());
}