Files
sdrtrunk/src/module/decode/state/DecoderStateEvent.java
denny 9c69733034 Decouples DecoderState from the Decoder and makes DecoderState inherit
from Module so that Decoder can function independent of DecoderSTate and
DecoderState can more cleanly interface with other modules. 

Resolves issue with LTR-type decoders where the AudioModule was
filtering demodulated audio buffers before the decoder received the
audio - demodulated audio buffers are now copied before creating
AudioPackets.
2015-09-26 05:45:34 -04:00

68 lines
1.1 KiB
Java

package module.decode.state;
public class DecoderStateEvent
{
private Object mSource;
private Event mEvent;
private State mState;
private long mFrequency;
public DecoderStateEvent( Object source, Event event, State state )
{
mSource = source;
mEvent = event;
mState = state;
}
public DecoderStateEvent( Object source, Event event, State state, long frequency )
{
this( source, event, state );
mFrequency = frequency;
}
public String toString()
{
StringBuilder sb = new StringBuilder();
sb.append( "Decoder State Event - source[" + mSource.getClass() +
"] event[" + mEvent.toString() +
"] state[" + mState.toString() +
"] frequency [" + mFrequency + "]" );
return sb.toString();
}
public Object getSource()
{
return mSource;
}
public Event getEvent()
{
return mEvent;
}
public State getState()
{
return mState;
}
public long getFrequency()
{
return mFrequency;
}
public enum Event
{
ALWAYS_UNSQUELCH,
CONTINUATION,
DECODE,
END,
RESET,
SOURCE_FREQUENCY,
START,
TRAFFIC_CHANNEL_ALLOCATION;
}
}