Instrument Neutral Distributed Interface INDI 2.2.5
filter_simulator.h
Go to the documentation of this file.
1/*******************************************************************************
2 Copyright(c) 2010 Gerry Rozema. All rights reserved.
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#pragma once
20
21#include "indifilterwheel.h"
22
27{
28 public:
29 FilterSim() = default;
30 virtual ~FilterSim() = default;
31
32 virtual bool initProperties() override;
33 virtual bool updateProperties() override;
34 virtual bool ISNewNumber(const char *dev, const char *name, double values[], char *names[], int n) override;
35 virtual const char *getDefaultName() override;
36
37 bool Connect() override;
38 bool Disconnect() override;
39 bool SelectFilter(int) override;
40 void TimerHit() override;
41
42 private:
43 INDI::PropertyNumber DelayNP {1};
44};
The FilterSim class provides a simple simulator to change filters. The filter names are saved to a co...
virtual bool updateProperties() override
updateProperties is called whenever there is a change in the CONNECTION status of the driver....
FilterSim()=default
virtual bool initProperties() override
Initialize properties initial state and value. The child class must implement this function.
virtual ~FilterSim()=default
bool Disconnect() override
Disconnect from device.
bool Connect() override
Connect to the device. INDI::DefaultDevice implementation connects to appropriate connection interfac...
bool SelectFilter(int) override
Select a new filter position.
virtual const char * getDefaultName() override
void TimerHit() override
Callback function to be called once SetTimer duration elapses.
virtual bool ISNewNumber(const char *dev, const char *name, double values[], char *names[], int n) override
Process the client newNumber command.