Exemplo n.º 1
0
  @Override
  public void unregisterTap(Tap tap) {
    mFSKDecoder.unregisterTap(tap);

    switch (tap.getName()) {
      case INSTRUMENT_BANDPASS_FILTER_TO_FSK2_DEMOD:
        mBandPassFilter.setListener(mFSKDecoder);
        break;
      case INSTRUMENT_FSK2_DECODER_TO_MESSAGE_FRAMER:
        mFSKDecoder.setListener(mTowerMessageFramer);
        break;
    }
  }
Exemplo n.º 2
0
  public LJ1200Decoder(AliasList aliasList) {
    mDecimationFilter =
        new HalfBandFilter_RB_RB(
            Filters.FIR_HALF_BAND_31T_ONE_EIGHTH_FCO.getCoefficients(), 1.0f, true);

    mBandPassFilter =
        new RealFIRFilter_RB_RB(Filters.FIRBP_1200FSK_24000FS.getCoefficients(), 1.02f);
    mDecimationFilter.setListener(mBandPassFilter);

    mFSKDecoder = new FSK2Decoder(DECIMATED_SAMPLE_RATE, SYMBOL_RATE, Output.INVERTED);
    mBandPassFilter.setListener(mFSKDecoder);

    mFSKDecoder.setListener(mFSKDecoderBroadcaster);

    mTowerMessageFramer = new MessageFramer(SyncPattern.LJ1200.getPattern(), MESSAGE_LENGTH);
    mTransponderMessageFramer =
        new MessageFramer(SyncPattern.LJ1200_TRANSPONDER.getPattern(), MESSAGE_LENGTH);
    mFSKDecoderBroadcaster.addListener(mTowerMessageFramer);
    mFSKDecoderBroadcaster.addListener(mTransponderMessageFramer);

    mMessageProcessor = new LJ1200MessageProcessor(aliasList);
    mTowerMessageFramer.addMessageListener(mMessageProcessor);
    mTransponderMessageFramer.addMessageListener(mMessageProcessor);
    mMessageProcessor.setMessageListener(this);
  }
Exemplo n.º 3
0
  @Override
  public void registerTap(Tap tap) {
    mFSKDecoder.registerTap(tap);

    switch (tap.getName()) {
      case INSTRUMENT_BANDPASS_FILTER_TO_FSK2_DEMOD:
        FloatBufferTap bpTap = (FloatBufferTap) tap;
        mBandPassFilter.setListener(bpTap);
        bpTap.setListener(mFSKDecoder);
        break;
      case INSTRUMENT_FSK2_DECODER_TO_MESSAGE_FRAMER:
        BinaryTap decoderTap = (BinaryTap) tap;
        mFSKDecoder.setListener(decoderTap);
        decoderTap.setListener(mTowerMessageFramer);
        break;
    }
  }
Exemplo n.º 4
0
  public void dispose() {
    super.dispose();

    mDecimationFilter.dispose();
    mBandPassFilter.dispose();
    mFSKDecoder.dispose();
    mTowerMessageFramer.dispose();
    mMessageProcessor.dispose();
  }
Exemplo n.º 5
0
  @Override
  public List<TapGroup> getTapGroups() {
    if (mAvailableTaps == null) {
      mAvailableTaps = new ArrayList<TapGroup>();

      TapGroup group = new TapGroup("LJ-1200 Decoder");

      group.add(new FloatTap(INSTRUMENT_BANDPASS_FILTER_TO_FSK2_DEMOD, 0, 0.5f));
      group.add(new BinaryTap(INSTRUMENT_FSK2_DECODER_TO_MESSAGE_FRAMER, 0, 0.025f));

      mAvailableTaps.add(group);
      mAvailableTaps.addAll(mFSKDecoder.getTapGroups());
    }

    return mAvailableTaps;
  }