Instrument Neutral Distributed Interface INDI  2.0.2
defaultdevice_p.h
Go to the documentation of this file.
1 /*******************************************************************************
2  Copyright(c) 2011 Jasem Mutlaq. 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 "parentdevice_p.h"
22 #include "defaultdevice.h"
23 #include "watchdeviceproperty.h"
24 
25 #include <cstring>
26 #include <list>
27 #include <mutex>
28 
29 #include "indipropertyswitch.h"
30 #include "indipropertynumber.h"
31 #include "indipropertytext.h"
32 #include "inditimer.h"
33 
34 namespace INDI
35 {
37 {
38  public:
40  virtual ~DefaultDevicePrivate();
41 
43 
44  bool isInit { false };
45  bool isDebug { false };
46  bool isSimulation { false };
47  bool isDefaultConfigLoaded {false};
48  bool isConfigLoading { false };
49 
50  uint16_t majorVersion { 1 };
51  uint16_t minorVersion { 0 };
53 
60  PropertySwitch ConnectionModeSP { 0 }; // dynamic count of switches
61 
62  std::vector<Connection::Interface *> connections;
64 
68  uint32_t pollingPeriod = 1000;
69 
72 
73  // TimerHit timer
75 
76  public:
77  static std::list<DefaultDevicePrivate*> devices;
78  static std::recursive_mutex devicesLock;
79 
81 };
82 
83 }
The Interface class is the base class for all INDI connection plugins.
PropertySwitch ConfigProcessSP
static std::list< DefaultDevicePrivate * > devices
static std::recursive_mutex devicesLock
Connection::Interface * activeConnection
WatchDeviceProperty watchDevice
std::vector< Connection::Interface * > connections
DefaultDevice * defaultDevice
uint32_t pollingPeriod
pollingPeriod Period in milliseconds to call TimerHit(). Default 1000 ms
PropertySwitch ConnectionModeSP
DefaultDevicePrivate(DefaultDevice *defaultDevice)
Class to provide extended functionality for devices in addition to the functionality provided by INDI...
The Timer class provides repetitive and single-shot timers.
Definition: inditimer.h:41
Namespace to encapsulate INDI client, drivers, and mediator classes.