Instrument Neutral Distributed Interface INDI  1.9.5
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
DSP::Interface Class Reference

#include <dspinterface.h>

Inheritance diagram for DSP::Interface:
DSP::Convolution DSP::FourierTransform DSP::Histogram DSP::InverseFourierTransform DSP::Spectrum DSP::Wavelets

Public Types

enum  Type {
  DSP_NONE = 0, DSP_DFT, DSP_IDFT, DSP_CONVOLUTION,
  DSP_SPECTRUM
}
 

Public Member Functions

virtual void ISGetProperties (const char *dev)
 
virtual bool ISNewSwitch (const char *dev, const char *name, ISState *states, char *names[], int n)
 
virtual bool ISNewNumber (const char *dev, const char *name, double values[], char *names[], int n)
 
virtual bool ISNewText (const char *dev, const char *name, char *texts[], char *names[], int n)
 
virtual bool ISNewBLOB (const char *dev, const char *name, int sizes[], int blobsizes[], char *blobs[], char *formats[], char *names[], int n)
 
virtual bool saveConfigItems (FILE *fp)
 
virtual bool updateProperties ()
 
bool processBLOB (uint8_t *buf, uint32_t ndims, int *dims, int bits_per_sample)
 processBLOB Propagate to Callback and generate BLOBs for parent device. More...
 
void setSizes (uint32_t num, int *sizes)
 setSizes Set the returned file dimensions and corresponding sizes. More...
 
void getSizes (uint32_t *num, int **sizes)
 getSizes Get the returned file dimensions and corresponding sizes. More...
 
void setBPS (int bps)
 setBPS Set the returned file bit depth/sample size. More...
 
int getBPS ()
 getBPS Get the returned file bit depth/sample size. More...
 

Protected Member Functions

virtual void Activated ()
 Activated Called after activation from client application. More...
 
virtual void Deactivated ()
 Deactivated Called after deactivation from client application. More...
 
virtual uint8_t * Callback (uint8_t *buf, uint32_t ndims, int *dims, int bits_per_sample)
 Callback Called by processBLOB. More...
 
dsp_stream_p loadFITS (char *buf, int len)
 loadFITS Converts FITS data into a dsp_stream structure pointer. More...
 
 Interface (INDI::DefaultDevice *dev, Type type=DSP_NONE, const char *name="DSP_PLUGIN", const char *label="DSP Plugin")
 
virtual ~Interface ()
 
const char * getDeviceName ()
 
void setStream (void *buf, uint32_t dims, int *sizes, int bits_per_sample)
 
uint8_t * getStream ()
 

Protected Attributes

bool PluginActive
 
IBLOBVectorProperty FitsBP
 
IBLOB FitsB
 
ISwitchVectorProperty ActivateSP
 
ISwitch ActivateS [2]
 
INumberVectorProperty EqNP
 
INumber EqN [2]
 
ITextVectorProperty ActiveDeviceTP
 
IText ActiveDeviceT [4] {}
 
INDI::DefaultDevicem_Device { nullptr }
 
const char * m_Name { nullptr }
 
const char * m_Label { nullptr }
 
Type m_Type { DSP_NONE }
 
dsp_stream_p stream
 

Detailed Description

Definition at line 43 of file dspinterface.h.

Member Enumeration Documentation

◆ Type

Enumerator
DSP_NONE 
DSP_DFT 
DSP_IDFT 
DSP_CONVOLUTION 
DSP_SPECTRUM 

Definition at line 71 of file dspinterface.h.

Constructor & Destructor Documentation

◆ Interface()

DSP::Interface::Interface ( INDI::DefaultDevice dev,
Type  type = DSP_NONE,
const char *  name = "DSP_PLUGIN",
const char *  label = "DSP Plugin" 
)
protected

Definition at line 60 of file dspinterface.cpp.

◆ ~Interface()

DSP::Interface::~Interface ( )
protectedvirtual

Definition at line 79 of file dspinterface.cpp.

Member Function Documentation

◆ Activated()

void DSP::Interface::Activated ( )
protectedvirtual

Activated Called after activation from client application.

Reimplemented in DSP::Wavelets, and DSP::Convolution.

Definition at line 221 of file dspinterface.cpp.

◆ Callback()

uint8_t * DSP::Interface::Callback ( uint8_t *  buf,
uint32_t  ndims,
int *  dims,
int  bits_per_sample 
)
protectedvirtual

Callback Called by processBLOB.

Parameters
bufThe input buffer
ndimsNumber of the dimensions of the input buffer
dimsSizes of the dimensions of the input buffer
bits_per_sampleoriginal bit depth of the input buffer
Returns
The processed buffer

Reimplemented in DSP::Histogram, DSP::Spectrum, DSP::FourierTransform, DSP::Wavelets, DSP::InverseFourierTransform, and DSP::Convolution.

Definition at line 172 of file dspinterface.cpp.

◆ Deactivated()

void DSP::Interface::Deactivated ( )
protectedvirtual

Deactivated Called after deactivation from client application.

Reimplemented in DSP::Wavelets, and DSP::Convolution.

Definition at line 226 of file dspinterface.cpp.

◆ getBPS()

int DSP::Interface::getBPS ( )
inline

getBPS Get the returned file bit depth/sample size.

Returns
Bit depth / sample size.

Definition at line 121 of file dspinterface.h.

◆ getDeviceName()

const char * DSP::Interface::getDeviceName ( )
protected

Definition at line 83 of file dspinterface.cpp.

◆ getSizes()

