ISD::GenericDevice

Search for usage in LXR

#include <indistd.h>

Inheritance diagram for ISD::GenericDevice:

Properties

bool connected
 
uint32_t driverInterface
 
QString driverVersion
 
QString name
 
- Properties inherited from QObject
 objectName
 

Signals

void Connected ()
 
void Disconnected ()
 
void interfaceDefined ()
 
void messageUpdated (int messageID)
 
void newAdaptiveOptics (AdaptiveOptics *device)
 
void newAuxiliary (Auxiliary *device)
 
void newCamera (Camera *device)
 
void newCorrelator (Correlator *device)
 
void newDetector (Detector *device)
 
void newDome (Dome *device)
 
void newDustCap (DustCap *device)
 
void newFilterWheel (FilterWheel *device)
 
void newFocuser (Focuser *device)
 
void newGPS (GPS *device)
 
void newGuider (Guider *device)
 
void newLightBox (LightBox *device)
 
void newMount (Mount *device)
 
void newRotator (Rotator *device)
 
void newSpectrograph (Spectrograph *device)
 
void newWeather (Weather *device)
 
void propertyDefined (INDI::Property prop)
 
void propertyDeleted (INDI::Property prop)
 
void propertyUpdated (INDI::Property prop)
 
void ready ()
 
void systemPortDetected ()
 

Public Member Functions

 GenericDevice (DeviceInfo &idv, ClientManager *cm, QObject *parent=nullptr)
 
Q_SCRIPTABLE Q_NOREPLY void Connect ()
 
Q_SCRIPTABLE Q_NOREPLY void Disconnect ()
 
bool findConcreteDevice (uint32_t interface, QSharedPointer< ConcreteDevice > &device)
 
ISD::AdaptiveOpticsgetAdaptiveOptics ()
 
ISD::AuxiliarygetAuxiliary ()
 
virtual INDI::BaseDevice getBaseDevice () const
 
ISD::CameragetCamera ()
 
ClientManagergetClientManager () const
 
ISD::CorrelatorgetCorrelator ()
 
ISD::DetectorgetDetector ()
 
virtual DeviceInfogetDeviceInfo () const
 
virtual const QStringgetDeviceName () const
 
ISD::DomegetDome ()
 
virtual const QSharedPointer< DriverInfo > & getDriverInfo () const
 
virtual uint32_t getDriverInterface ()
 
virtual QString getDriverVersion ()
 
ISD::DustCapgetDustCap ()
 
ISD::FilterWheel * getFilterWheel ()
 
ISD::FocusergetFocuser ()
 
ISD::GPS * getGPS ()
 
ISD::Guider * getGuider ()
 
virtual bool getJSONBLOB (const QString &propName, const QString &elementName, QJsonObject &blobObject)
 
virtual bool getJSONProperty (const QString &propName, QJsonObject &propObject, bool compact)
 
ISD::LightBoxgetLightBox ()
 
virtual bool getMinMaxStep (const QString &propName, const QString &elementName, double *min, double *max, double *step)
 
ISD::MountgetMount ()
 
virtual IPerm getPermission (const QString &propName)
 
virtual Properties getProperties ()
 
virtual INDI::Property getProperty (const QString &propName)
 
ISD::RotatorgetRotator ()
 
ISD::SpectrographgetSpectrograph ()
 
virtual IPState getState (const QString &propName)
 
ISD::WeathergetWeather ()
 
virtual bool isConnected () const
 
virtual bool isReady () const
 
virtual bool processBLOB (INDI::Property prop) override
 
virtual void processLight (INDI::Property prop) override
 
virtual void processMessage (int messageID) override
 
virtual void processNumber (INDI::Property prop) override
 
virtual void processSwitch (INDI::Property prop) override
 
virtual void processText (INDI::Property prop) override
 
virtual void registerProperty (INDI::Property prop) override
 
virtual void removeProperty (INDI::Property prop) override
 
void sendNewNumber (INDI::Property prop)
 
void sendNewProperty (INDI::Property prop)
 
void sendNewSwitch (INDI::Property prop)
 
void sendNewText (INDI::Property prop)
 
virtual bool setConfig (INDIConfig tConfig)
 
virtual bool setJSONProperty (const QString &propName, const QJsonArray &propElements)
 
bool setProperty (QObject *)
 
virtual void updateProperty (INDI::Property prop) override
 
- Public Member Functions inherited from ISD::GDInterface
 GDInterface (QObject *parent)
 
