Instrument Neutral Distributed Interface INDI  2.0.2
transforms.h
Go to the documentation of this file.
1 /*******************************************************************************
2  Copyright(c) 2017 Ilia Platone, Jasem Mutlaq. All rights reserved.
3 
4  DSP Transforms plugin
5 
6  This library is free software; you can redistribute it and/or
7  modify it under the terms of the GNU Library General Public
8  License version 2 as published by the Free Software Foundation.
9 
10  This library is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  Library General Public License for more details.
14 
15  You should have received a copy of the GNU Library General Public License
16  along with this library; see the file COPYING.LIB. If not, write to
17  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18  Boston, MA 02110-1301, USA.
19 *******************************************************************************/
20 
21 #pragma once
22 
23 #include "dspinterface.h"
24 #include "dsp.h"
25 
26 #include <string>
27 
28 namespace DSP
29 {
31 {
32  public:
34  virtual bool processBLOB(uint8_t *out, uint32_t dims, int *sizes, int bits_per_sample) override;
35 
36  protected:
38 };
39 
41 {
42  public:
44  bool ISNewBLOB(const char *dev, const char *name, int sizes[], int blobsizes[], char *blobs[], char *formats[],
45  char *names[], int n) override;
46  virtual bool processBLOB(uint8_t *out, uint32_t dims, int *sizes, int bits_per_sample) override;
47 
48  protected:
50  void Activated() override;
51  void Deactivated() override;
52 
53  private:
54  IBLOBVectorProperty DownloadBP;
55  IBLOB DownloadB;
56 
57  dsp_stream_p phase;
58  bool phase_loaded { false };
59 };
60 
61 class Spectrum : public Interface
62 {
63  public:
65  virtual bool processBLOB(uint8_t *out, uint32_t dims, int *sizes, int bits_per_sample) override;
66 
67  protected:
68  ~Spectrum();
69 };
70 
71 class Histogram : public Interface
72 {
73  public:
75  virtual bool processBLOB(uint8_t *out, uint32_t dims, int *sizes, int bits_per_sample) override;
76 
77  protected:
78  ~Histogram();
79 };
80 }
FourierTransform(INDI::DefaultDevice *dev)
Definition: transforms.cpp:35
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.
Definition: transforms.cpp:43
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.
Definition: transforms.cpp:143
Histogram(INDI::DefaultDevice *dev)
Definition: transforms.cpp:135
bool ISNewBLOB(const char *dev, const char *name, int sizes[], int blobsizes[], char *blobs[], char *formats[], char *names[], int n) override
Definition: transforms.cpp:90
void Deactivated() override
Deactivated Called after deactivation from client application.
Definition: transforms.cpp:68
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.
Definition: transforms.cpp:74
InverseFourierTransform(INDI::DefaultDevice *dev)
Definition: transforms.cpp:52
void Activated() override
Activated Called after activation from client application.
Definition: transforms.cpp:62
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.
Definition: transforms.cpp:124
Spectrum(INDI::DefaultDevice *dev)
Definition: transforms.cpp:116
Class to provide extended functionality for devices in addition to the functionality provided by INDI...
The DSP Namespace adds signal processing to INDI drivers. Primarily written for sensors and detectors...
Definition: convolution.cpp:40
One Blob (Binary Large Object) descriptor.
BLOB (Binary Large Object) vector property descriptor.
Definition: indiapi.h:471
Contains a set of informations and data relative to a buffer and how to use it.
Definition: dsp.h:363