46 setStream(buf, dims, sizes, bits_per_sample);
54 IUFillBLOB(&DownloadB,
"PHASE_DOWNLOAD",
"Phase",
"");
77 if(!phase_loaded)
return false;
78 setStream(buf, dims, sizes, bits_per_sample);
91 char *formats[],
char *names[],
int n)
95 if(!strcmp(name, DownloadBP.
name))
97 IUUpdateBLOB(&DownloadBP, sizes, blobsizes, blobs, formats, names, n);
104 phase =
loadFITS(blobs[0], sizes[0]);
105 if (phase !=
nullptr)
127 setStream(buf, dims, sizes, bits_per_sample);
146 setStream(buf, dims, sizes, bits_per_sample);
virtual bool processBLOB(uint8_t *out, uint32_t dims, int *sizes, int bits_per_sample) override
processBLOB Propagate to Callback and generate BLOBs for parent device.
Histogram(INDI::DefaultDevice *dev)
const char * getDeviceName()
virtual void Activated()
Activated Called after activation from client application.
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.
bool setStream(void *buf, uint32_t dims, int *sizes, int bits_per_sample)
INDI::DefaultDevice * m_Device
dsp_stream_p loadFITS(char *buf, int len)
loadFITS Converts FITS data into a dsp_stream structure pointer.
bool setMagnitude(void *buf, uint32_t dims, int *sizes, int bits_per_sample)
virtual void Deactivated()
Deactivated Called after deactivation from client application.
virtual bool processBLOB(uint8_t *out, uint32_t dims, int *sizes, int bits_per_sample) override
processBLOB Propagate to Callback and generate BLOBs for parent device.
Spectrum(INDI::DefaultDevice *dev)
const char * getDeviceName() const
Class to provide extended functionality for devices in addition to the functionality provided by INDI...
virtual bool deleteProperty(const char *propertyName)
Delete a property and unregister it. It will also be deleted from all clients.
void defineProperty(INumberVectorProperty *property)
struct dsp_stream_t * phase
Fourier transform phase.
int * sizes
Sizes of each dimension.
struct dsp_stream_t * magnitude
Fourier transform magnitude.
int dims
Number of dimensions of the buffers.
int len
The buffers length.
#define dsp_buffer_set(buf, len, _val)
Fill the buffer with the passed value.
DLL_EXPORT void dsp_stream_free(dsp_stream_p stream)
Free the DSP stream passed as argument.
DLL_EXPORT void dsp_stream_free_buffer(dsp_stream_p stream)
Free the buffer of the DSP Stream passed as argument.
DLL_EXPORT double * dsp_stats_histogram(dsp_stream_p stream, int size)
Histogram of the inut stream.
Implementations for common driver routines.
void IUFillBLOBVector(IBLOBVectorProperty *bvp, IBLOB *bp, int nbp, const char *dev, const char *name, const char *label, const char *group, IPerm p, double timeout, IPState s)
Assign attributes for a BLOB vector property. The vector's auxiliary elements will be set to NULL.
void IUFillBLOB(IBLOB *bp, const char *name, const char *label, const char *format)
Assign attributes for a BLOB property. The BLOB's data and auxiliary elements will be set to NULL.
int IUUpdateBLOB(IBLOBVectorProperty *bvp, int sizes[], int blobsizes[], char *blobs[], char *formats[], char *names[], int n)
Update all BLOB members in a BLOB vector property.
#define LOGF_INFO(fmt,...)
The DSP Namespace adds signal processing to INDI drivers. Primarily written for sensors and detectors...