|
HARDT - The Ham Radio DSP Toolkit
|
62 bool _isWriterConsumer;
67 std::vector<ComponentPtr> _components;
89 int Write(T* src,
size_t blocksize);
92 int Read(T* dest,
size_t blocksize);
114 if( _writer !=
nullptr && _position == 0 )
116 if( !_writer->
Command(command) )
121 if( _reader !=
nullptr && _position == 0 )
123 if( !_reader->
Command(command) )
130 if( _components.at(_position - 1).Reader !=
nullptr )
132 if( !_components.at(_position - 1).Reader->Command(command) )
137 if( _components.at(_position - 1).Writer !=
nullptr )
139 if( !_components.at(_position - 1).Writer->Command(command) )
virtual bool Command(HCommand *command)=0
void Add(HReader< T > *reader)
Definition: hswitch.cpp:124
HWriter< T > * Writer
Definition: hswitch.h:36
HReader< T > * Reader
Definition: hswitch.h:33
int GetPosition()
Definition: hswitch.cpp:118
bool Start()
Definition: hswitch.cpp:161
void SetPosition(int position)
Definition: hswitch.cpp:101
bool Command(HCommand *command)
Definition: hswitch.h:113
int Read(T *dest, size_t blocksize)
Definition: hswitch.cpp:79
~HSwitch()
Definition: hswitch.cpp:51
virtual bool Command(HCommand *command)=0
HSwitch(HWriter< T > *writer, size_t blocksize)
Definition: hswitch.cpp:7
ComponentPtr(HWriter< T > *writer)
Definition: hswitch.h:46
Definition: hcommand.h:81
bool Stop()
Definition: hswitch.cpp:184
void SetWriter(HWriter< T > *writer)
Definition: hswitch.cpp:148
ComponentPtr(HReader< T > *reader)
Definition: hswitch.h:39
Definition: hwriterconsumer.h:8
int Write(T *src, size_t blocksize)
Definition: hswitch.cpp:57