DP3
NullStep.h
Go to the documentation of this file.
1 // Copyright (C) 2022 ASTRON (Netherlands Institute for Radio Astronomy)
2 // SPDX-License-Identifier: GPL-3.0-or-later
3 
4 #ifndef DP3_STEPS_NULLSTEP_H_
5 #define DP3_STEPS_NULLSTEP_H_
6 
7 #include "OutputStep.h"
8 
9 namespace dp3 {
10 namespace steps {
11 
15 class NullStep : public OutputStep {
16  public:
17  ~NullStep() override {}
18 
20  common::Fields getRequiredFields() const override { return {}; }
21 
23  common::Fields getProvidedFields() const override { return {}; }
24 
26  bool process(std::unique_ptr<base::DPBuffer>) override { return true; }
27 
29  bool process(std::unique_ptr<base::BdaBuffer>) override { return true; }
30 
33  void finish() override {}
34 
37  void show(std::ostream&) const override {}
38 
40  bool accepts(MsType t) const override {
41  return t == MsType::kRegular || t == MsType::kBda;
42  }
43 };
44 
45 } // namespace steps
46 } // namespace dp3
47 
48 #endif
Definition: Fields.h:16
This class defines a null step in the DP3 pipeline. It can be used as the last step in the pipeline,...
Definition: NullStep.h:15
void finish() override
Definition: NullStep.h:33
bool process(std::unique_ptr< base::DPBuffer >) override
Process regular data. It does nothing.
Definition: NullStep.h:26
bool process(std::unique_ptr< base::BdaBuffer >) override
Process bda data. It does nothing.
Definition: NullStep.h:29
bool accepts(MsType t) const override
Accept BDA and regular data.
Definition: NullStep.h:40
common::Fields getRequiredFields() const override
A null step requires nothing.
Definition: NullStep.h:20
void show(std::ostream &) const override
Definition: NullStep.h:37
common::Fields getProvidedFields() const override
A null step provides nothing.
Definition: NullStep.h:23
~NullStep() override
Definition: NullStep.h:17
Base class for output steps.
Definition: OutputStep.h:15
MsType
To check compatibility between steps before running.
Definition: Step.h:57
This file has generic helper routines for testing steps.
Definition: AntennaConfig.h:53