Instrument Neutral Distributed Interface INDI  2.0.2
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_WAVELETS , DSP_SPECTRUM , DSP_HISTOGRAM
}
 

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 ()
 
virtual 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...
 
void setCaptureFileExtension (const char *ext)
 setIntegrationFileExtension Set the returned file extension. 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 ()
 
bool setStream (void *buf, uint32_t dims, int *sizes, int bits_per_sample)
 
bool setMagnitude (void *buf, uint32_t dims, int *sizes, int bits_per_sample)
 
bool setPhase (void *buf, uint32_t dims, int *sizes, int bits_per_sample)
 
bool setReal (void *buf, uint32_t dims, int *sizes, int bits_per_sample)
 
bool setImaginary (void *buf, uint32_t dims, int *sizes, int bits_per_sample)
 
uint8_t * getStream ()
 
uint8_t * getMagnitude ()
 
uint8_t * getPhase ()
 
uint8_t * getReal ()
 
uint8_t * getImaginary ()
 
uint8_t * getBuffer (dsp_stream_p in, uint32_t *dims, int **sizes)
 

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 44 of file dspinterface.h.

Member Enumeration Documentation

◆ Type

Enumerator
DSP_NONE 
DSP_DFT 
DSP_IDFT 
DSP_CONVOLUTION 
DSP_WAVELETS 
DSP_SPECTRUM 
DSP_HISTOGRAM 

Definition at line 72 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 84 of file dspinterface.cpp.

Member Function Documentation

◆ Activated()

void DSP::Interface::Activated ( )
protectedvirtual

Activated Called after activation from client application.

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

Definition at line 231 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

Definition at line 184 of file dspinterface.cpp.

◆ Deactivated()

void DSP::Interface::Deactivated ( )
protectedvirtual

Deactivated Called after deactivation from client application.

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

Definition at line 236 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 137 of file dspinterface.h.

◆ getBuffer()

uint8_t * DSP::Interface::getBuffer ( dsp_stream_p  in,
uint32_t *  dims,
int **  sizes 
)
protected

Definition at line 876 of file dspinterface.cpp.

◆ getDeviceName()

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

Definition at line 95 of file dspinterface.cpp.

◆ getImaginary()

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

◆ getMagnitude()

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

Definition at line 846 of file dspinterface.cpp.

◆ getPhase()

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

◆ getReal()

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

◆ 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 118 of file dspinterface.h.

◆ getStream()

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

Definition at line 816 of file dspinterface.cpp.

◆ ISGetProperties()

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

Definition at line 100 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::InverseFourierTransform, and DSP::Convolution.

Definition at line 170 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 150 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 130 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 160 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 343 of file dspinterface.cpp.

◆ processBLOB()

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

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.

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

Definition at line 194 of file dspinterface.cpp.

◆ saveConfigItems()

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

Definition at line 241 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 128 of file dspinterface.h.

◆ setCaptureFileExtension()

void DSP::Interface::setCaptureFileExtension ( const char *  ext)

setIntegrationFileExtension Set the returned file extension.

Parameters
extThe extension suffix.

Definition at line 910 of file dspinterface.cpp.

◆ setImaginary()

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

Definition at line 777 of file dspinterface.cpp.

◆ setMagnitude()

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

Definition at line 665 of file dspinterface.cpp.

◆ setPhase()

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

Definition at line 703 of file dspinterface.cpp.

◆ setReal()

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

Definition at line 741 of file dspinterface.cpp.

◆ 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 107 of file dspinterface.h.

◆ setStream()

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

Definition at line 626 of file dspinterface.cpp.

◆ updateProperties()

bool DSP::Interface::updateProperties ( )
virtual

Definition at line 115 of file dspinterface.cpp.

Member Data Documentation

◆ ActivateS

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

Definition at line 184 of file dspinterface.h.

◆ ActivateSP

ISwitchVectorProperty DSP::Interface::ActivateSP
protected

Definition at line 183 of file dspinterface.h.

◆ ActiveDeviceT

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

Definition at line 191 of file dspinterface.h.

◆ ActiveDeviceTP

ITextVectorProperty DSP::Interface::ActiveDeviceTP
protected

Definition at line 190 of file dspinterface.h.

◆ EqN

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

Definition at line 188 of file dspinterface.h.

◆ EqNP

INumberVectorProperty DSP::Interface::EqNP
protected

Definition at line 187 of file dspinterface.h.

◆ FitsB

IBLOB DSP::Interface::FitsB
protected

Definition at line 181 of file dspinterface.h.

◆ FitsBP

IBLOBVectorProperty DSP::Interface::FitsBP
protected

Definition at line 180 of file dspinterface.h.

◆ m_Device

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

Definition at line 198 of file dspinterface.h.

◆ m_Label

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

Definition at line 200 of file dspinterface.h.

◆ m_Name

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

Definition at line 199 of file dspinterface.h.

◆ m_Type

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

Definition at line 201 of file dspinterface.h.

◆ PluginActive

bool DSP::Interface::PluginActive
protected

Definition at line 178 of file dspinterface.h.

◆ stream

dsp_stream_p DSP::Interface::stream
protected

Definition at line 213 of file dspinterface.h.


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