/usr/include/libindi/indidustcapinterface.h is in libindi-dev 1.2.0-3.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 | /*
Dust Cap Interface
Copyright (C) 2015 Jasem Mutlaq (mutlaqja@ikarustech.com)
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef INDIDUSTINTERFACE_H
#define INDIDUSTINTERFACE_H
#include "indibase.h"
#include "indiapi.h"
/**
* \class INDI::DustCapInterface
\brief Provides interface to implement remotely controlled dust cover
\e IMPORTANT: initDustCapProperties() must be called before any other function to initilize the Dust Cap properties.
\e IMPORTANT: processDustCapSwitch() must be called in your driver ISNewSwitch function.
\author Jasem Mutlaq
*/
class INDI::DustCapInterface
{
protected:
DustCapInterface();
virtual ~DustCapInterface();
/**
* @brief Park dust cap (close cover). Must be implemented by child.
* @return If command completed immediatly, return IPS_OK. If command is in progress, return IPS_BUSY. If there is an error, return IPS_ALERT
*/
virtual IPState ParkCap();
/**
* @brief unPark dust cap (open cover). Must be implemented by child.
* @return If command completed immediatly, return IPS_OK. If command is in progress, return IPS_BUSY. If there is an error, return IPS_ALERT
*/
virtual IPState UnParkCap();
/** \brief Initilize dust cap properties. It is recommended to call this function within initProperties() of your primary device
\param deviceName Name of the primary device
\param groupName Group or tab name to be used to define focuser properties.
*/
void initDustCapProperties(const char *deviceName, const char* groupName);
/** \brief Process dust cap switch properties */
bool processDustCapSwitch (const char *dev, const char *name, ISState *states, char *names[], int n);
// Open/Close cover
ISwitchVectorProperty ParkCapSP;
ISwitch ParkCapS[2];
private:
char dustCapName[MAXINDIDEVICE];
};
#endif // INDIDUSTCAPINTERFACE_H
|