Instrument Neutral Distributed Interface INDI  1.9.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 
FocusLynxF1::Disconnect
virtual bool Disconnect() override
Disconnect from device.
Definition: focuslynx.cpp:146
FocusLynxF1::initProperties
virtual bool initProperties() override
Initilize properties initial state and value. The child class must implement this function.
Definition: focuslynx.cpp:69
FocusLynxF1::getDefaultName
const char * getDefaultName() override
Definition: focuslynx.cpp:112
FocusLynxF1::FocusLynxF1
FocusLynxF1(const char *target)
Definition: focuslynx.cpp:44
FocusLynxF2::setDebug
virtual void setDebug(bool enable)
Definition: focuslynx.cpp:875
FocusLynxF2::Disconnect
virtual bool Disconnect() override
Disconnect from device.
Definition: focuslynx.cpp:826
FocusLynxF2
Definition: focuslynx.h:62
_ITextVectorProperty
Text vector property descriptor.
Definition: indiapi.h:244
FocusLynxF2::setSimulation
virtual void setSimulation(bool enable)
Definition: focuslynx.cpp:856
FocusLynxF1::Connect
virtual bool Connect() override
Connect to the device. INDI::DefaultDevice implementation connects to appropriate connection interfac...
Definition: focuslynx.cpp:120
FocusLynxF2::RemoteDisconnect
virtual bool RemoteDisconnect()
Definition: focuslynx.cpp:838
FocusLynxF1::simulationTriggered
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
IText
One text descriptor.
FocusLynxF2::Connect
virtual bool Connect() override
Connect to the device. INDI::DefaultDevice implementation connects to appropriate connection interfac...
Definition: focuslynx.cpp:790
FocusLynxF2::FocusLynxF2
FocusLynxF2(const char *target)
Definition: focuslynx.cpp:752
focuslynxbase.h
FocusLynxF1::updateProperties
virtual bool updateProperties() override
updateProperties is called whenever there is a change in the CONNECTION status of the driver....
Definition: focuslynx.cpp:176
FocusLynxF2::initProperties
virtual bool initProperties() override
Initilize properties initial state and value. The child class must implement this function.
Definition: focuslynx.cpp:769
FocusLynxF1
Definition: focuslynx.h:27
FocusLynxF1::~FocusLynxF1
~FocusLynxF1()
Definition: focuslynx.cpp:62
FocusLynxF2::~FocusLynxF2
~FocusLynxF2()
Definition: focuslynx.cpp:762
FocusLynxF2::debugTriggered
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:865
FocusLynxF1::getPortFD
int getPortFD()
Definition: focuslynx.cpp:166
FocusLynxBase
Definition: focuslynxbase.h:50
FocusLynxF1::setDebug
virtual void setDebug(bool enable)
Definition: focuslynx.cpp:736
FocusLynxF2::getDefaultName
const char * getDefaultName() override
Definition: focuslynx.cpp:782
FocusLynxF1::debugTriggered
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