- Public Member Functions inherited from QObject
 QObject (QObject *parent)
 
QBindable< QStringbindableObjectName ()
 
bool blockSignals (bool block)
 
const QObjectListchildren () const const
 
QMetaObject::Connection connect (const QObject *sender, const char *signal, const char *method, Qt::ConnectionType type) const const
 
void deleteLater ()
 
void destroyed (QObject *obj)
 
bool disconnect (const char *signal, const QObject *receiver, const char *method) const const
 
bool disconnect (const QObject *receiver, const char *method) const const
 
void dumpObjectInfo () const const
 
void dumpObjectTree () const const
 
QList< QByteArraydynamicPropertyNames () const const
 
virtual bool event (QEvent *e)
 
virtual bool eventFilter (QObject *watched, QEvent *event)
 
findChild (const QString &name, Qt::FindChildOptions options) const const
 
QList< T > findChildren (const QRegularExpression &re, Qt::FindChildOptions options) const const
 
QList< T > findChildren (const QString &name, Qt::FindChildOptions options) const const
 
QList< T > findChildren (Qt::FindChildOptions options) const const
 
bool inherits (const char *className) const const
 
void installEventFilter (QObject *filterObj)
 
bool isQuickItemType () const const
 
bool isWidgetType () const const
 
bool isWindowType () const const
 
void killTimer (int id)
 
virtual const QMetaObjectmetaObject () const const
 
void moveToThread (QThread *targetThread)
 
QString objectName () const const
 
void objectNameChanged (const QString &objectName)
 
QObjectparent () const const
 
QVariant property (const char *name) const const
 
 Q_CLASSINFO (Name, Value)
 
 Q_EMIT Q_EMIT
 
 Q_ENUM (...)
 
 Q_ENUM_NS (...)
 
 Q_ENUMS (...)
 
 Q_FLAG (...)
 
 Q_FLAG_NS (...)
 
 Q_FLAGS (...)
 
 Q_GADGET Q_GADGET
 
 Q_GADGET_EXPORT (EXPORT_MACRO)
 
 Q_INTERFACES (...)
 
 Q_INVOKABLE Q_INVOKABLE
 
 Q_MOC_INCLUDE Q_MOC_INCLUDE
 
 Q_NAMESPACE Q_NAMESPACE
 
 Q_NAMESPACE_EXPORT (EXPORT_MACRO)
 
 Q_OBJECT Q_OBJECT
 
 Q_PROPERTY (...)
 
 Q_REVISION Q_REVISION
 
 Q_SET_OBJECT_NAME (Object)
 
 Q_SIGNAL Q_SIGNAL
 
 Q_SIGNALS Q_SIGNALS
 
 Q_SLOT Q_SLOT
 
 Q_SLOTS Q_SLOTS
 
qobject_cast (const QObject *object)
 
qobject_cast (QObject *object)
 
 QT_NO_NARROWING_CONVERSIONS_IN_CONNECT QT_NO_NARROWING_CONVERSIONS_IN_CONNECT
 
void removeEventFilter (QObject *obj)
 
void setObjectName (const QString &name)
 
void setObjectName (QAnyStringView name)
 
void setParent (QObject *parent)
 
bool setProperty (const char *name, const QVariant &value)
 
bool setProperty (const char *name, QVariant &&value)
 
bool signalsBlocked () const const
 
int startTimer (int interval, Qt::TimerType timerType)
 
int startTimer (std::chrono::milliseconds interval, Qt::TimerType timerType)
 
QThreadthread () const const
 

Protected Slots

virtual void resetWatchdog ()
 

Protected Member Functions

void checkLocationUpdate ()
 
void checkTimeUpdate ()
 
void createDeviceInit ()
 
bool generateDevices ()
 
void handleTimeout ()
 
void updateLocation (double longitude=-1, double latitude=-1, double elevation=-1)
 
void updateTime (const QString &iso8601=QString(), const QString &utcOffset=QString())
 
- Protected Member Functions inherited from QObject
virtual void childEvent (QChildEvent *event)
 
virtual void connectNotify (const QMetaMethod &signal)
 
virtual void customEvent (QEvent *event)
 
virtual void disconnectNotify (const QMetaMethod &signal)
 
bool isSignalConnected (const QMetaMethod &signal) const const
 
int receivers (const char *signal) const const
 
QObjectsender () const const
 
int senderSignalIndex () const const
 
virtual void timerEvent (QTimerEvent *event)
 

