Instrument Neutral Distributed Interface INDI 2.2.5
ioptron_wheel.h
Go to the documentation of this file.
1/*******************************************************************************
2 Copyright(c) 2024 Joe Zhou. All rights reserved.
3
4 iOptron Filter Wheel
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 "indifilterwheel.h"
24
25class iEFW : public INDI::FilterWheel
26{
27 public:
28 iEFW();
29 virtual bool ISNewSwitch(const char *dev, const char *name, ISState *states, char *names[], int n) override;
30
31 protected:
32 const char *getDefaultName() override;
33 bool initProperties() override;
34 bool updateProperties() override;
35 bool Handshake() override;
36 int QueryFilter() override;
37 bool SelectFilter(int) override;
38// void TimerHit() override;
39 int getFilterPos();
40 // Firmware of the iEFW
43
44 private:
45
46 bool getiEFWID();
47 bool getiEFWInfo();
48 bool getiEFWfirmwareInfo();
49 void initOffset();
50 INDI::PropertySwitch HomeSP{1};
51};
INDI::PropertyText WheelIDTP
const char * getDefaultName() override
bool updateProperties() override
updateProperties is called whenever there is a change in the CONNECTION status of the driver....
INDI::PropertyText FirmwareTP
bool Handshake() override
perform handshake with device to check communication
virtual bool ISNewSwitch(const char *dev, const char *name, ISState *states, char *names[], int n) override
Process the client newSwitch command.
int getFilterPos()
int QueryFilter() override
Return current filter position.
bool SelectFilter(int) override
Select a new filter position.
bool initProperties() override
Initialize properties initial state and value. The child class must implement this function.
ISState
Switch state.
Definition indiapi.h:148