Instrument Neutral Distributed Interface INDI 2.2.5
lacerta_mfoc_fmc.h
Go to the documentation of this file.
1/*******************************************************************************
2 Copyright(c) 2018 Franck Le Rhun. All rights reserved.
3 Copyright(c) 2018 Christian Liska. All rights reserved.
4
5 This library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Library General Public
7 License version 2 as published by the Free Software Foundation.
8 .
9 This library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Library General Public License for more details.
13 .
14 You should have received a copy of the GNU Library General Public License
15 along with this library; see the file COPYING.LIB. If not, write to
16 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 Boston, MA 02110-1301, USA.
18*******************************************************************************/
19
20#pragma once
21
22#include "indifocuser.h"
23
25{
26 public:
28
29 bool initProperties() override;
30 void ISGetProperties(const char *dev) override;
31 bool updateProperties() override;
32
33 const char *getDefaultName() override;
34
35 virtual bool ISNewNumber(const char *dev, const char *name, double values[], char *names[], int n) override;
36 virtual bool ISNewSwitch(const char *dev, const char *name, ISState *states, char *names[], int n) override;
37
38 protected:
39 virtual bool Handshake() override;
40 virtual IPState MoveAbsFocuser(uint32_t targetTicks) override;
41 virtual IPState MoveRelFocuser(FocusDirection dir, uint32_t ticks) override;
42 virtual bool SetFocuserMaxPosition(uint32_t ticks) override;
43 virtual bool SetFocuserBacklash(int32_t steps) override;
44 virtual bool saveConfigItems(FILE *fp) override;
45 virtual bool SyncFocuser(uint32_t ticks) override;
46 virtual bool AbortFocuser() override;
47
48 private:
49 virtual bool SetTempComp(double values[], char *names[], int n);
50 virtual uint32_t GetAbsFocuserPosition();
51 virtual void IgnoreResponse();
52 virtual void IgnoreButLogResponse();
53 virtual bool SetCurrHold(int currHoldValue);
54 virtual bool SetCurrMove(int currMoveValue);
55
56 // Temperature Compensation
57 INumberVectorProperty TempCompNP;
58 INumber TempCompN[1];
59
60 // current holding
61 INDI::PropertyNumber CurrentHoldingNP {1};
62
63 // current moving
64 INDI::PropertyNumber CurrentMovingNP {1};
65
66 enum
67 {
68 MODE_TDIR_BOTH,
69 MODE_TDIR_IN,
70 MODE_TDIR_OUT,
71 MODE_COUNT_TEMP_DIR
72 };
73 INDI::PropertySwitch TempTrackDirSP {3};
74 // ISwitch TempTrackDirS[MODE_COUNT_TEMP_DIR];
75
76 enum
77 {
78 MODE_SAVED_ON,
79 MODE_SAVED_OFF,
80 MODE_COUNT_SAVED
81 };
82 INDI::PropertySwitch StartSavedPositionSP {2};
83 // ISwitch StartSavedPositionS[MODE_COUNT_SAVED];
84};
virtual bool ISNewSwitch(const char *dev, const char *name, ISState *states, char *names[], int n) override
Processes incoming new switch states from the client for this device. Handles updates to FocuserInter...
virtual bool SyncFocuser(uint32_t ticks) override
SyncFocuser Set current position to ticks without moving the focuser.
virtual IPState MoveRelFocuser(FocusDirection dir, uint32_t ticks) override
MoveFocuser the focuser to an relative position.
virtual bool Handshake() override
Performs a device-specific handshake after a connection is established. This method should be overrid...
virtual bool SetFocuserBacklash(int32_t steps) override
SetFocuserBacklash Set the focuser backlash compensation value.
bool initProperties() override
Initializes the default properties for the focuser device. Sets up standard INDI properties,...
virtual bool SetFocuserMaxPosition(uint32_t ticks) override
SetFocuserMaxPosition Update focuser maximum position. It only updates the PresetNP property limits.
void ISGetProperties(const char *dev) override
Handles client requests for property definitions for this device or all devices. Delegates to the bas...
virtual IPState MoveAbsFocuser(uint32_t targetTicks) override
MoveFocuser the focuser to an absolute position.
virtual bool saveConfigItems(FILE *fp) override
const char * getDefaultName() override
bool updateProperties() override
Updates the state and definition of properties based on the current connection status....
virtual bool AbortFocuser() override
AbortFocuser all focus motion.
virtual bool ISNewNumber(const char *dev, const char *name, double values[], char *names[], int n) override
Processes incoming new number values from the client for this device. Handles updates to FocuserInter...
ISState
Switch state.
Definition indiapi.h:148
IPState
Property state.
Definition indiapi.h:158
One number descriptor.
Number vector property descriptor.
Definition indiapi.h:317