1 /*
2     Tutorial Four
3     Copyright (C) 2010 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 
21 #pragma once
22 
23 /** \file simpleskeleton.h
24     \brief Construct a basic INDI CCD device that demonstrates ability to define properties from a skeleton file.
25     \author Jasem Mutlaq
26 
27     \example simpleskeleton.h
28     A skeleton file is an external XML file with the driver properties already defined. This tutorial illustrates how to create a driver from
29     a skeleton file and parse/process the properties. The skeleton file name is tutorial_four_sk.xml
30     \note Please note that if you create your own skeleton file, you must append _sk postfix to your skeleton file name.
31 */
32 
33 #include "defaultdevice.h"
34 
35 class SimpleSkeleton : public INDI::DefaultDevice
36 {
37 public:
38     SimpleSkeleton() = default;
39     ~SimpleSkeleton() = default;
40 
41 protected:
42     void ISGetProperties(const char *dev) override;
43     bool ISNewNumber(const char *dev, const char *name, double values[], char *names[], int n) override;
44     bool ISNewText(const char *dev, const char *name, char *texts[], char *names[], int n) override;
45     bool ISNewSwitch(const char *dev, const char *name, ISState *states, char *names[], int n) override;
46     bool ISNewBLOB(const char *dev, const char *name, int sizes[], int blobsizes[], char *blobs[],
47                            char *formats[], char *names[], int n) override;
48 
49     const char *getDefaultName() override;
50     bool initProperties() override;
51     bool Connect() override;
52     bool Disconnect() override;
53 };
54