Instrument Neutral Distributed Interface INDI 2.2.5
quantum_wheel.h
Go to the documentation of this file.
1/*******************************************************************************
2 Copyright(c) 2016 Radek Kaczorek <rkaczorek AT gmail DOT com>
3
4 This library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Library General Public
6 License version 2 as published by the Free Software Foundation.
7 .
8 This library is distributed in the hope that it will be useful,
9 but WITHOUT ANY WARRANTY; without even the implied warranty of
10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 Library General Public License for more details.
12 .
13 You should have received a copy of the GNU Library General Public License
14 along with this library; see the file COPYING.LIB. If not, write to
15 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
16 Boston, MA 02110-1301, USA.
17*******************************************************************************/
18
19/*
20 * Quantum protocol
21 *
22 *
23 * Get number of filter positions EN N<number>
24 * Disconnect DS
25 * Go to filter position G<number>
26 * position is returned when the move finishes P<number>
27 * get filter name F<number> F<number><name>
28 * set filter name f<number><name>
29 * Get filter offset O<number> O<number><offset>
30 * set filter offset o<number><offset>
31 * Get description SN SN<details>
32 * get version VR VR<details>
33 */
34
35#pragma once
36
37#include "indifilterwheel.h"
38
39class QFW : public INDI::FilterWheel
40{
41 public:
42 QFW();
43 virtual ~QFW() = default;
44
45 void debugTriggered(bool enable);
46 void simulationTriggered(bool enable);
47
48 bool Handshake();
49 const char *getDefaultName();
50
51 bool initProperties();
52 // virtual bool updateProperties() override;
53
54 void ISGetProperties(const char *dev);
55
56 int QueryFilter();
57 bool SelectFilter(int);
58 private:
59 void dump(char *buf, const char *data);
60 int send_command(int fd, const char *cmd, char *resp);
61};
const char * getDefaultName()
void debugTriggered(bool enable)
Inform driver that the debug option was triggered. This function is called after setDebug is triggere...
void ISGetProperties(const char *dev)
define the driver's properties to the client. Usually, only a minimum set of properties are defined t...
virtual ~QFW()=default
bool SelectFilter(int)
Select a new filter position.
bool Handshake()
perform handshake with device to check communication
bool initProperties()
Initialize properties initial state and value. The child class must implement this function.
int QueryFilter()
Return current filter position.
void simulationTriggered(bool enable)
Inform driver that the simulation option was triggered. This function is called after setSimulation i...
int fd
uint8_t cmd[4]
Definition pwc-ioctl.h:2