12#include <KLocalizedString>
14#include "indiconcretedevice.h"
24class Dome :
public ConcreteDevice
27 Q_CLASSINFO(
"D-Bus Interface",
"org.kde.kstars.INDI.Dome")
29 Q_PROPERTY(
bool canAbsoluteMove READ canAbsoluteMove)
30 Q_PROPERTY(
bool canRelativeMove READ canRelativeMove)
33 Q_PROPERTY(ISD::Dome::Status status READ status NOTIFY newStatus)
34 Q_PROPERTY(ISD::Dome::ShutterStatus shutterStatus READ shutterStatus NOTIFY newShutterStatus)
35 Q_PROPERTY(ISD::ParkStatus parkStatus READ parkStatus NOTIFY newParkStatus)
44 return m_Parent->getDeviceName();
49 return m_Parent->isConnected();
87 void processSwitch(INDI::Property prop)
override;
88 void processNumber(INDI::Property prop)
override;
89 void registerProperty(INDI::Property prop)
override;
91 Q_SCRIPTABLE
bool canPark()
const
95 Q_SCRIPTABLE
bool canAbsoluteMove()
const
99 Q_SCRIPTABLE
bool canRelativeMove()
const
103 Q_SCRIPTABLE
bool canAbort()
const
107 Q_SCRIPTABLE
bool isParked()
const
109 return m_ParkStatus == PARK_PARKED;
111 bool isMoving()
const;
116 Q_SCRIPTABLE
double position()
const;
124 bool setRelativePosition(
double position);
126 bool moveDome(DomeDirection dir, DomeMotionCommand operation);
134 return moveDome(DOME_CW, MOTION_START);
143 return moveDome(DOME_CCW, MOTION_START);
146 Q_SCRIPTABLE
bool hasShutter()
const
157 return (canAbsoluteMove() ==
false && canRelativeMove() ==
false);
162 bool setAutoSync(
bool activate);
164 Status status()
const
168 ISD::ParkStatus parkStatus()
const
172 static const QString getStatusString (Status status,
bool translated =
true);
174 ShutterStatus shutterStatus();
175 ShutterStatus parseShutterStatus(INDI::Property prop);
177 Q_SCRIPTABLE
bool abort();
178 Q_SCRIPTABLE
bool park();
179 Q_SCRIPTABLE
bool unpark();
181 Q_SCRIPTABLE
bool controlShutter(
bool open);
184 return controlShutter(
true);
188 return controlShutter(
false);
228 void newStatus(ISD::Dome::Status status);
229 void newParkStatus(ISD::ParkStatus status);
230 void newShutterStatus(ISD::Dome::ShutterStatus status);
231 void newAutoSyncStatus(
bool enabled);
232 void positionChanged(
double degrees);
235 ParkStatus m_ParkStatus { PARK_UNKNOWN };
236 ShutterStatus m_ShutterStatus { SHUTTER_UNKNOWN };
237 Status m_Status { DOME_IDLE };
238 bool m_CanAbsMove {
false };
239 bool m_CanRelMove {
false };
240 bool m_CanPark {
false };
241 bool m_CanAbort {
false };
242 bool m_HasShutter {
false };
243 static const QList<KLocalizedString> domeStates;
247Q_DECLARE_METATYPE(ISD::Dome::Status)
251Q_DECLARE_METATYPE(ISD::Dome::ShutterStatus)
bool isRolloffRoof()
isRolloffRoof Do we have a roll off structure?
double getNorthDisplacement() const
getNorthDisplacement Get the north displacement in meters
double getDomeRadius() const
getDomeRadius Get the dome radius in meters
Q_SCRIPTABLE bool setPosition(double position)
setPosition Set azimuth absolute position.
double getOTAOffset() const
getOTAOffset Get the OTA offset in meters
Q_SCRIPTABLE bool moveCW()
DBus Interface Function.
double getShutterWidth() const
getShutterWidth Get the shutter width in meters
double getEastDisplacement() const
getEastDisplacement Get the east displacement in meters
double getUpDisplacement() const
getUpDisplacement Get the up displacement in meters
Q_SCRIPTABLE bool moveCCW()
DBus Interface Function.
GenericDevice is the Generic Device for INDI devices.
ISD is a collection of INDI Standard Devices.
QObject * parent() const const