Instrument Neutral Distributed Interface INDI  2.0.2
focuslynx.h
Go to the documentation of this file.
1 /*
2  FocusLynx/FocusBoss II INDI driver
3  Copyright (C) 2015 Jasem Mutlaq (mutlaqja@ikarustech.com)
4 
5  This library is free software; you can redistribute it and/or
6  modify it under the terms of the GNU Lesser General Public
7  License as published by the Free Software Foundation; either
8  version 2.1 of the License, or (at your option) any later version.
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  Lesser General Public License for more details.
14 
15  You should have received a copy of the GNU Lesser General Public
16  License along with this library; if not, write to the Free Software
17  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18 */
19 
20 #pragma once
21 
22 #include "focuslynxbase.h"
23 
24 #define FOCUSNAMEF1 "FocusLynx F1"
25 #define FOCUSNAMEF2 "FocusLynx F2"
26 
27 class FocusLynxF1 : public FocusLynxBase
28 {
29  public:
30  explicit FocusLynxF1(const char *target);
31  ~FocusLynxF1();
32 
33  const char *getDefaultName() override;
34  virtual bool Connect() override;
35  virtual bool Disconnect() override;
36  virtual bool updateProperties() override;
37  virtual bool initProperties() override;
38  // virtual void ISGetProperties(const char *dev) override;
39  int getPortFD();
40 
41  virtual void simulationTriggered(bool enable) override;
42  virtual void setDebug(bool enable);
43  virtual void debugTriggered(bool enable) override;
44 
45  private:
46  // Get functions
47  bool getHubConfig();
48 
49  // HUB Main Parameter
50  IText HubT[2] {};
51  ITextVectorProperty HubTP;
52 
53  // Network Wired Info
54  IText WiredT[2] {};
55  ITextVectorProperty WiredTP;
56 
57  //Network WIFI Info
58  IText WifiT[9] {};
59  ITextVectorProperty WifiTP;
60 };
61 
62 class FocusLynxF2 : public FocusLynxBase
63 {
64  public:
65  explicit FocusLynxF2(const char *target);
66  ~FocusLynxF2();
67 
68  const char *getDefaultName() override;
69  virtual bool Connect() override;
70  virtual bool Disconnect() override;
71  virtual bool RemoteDisconnect();
72  virtual bool initProperties() override;
73  virtual void setSimulation(bool enable);
74  virtual void setDebug(bool enable);
75  virtual void debugTriggered(bool enable) override;
76 };
77 
int getPortFD()
Definition: focuslynx.cpp:166
virtual void setDebug(bool enable)
Definition: focuslynx.cpp:736
virtual bool Connect() override
Connect to the device. INDI::DefaultDevice implementation connects to appropriate connection interfac...
Definition: focuslynx.cpp:120
virtual bool Disconnect() override
Disconnect from device.
Definition: focuslynx.cpp:146
FocusLynxF1(const char *target)
Definition: focuslynx.cpp:44
virtual bool initProperties() override
Initilize properties initial state and value. The child class must implement this function.
Definition: focuslynx.cpp:69
virtual void debugTriggered(bool enable) override
Inform driver that the debug option was triggered. This function is called after setDebug is triggere...
Definition: focuslynx.cpp:726
const char * getDefaultName() override
Definition: focuslynx.cpp:112
virtual void simulationTriggered(bool enable) override
Inform driver that the simulation option was triggered. This function is called after setSimulation i...
Definition: focuslynx.cpp:716
virtual bool updateProperties() override
updateProperties is called whenever there is a change in the CONNECTION status of the driver....
Definition: focuslynx.cpp:176
virtual bool RemoteDisconnect()
Definition: focuslynx.cpp:837
virtual bool Connect() override
Connect to the device. INDI::DefaultDevice implementation connects to appropriate connection interfac...
Definition: focuslynx.cpp:789
FocusLynxF2(const char *target)
Definition: focuslynx.cpp:752
virtual void setDebug(bool enable)
Definition: focuslynx.cpp:874
virtual void setSimulation(bool enable)
Definition: focuslynx.cpp:855
virtual void debugTriggered(bool enable) override
Inform driver that the debug option was triggered. This function is called after setDebug is triggere...
Definition: focuslynx.cpp:864
const char * getDefaultName() override
Definition: focuslynx.cpp:781
virtual bool initProperties() override
Initilize properties initial state and value. The child class must implement this function.
Definition: focuslynx.cpp:769
virtual bool Disconnect() override
Disconnect from device.
Definition: focuslynx.cpp:825
One text descriptor.
Text vector property descriptor.
Definition: indiapi.h:246