Protected Attributes

QMap< uint32_t, QSharedPointer< ConcreteDevice > > m_ConcreteDevices
 
uint32_t m_DriverInterface { 0 }
 
QString m_DriverVersion
 

Additional Inherited Members

- Public Types inherited from QObject
typedef  QObjectList
 
- Static Public Member Functions inherited from QObject
QMetaObject::Connection connect (const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
 
QMetaObject::Connection connect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method, Qt::ConnectionType type)
 
QMetaObject::Connection connect (const QObject *sender, PointerToMemberFunction signal, const QObject *context, Functor functor, Qt::ConnectionType type)
 
QMetaObject::Connection connect (const QObject *sender, PointerToMemberFunction signal, const QObject *receiver, PointerToMemberFunction method, Qt::ConnectionType type)
 
QMetaObject::Connection connect (const QObject *sender, PointerToMemberFunction signal, Functor functor)
 
bool disconnect (const QMetaObject::Connection &connection)
 
bool disconnect (const QObject *sender, const char *signal, const QObject *receiver, const char *method)
 
bool disconnect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method)
 
bool disconnect (const QObject *sender, PointerToMemberFunction signal, const QObject *receiver, PointerToMemberFunction method)
 
QString tr (const char *sourceText, const char *disambiguation, int n)
 

Detailed Description

GenericDevice is the Generic Device for INDI devices.

When a new INDI device is created in INDIListener, it gets created as a GenericDevice initially. If the device registers a standard property that is a key property to a device type family (e.g. Number property EQUATORIAL_EOD_COORD signifies a Telescope device), then the specialized version of the device is extended via the Decorator Pattern.

GenericDevice handles common functions shared across many devices such as time and location handling, configuration processing, retrieving information about properties, driver info..etc.

Author
Jasem Mutlaq

Definition at line 116 of file indistd.h.

Property Documentation

◆ connected

bool ISD::GenericDevice::connected
read

Definition at line 123 of file indistd.h.

◆ driverInterface

uint32_t ISD::GenericDevice::driverInterface
read

Definition at line 121 of file indistd.h.

◆ driverVersion

QString ISD::GenericDevice::driverVersion
read

Definition at line 122 of file indistd.h.

◆ name

QString ISD::GenericDevice::name
read

Definition at line 120 of file indistd.h.

Constructor & Destructor Documentation

◆ GenericDevice()

ISD::GenericDevice::GenericDevice ( DeviceInfo & idv,
ClientManager * cm,
QObject * parent = nullptr )
explicit

Definition at line 54 of file indistd.cpp.

◆ ~GenericDevice()

ISD::GenericDevice::~GenericDevice ( )
overridevirtual

Definition at line 108 of file indistd.cpp.

Member Function Documentation

◆ checkLocationUpdate()

void ISD::GenericDevice::checkLocationUpdate ( )
protected

Definition at line 140 of file indistd.cpp.

◆ checkTimeUpdate()

void ISD::GenericDevice::checkTimeUpdate ( )
protected

Definition at line 127 of file indistd.cpp.

◆ Connect()

void ISD::GenericDevice::Connect ( )

Definition at line 804 of file indistd.cpp.

◆ createDeviceInit()

void ISD::GenericDevice::createDeviceInit ( )
protected

Definition at line 703 of file indistd.cpp.

◆ Disconnect()

void ISD::GenericDevice::Disconnect ( )

Definition at line 809 of file indistd.cpp.

◆ findConcreteDevice()

bool ISD::GenericDevice::findConcreteDevice ( uint32_t interface,
QSharedPointer< ConcreteDevice > & device )

Definition at line 1062 of file indistd.cpp.

◆ generateDevices()

bool ISD::GenericDevice::generateDevices ( )
protected

generateDevices Generate concrete devices based on DRIVER_INTERFACE

Returns
True if at least one device is generated, false otherwise.

Definition at line 1184 of file indistd.cpp.

◆ getAdaptiveOptics()

ISD::AdaptiveOptics * ISD::GenericDevice::getAdaptiveOptics ( )

Definition at line 1128 of file indistd.cpp.

◆ getAuxiliary()

ISD::Auxiliary * ISD::GenericDevice::getAuxiliary ( )

Definition at line 1177 of file indistd.cpp.

◆ getBaseDevice()

virtual INDI::BaseDevice ISD::GenericDevice::getBaseDevice ( ) const
inlinevirtual

Definition at line 178 of file indistd.h.

◆ getCamera()

ISD::Camera * ISD::GenericDevice::getCamera ( )

Definition at line 1079 of file indistd.cpp.

◆ getClientManager()

ClientManager * ISD::GenericDevice::getClientManager ( ) const
inline

Definition at line 182 of file indistd.h.

◆ getCorrelator()

ISD::Correlator * ISD::GenericDevice::getCorrelator ( )

Definition at line 1170 of file indistd.cpp.

◆ getDetector()

ISD::Detector * ISD::GenericDevice::getDetector ( )

Definition at line 1149 of file indistd.cpp.

◆ getDeviceInfo()

virtual DeviceInfo * ISD::GenericDevice::getDeviceInfo ( ) const
inlinevirtual

Definition at line 152 of file indistd.h.

◆ getDeviceName()

const QString & ISD::GenericDevice::getDeviceName ( ) const
virtual

Definition at line 166 of file indistd.cpp.

◆ getDome()

ISD::Dome * ISD::GenericDevice::getDome ( )

Definition at line 1107 of file indistd.cpp.

◆ getDriverInfo()

virtual const QSharedPointer< DriverInfo > & ISD::GenericDevice::getDriverInfo ( ) const
inlinevirtual

Definition at line 148 of file indistd.h.

◆ getDriverInterface()

virtual uint32_t ISD::GenericDevice::getDriverInterface ( )
inlinevirtual

Definition at line 160 of file indistd.h.

◆ getDriverVersion()

virtual QString ISD::GenericDevice::getDriverVersion ( )
inlinevirtual

Definition at line 164 of file indistd.h.

◆ getDustCap()

ISD::DustCap * ISD::GenericDevice::getDustCap ( )

Definition at line 1135 of file indistd.cpp.

◆ getFilterWheel()

ISD::FilterWheel * ISD::GenericDevice::getFilterWheel ( )

Definition at line 1100 of file indistd.cpp.

◆ getFocuser()

ISD::Focuser * ISD::GenericDevice::getFocuser ( )

Definition at line 1093 of file indistd.cpp.

◆ getGPS()

ISD::GPS * ISD::GenericDevice::getGPS ( )

Definition at line 1114 of file indistd.cpp.

◆ getGuider()

ISD::Guider * ISD::GenericDevice::getGuider ( )

Definition at line 1086 of file indistd.cpp.

◆ getJSONBLOB()

bool ISD::GenericDevice::getJSONBLOB ( const QString & propName,
const QString & elementName,
QJsonObject & blobObject )
virtual

Definition at line 1031 of file indistd.cpp.

◆ getJSONProperty()

bool ISD::GenericDevice::getJSONProperty ( const QString & propName,
QJsonObject & propObject,
bool compact )
virtual

Definition at line 994 of file indistd.cpp.

◆ getLightBox()

ISD::LightBox * ISD::GenericDevice::getLightBox ( )

Definition at line 1142 of file indistd.cpp.

◆ getMinMaxStep()

bool ISD::GenericDevice::getMinMaxStep ( const QString & propName,
const QString & elementName,
double * min,
double * max,
double * step )
virtual

Definition at line 881 of file indistd.cpp.

◆ getMount()

ISD::Mount * ISD::GenericDevice::getMount ( )

Definition at line 1072 of file indistd.cpp.

◆ getPermission()

IPerm ISD::GenericDevice::getPermission ( const QString & propName)
virtual

Definition at line 906 of file indistd.cpp.

◆ getProperties()

virtual Properties ISD::GenericDevice::getProperties ( )
inlinevirtual

Definition at line 156 of file indistd.h.

◆ getProperty()

INDI::Property ISD::GenericDevice::getProperty ( const QString & propName)
virtual

Definition at line 911 of file indistd.cpp.

◆ getRotator()

ISD::Rotator * ISD::GenericDevice::getRotator ( )

Definition at line 1156 of file indistd.cpp.

◆ getSpectrograph()

ISD::Spectrograph * ISD::GenericDevice::getSpectrograph ( )

Definition at line 1163 of file indistd.cpp.

◆ getState()

IPState ISD::GenericDevice::getState ( const QString & propName)
virtual

Definition at line 901 of file indistd.cpp.

◆ getWeather()

ISD::Weather * ISD::GenericDevice::getWeather ( )

Definition at line 1121 of file indistd.cpp.

◆ handleTimeout()

void ISD::GenericDevice::handleTimeout ( )
protected

Definition at line 114 of file indistd.cpp.