void DSP::Interface::getSizes ( uint32_t *  num,
int **  sizes 
)
inline

getSizes Get the returned file dimensions and corresponding sizes.

Parameters
numNumber of dimensions.
sizesSizes of the dimensions.

Definition at line 109 of file dspinterface.h.

◆ getStream()

uint8_t * DSP::Interface::getStream ( )
protected

Definition at line 699 of file dspinterface.cpp.

◆ ISGetProperties()

void DSP::Interface::ISGetProperties ( const char *  dev)
virtual

Definition at line 88 of file dspinterface.cpp.

◆ ISNewBLOB()

bool DSP::Interface::ISNewBLOB ( const char *  dev,
const char *  name,
int  sizes[],
int  blobsizes[],
char *  blobs[],
char *  formats[],
char *  names[],
int  n 
)
virtual

Reimplemented in DSP::Convolution.

Definition at line 158 of file dspinterface.cpp.

◆ ISNewNumber()

bool DSP::Interface::ISNewNumber ( const char *  dev,
const char *  name,
double  values[],
char *  names[],
int  n 
)
virtual

Reimplemented in DSP::Wavelets.

Definition at line 138 of file dspinterface.cpp.

◆ ISNewSwitch()

bool DSP::Interface::ISNewSwitch ( const char *  dev,
const char *  name,
ISState states,
char *  names[],
int  n 
)
virtual

Definition at line 118 of file dspinterface.cpp.

◆ ISNewText()

bool DSP::Interface::ISNewText ( const char *  dev,
const char *  name,
char *  texts[],
char *  names[],
int  n 
)
virtual

Definition at line 148 of file dspinterface.cpp.

◆ loadFITS()

dsp_stream_p DSP::Interface::loadFITS ( char *  buf,
int  len 
)
protected

loadFITS Converts FITS data into a dsp_stream structure pointer.

Parameters
bufThe input buffer
lenSize of the FIT in bytes
Returns
A dsp_stream_p structure containing the data of the loaded FITS

Definition at line 333 of file dspinterface.cpp.

◆ processBLOB()

bool DSP::Interface::processBLOB ( uint8_t *  buf,
uint32_t  ndims,
int *  dims,
int  bits_per_sample 
)

processBLOB Propagate to Callback and generate BLOBs for parent device.

Parameters
bufThe input buffer
ndimsNumber of the dimensions of the input buffer
dimsSizes of the dimensions of the input buffer
bits_per_sampleoriginal bit depth of the input buffer
Returns
True if successful, false otherwise.

Definition at line 182 of file dspinterface.cpp.

◆ saveConfigItems()

bool DSP::Interface::saveConfigItems ( FILE *  fp)
virtual

Definition at line 231 of file dspinterface.cpp.

◆ setBPS()

void DSP::Interface::setBPS ( int  bps)
inline

setBPS Set the returned file bit depth/sample size.

Parameters
bpsBit depth / sample size.

Definition at line 115 of file dspinterface.h.

◆ setSizes()

void DSP::Interface::setSizes ( uint32_t  num,
int *  sizes 
)
inline

setSizes Set the returned file dimensions and corresponding sizes.

Parameters
numNumber of dimensions.
sizesSizes of the dimensions.

Definition at line 102 of file dspinterface.h.

◆ setStream()

void DSP::Interface::setStream ( void *  buf,
uint32_t  dims,
int *  sizes,
int  bits_per_sample 
)
protected

Definition at line 665 of file dspinterface.cpp.

◆ updateProperties()

bool DSP::Interface::updateProperties ( )
virtual

Definition at line 103 of file dspinterface.cpp.

Member Data Documentation

◆ ActivateS

ISwitch DSP::Interface::ActivateS[2]
protected

Definition at line 159 of file dspinterface.h.

◆ ActivateSP

ISwitchVectorProperty DSP::Interface::ActivateSP
protected

Definition at line 158 of file dspinterface.h.

◆ ActiveDeviceT

IText DSP::Interface::ActiveDeviceT[4] {}
protected

Definition at line 166 of file dspinterface.h.

◆ ActiveDeviceTP

ITextVectorProperty DSP::Interface::ActiveDeviceTP
protected

Definition at line 165 of file dspinterface.h.

◆ EqN

INumber DSP::Interface::EqN[2]
protected

Definition at line 163 of file dspinterface.h.

◆ EqNP

INumberVectorProperty DSP::Interface::EqNP
protected

Definition at line 162 of file dspinterface.h.

◆ FitsB

IBLOB DSP::Interface::FitsB
protected

Definition at line 156 of file dspinterface.h.

◆ FitsBP

IBLOBVectorProperty DSP::Interface::FitsBP
protected

Definition at line 155 of file dspinterface.h.

◆ m_Device

INDI::DefaultDevice* DSP::Interface::m_Device { nullptr }
protected

Definition at line 172 of file dspinterface.h.

◆ m_Label

const char* DSP::Interface::m_Label { nullptr }
protected

Definition at line 174 of file dspinterface.h.

◆ m_Name

const char* DSP::Interface::m_Name { nullptr }
protected

Definition at line 173 of file dspinterface.h.

◆ m_Type

Type DSP::Interface::m_Type { DSP_NONE }
protected

Definition at line 175 of file dspinterface.h.

◆ PluginActive

bool DSP::Interface::PluginActive
protected

Definition at line 153 of file dspinterface.h.

◆ stream

dsp_stream_p DSP::Interface::stream
protected

Definition at line 178 of file dspinterface.h.


The documentation for this class was generated from the following files: