コード例 #1
0
  private void WriteFrameToOutputPorts(Frame aFrame) {
    // Write frame with valid data
    WriteIntegerToFilterOutputPort(TIMESTAMP_ID, FilterFramework.outPipe1);
    WriteLongToFilterOutputPort(aFrame.getTimeStamp(), FilterFramework.outPipe1);

    WriteIntegerToFilterOutputPort(VELOCITY_ID, FilterFramework.outPipe1);
    WriteLongToFilterOutputPort(aFrame.getVelocity(), FilterFramework.outPipe1);

    WriteIntegerToFilterOutputPort(ALTITUDE_MEASURE_ID, FilterFramework.outPipe1);
    WriteLongToFilterOutputPort(aFrame.getAltitudeMeasure(), FilterFramework.outPipe1);

    if (aFrame.getHasInvalidPressureMeasure() == true) {
      WriteIntegerToFilterOutputPort(PRESSURE_EXTRAPOLATED_MEASURE_ID, FilterFramework.outPipe1);
      WriteLongToFilterOutputPort(
          aFrame.getExtrapolatedPressureMeasure(), FilterFramework.outPipe1);
    } else {
      WriteIntegerToFilterOutputPort(PRESSURE_MEASURE_ID, FilterFramework.outPipe1);
      WriteLongToFilterOutputPort(aFrame.getPressureMeasure(), FilterFramework.outPipe1);
    }
    WriteIntegerToFilterOutputPort(TEMPERATURE_MEASURE_ID, FilterFramework.outPipe1);
    WriteLongToFilterOutputPort(aFrame.getTemperatureMeasure(), FilterFramework.outPipe1);

    WriteIntegerToFilterOutputPort(ATTITUDE_MEASURE_ID, FilterFramework.outPipe1);
    WriteLongToFilterOutputPort(aFrame.getAttitudeMeasure(), FilterFramework.outPipe1);

    // Write wildpoints
    if (aFrame.getHasInvalidPressureMeasure() == true) {
      WriteIntegerToFilterOutputPort(TIMESTAMP_ID, FilterFramework.outPipe2);
      WriteLongToFilterOutputPort(aFrame.getTimeStamp(), FilterFramework.outPipe2);

      WriteIntegerToFilterOutputPort(PRESSURE_MEASURE_ID, FilterFramework.outPipe2);
      WriteLongToFilterOutputPort(aFrame.getPressureMeasure(), FilterFramework.outPipe2);
    }
  }
コード例 #2
0
 Frame(Frame aFrame) {
   this(
       aFrame.getTimeStamp(),
       aFrame.getVelocity(),
       aFrame.getAltitudeMeasure(),
       aFrame.getPressureMeasure(),
       aFrame.getTemperatureMeasure(),
       aFrame.getAttitudeMeasure(),
       aFrame.getExtrapolatedPressureMeasure());
 }