◆ isConnected()

virtual bool ISD::GenericDevice::isConnected ( ) const
inlinevirtual

Definition at line 170 of file indistd.h.

◆ isReady()

virtual bool ISD::GenericDevice::isReady ( ) const
inlinevirtual

Definition at line 174 of file indistd.h.

◆ processBLOB()

bool ISD::GenericDevice::processBLOB ( INDI::Property prop)
overridevirtual

processBLOB Process Binary BLOB

Parameters
bppointer to binary blob.
Returns
Return true of BLOB was successfully processed. If a concrete device does not process the blob, it should return false to allow sibling or parent devices to process the blob.

Implements ISD::GDInterface.

Definition at line 551 of file indistd.cpp.

◆ processLight()

void ISD::GenericDevice::processLight ( INDI::Property prop)
overridevirtual

Implements ISD::GDInterface.

Definition at line 541 of file indistd.cpp.

◆ processMessage()

void ISD::GenericDevice::processMessage ( int messageID)
overridevirtual

Implements ISD::GDInterface.

Definition at line 546 of file indistd.cpp.

◆ processNumber()

void ISD::GenericDevice::processNumber ( INDI::Property prop)
overridevirtual

Implements ISD::GDInterface.

Definition at line 355 of file indistd.cpp.

◆ processSwitch()

void ISD::GenericDevice::processSwitch ( INDI::Property prop)
overridevirtual

Implements ISD::GDInterface.

Definition at line 311 of file indistd.cpp.

◆ processText()

void ISD::GenericDevice::processText ( INDI::Property prop)
overridevirtual

Implements ISD::GDInterface.

Definition at line 453 of file indistd.cpp.

◆ registerProperty()

void ISD::GenericDevice::registerProperty ( INDI::Property prop)
overridevirtual

Implements ISD::GDInterface.

Definition at line 171 of file indistd.cpp.

◆ removeProperty()

void ISD::GenericDevice::removeProperty ( INDI::Property prop)
overridevirtual

Implements ISD::GDInterface.

Definition at line 306 of file indistd.cpp.

◆ resetWatchdog

void ISD::GenericDevice::resetWatchdog ( )
protectedvirtualslot

Definition at line 1053 of file indistd.cpp.

◆ sendNewNumber()

void ISD::GenericDevice::sendNewNumber ( INDI::Property prop)

Send new Number command to server.

◆ sendNewProperty()

void ISD::GenericDevice::sendNewProperty ( INDI::Property prop)

Definition at line 1639 of file indistd.cpp.

◆ sendNewSwitch()

void ISD::GenericDevice::sendNewSwitch ( INDI::Property prop)

Send new Switch command to server.

◆ sendNewText()

void ISD::GenericDevice::sendNewText ( INDI::Property prop)

Send new Text command to server.

◆ setConfig()

bool ISD::GenericDevice::setConfig ( INDIConfig tConfig)
virtual

Definition at line 661 of file indistd.cpp.

◆ setJSONProperty()

bool ISD::GenericDevice::setJSONProperty ( const QString & propName,
const QJsonArray & propElements )
virtual

Definition at line 916 of file indistd.cpp.

◆ setProperty()

bool ISD::GenericDevice::setProperty ( QObject * setPropCommand)

Definition at line 814 of file indistd.cpp.

◆ updateLocation()

void ISD::GenericDevice::updateLocation ( double longitude = -1,
double latitude = -1,
double elevation = -1 )
protected

Definition at line 752 of file indistd.cpp.

◆ updateProperty()

void ISD::GenericDevice::updateProperty ( INDI::Property prop)
overridevirtual

Implements ISD::GDInterface.

Definition at line 282 of file indistd.cpp.

◆ updateTime()

void ISD::GenericDevice::updateTime ( const QString & iso8601 = QString(),
const QString & utcOffset = QString() )
protected

Definition at line 714 of file indistd.cpp.

Member Data Documentation

◆ m_ConcreteDevices

QMap<uint32_t, QSharedPointer<ConcreteDevice> > ISD::GenericDevice::m_ConcreteDevices
protected

Definition at line 246 of file indistd.h.

◆ m_DriverInterface

uint32_t ISD::GenericDevice::m_DriverInterface { 0 }
protected

Definition at line 244 of file indistd.h.

◆ m_DriverVersion

QString ISD::GenericDevice::m_DriverVersion
protected

Definition at line 245 of file indistd.h.


The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 4 2024 16:38:45 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.