HARDT - The Ham Radio DSP Toolkit
hwriter.h
1 #ifndef __HWRITER_H
2 #define __HWRITER_H
3 
4 #include "hcommand.h"
5 
9 template <class T>
10 class HWriter : public HObject
11 {
12  public:
13 
15  virtual ~HWriter() = default;
16 
18  virtual int Write(T* src, size_t blocksize) = 0;
19 
21  virtual bool Start()
22  {
23  return true;
24  }
25 
27  virtual bool Stop()
28  {
29  return true;
30  }
31 
34  {
35  return (HWriter<T>*) this;
36  }
37 
44  virtual bool Command(HCommand* command) = 0;
45 };
46 
47 #endif
HWriter
Definition: hwriter.h:10
HWriter::Write
virtual int Write(T *src, size_t blocksize)=0
HWriter::Command
virtual bool Command(HCommand *command)=0
HWriter::Start
virtual bool Start()
Definition: hwriter.h:21
HCommand
Definition: hcommand.h:81
HWriter::Writer
HWriter< T > * Writer()
Definition: hwriter.h:33
HWriter::Stop
virtual bool Stop()
Definition: hwriter.h:27
HWriter::~HWriter
virtual ~HWriter()=default
HObject
Definition: hobject.h:14