|
HARDT - The Ham Radio DSP Toolkit
|
#include <hswitch.h>


Classes | |
| struct | ComponentPtr |
Public Member Functions | |
| HSwitch (HWriter< T > *writer, size_t blocksize) | |
| HSwitch (HWriterConsumer< T > *consumer, size_t blocksize) | |
| HSwitch (HReader< T > *reader, size_t blocksize) | |
| void | SetWriter (HWriter< T > *writer) |
| ~HSwitch () | |
| int | Write (T *src, size_t blocksize) |
| int | Read (T *dest, size_t blocksize) |
| void | SetPosition (int position) |
| int | GetPosition () |
| void | Add (HReader< T > *reader) |
| void | Add (HWriter< T > *writer) |
| bool | Start () |
| bool | Stop () |
| bool | Command (HCommand *command) |
Public Member Functions inherited from HReader< T > | |
| virtual | ~HReader ()=default |
| HReader< T > * | Reader () |
Public Member Functions inherited from HObject | |
| HObject () | |
Public Member Functions inherited from HWriter< T > | |
| virtual | ~HWriter ()=default |
| HWriter< T > * | Writer () |
Public Member Functions inherited from HWriterConsumer< T > | |
| HWriterConsumer< T > * | Consumer () |
Implements a switch that can hold a number of object that can be switched between, say 3 filters where the switch position determines which filter gets the reads or writes passed to/from this component
The switch also has a zero-position called "bypass" (index 0), in which all writes or reads are passed through directly
Allthough you can warp the intended usage pattern by supplying output- or nullwriters , this component is really meant to be used as a pass-through device with filters or other types of sample-manipulating objects.
If you are looking for an on-off switch, use the HMute class.
Construct a new HSwitch that handle writers
| HSwitch< T >::HSwitch | ( | HWriterConsumer< T > * | consumer, |
| size_t | blocksize | ||
| ) |
Construct a new HSwitch that handle writer consumers
Construct a new HSwitch that handle readers
Execute or carry through a command
Implements HReader< T >.
| int HSwitch< T >::GetPosition |
Get switch position
|
virtual |
Read a block of samples
Implements HReader< T >.
| void HSwitch< T >::SetPosition | ( | int | position | ) |
Set switch position
Implements HWriterConsumer::SetWriter()
Implements HWriterConsumer< T >.
|
virtual |
Call Start() on all known components
Reimplemented from HReader< T >.
|
virtual |
Call Stop() on all known components
Reimplemented from HReader< T >.
|
virtual |
Write a block of samples
Implements HWriter< T >.
1.8.17