Instrument Neutral Distributed Interface INDI 2.2.5
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
28namespace 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
61class 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
71class 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)
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.
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)
Interface(INDI::DefaultDevice *dev, Type type=DSP_NONE, const char *name="DSP_PLUGIN", const char *label="DSP Plugin")
bool ISNewBLOB(const char *dev, const char *name, int sizes[], int blobsizes[], char *blobs[], char *formats[], char *names[], int n) override
void Deactivated() override
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.
InverseFourierTransform(INDI::DefaultDevice *dev)
void Activated() override
Activated Called after activation 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)
Class to provide extended functionality for devices in addition to the functionality provided by INDI...
struct dsp_stream_t * dsp_stream_p
struct _IBLOBVectorProperty IBLOBVectorProperty
*brief user defined string literal for JSON values *sa std::size_t n
The DSP Namespace adds signal processing to INDI drivers. Primarily written for sensors and detectors...
One Blob (Binary Large Object) descriptor.