• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdeedu API Reference
  • KDE Home
  • Contact Us
 

kstars

  • sources
  • kde-4.12
  • kdeedu
  • kstars
  • kstars
  • indi
indistd.cpp
Go to the documentation of this file.
1 /* INDI STD
2  Copyright (C) 2012 Jasem Mutlaq (mutlaqja@ikarustech.com)
3 
4  This application is free software; you can redistribute it and/or
5  modify it under the terms of the GNU General Public
6  License as published by the Free Software Foundation; either
7  version 2 of the License, or (at your option) any later version.
8 
9  Handle INDI Standard properties.
10  */
11 
12 #include <basedevice.h>
13 
14 #include <QDebug>
15 
16 #include <KMessageBox>
17 #include <KStatusBar>
18 
19 #include "indistd.h"
20 #include "indicommon.h"
21 #include "clientmanager.h"
22 #include "driverinfo.h"
23 #include "deviceinfo.h"
24 
25 #include "skypoint.h"
26 #include "kstars.h"
27 #include "kstarsdata.h"
28 #include "skymap.h"
29 #include "Options.h"
30 
31 const int MAX_FILENAME_LEN = 1024;
32 
33 namespace ISD
34 {
35 
36 
37 GDSetCommand::GDSetCommand(INDI_TYPE inPropertyType, const QString &inProperty, const QString &inElement, QVariant qValue, QObject *parent) : QObject(parent)
38 {
39  propType = inPropertyType;
40  indiProperty = inProperty;
41  indiElement = inElement;
42  elementValue = qValue;
43 }
44 
45 
46 GenericDevice::GenericDevice(DeviceInfo *idv)
47 {
48  connected = false;
49 
50  Q_ASSERT(idv != NULL);
51 
52  deviceInfo = idv;
53  driverInfo = idv->getDriverInfo();
54  baseDevice = idv->getBaseDevice();
55  clientManager = driverInfo->getClientManager();
56 
57  dType = KSTARS_UNKNOWN;
58 }
59 
60 
61 GenericDevice::~GenericDevice()
62 {
63 
64 }
65 
66 const char * GenericDevice::getDeviceName()
67 {
68  return baseDevice->getDeviceName();
69 }
70 
71 void GenericDevice::registerProperty(INDI::Property *prop)
72 {
73 
74  foreach(INDI::Property *pp, properties)
75  {
76  if (pp == prop)
77  return;
78  }
79 
80  properties.append(prop);
81 
82  emit propertyDefined(prop);
83 
84  if (!strcmp(prop->getName(), "DEVICE_PORT"))
85  {
86  switch (driverInfo->getType())
87  {
88  case KSTARS_TELESCOPE:
89  //qDebug() << "device port for Telescope!!!!!" << endl;
90  if (Options::telescopePort().isEmpty() == false)
91  {
92  IText *tp = IUFindText(prop->getText(), "PORT");
93  if (tp == NULL)
94  return;
95 
96  IUSaveText(tp, Options::telescopePort().toLatin1().constData());
97 
98  clientManager->sendNewText(prop->getText());
99 
100  }
101  break;
102 
103  case KSTARS_FOCUSER:
104  //qDebug() << "device port for CCD!!!!!" << endl;
105  if (Options::focuserPort().isEmpty() == false)
106  {
107  IText *tp = IUFindText(prop->getText(), "PORT");
108  if (tp == NULL)
109  return;
110 
111  IUSaveText(tp, Options::focuserPort().toLatin1().constData());
112 
113  clientManager->sendNewText(prop->getText());
114 
115  }
116  break;
117 
118  case KSTARS_FILTER:
119  //qDebug() << "device port for CCD!!!!!" << endl;
120  if (Options::filterPort().isEmpty() == false)
121  {
122  IText *tp = IUFindText(prop->getText(), "PORT");
123  if (tp == NULL)
124  return;
125 
126  IUSaveText(tp, Options::filterPort().toLatin1().constData());
127 
128  clientManager->sendNewText(prop->getText());
129 
130  }
131  break;
132 
133  case KSTARS_CCD:
134  //qDebug() << "device port for CCD!!!!!" << endl;
135  if (Options::videoPort().isEmpty() == false)
136  {
137  IText *tp = IUFindText(prop->getText(), "PORT");
138  if (tp == NULL)
139  return;
140 
141  IUSaveText(tp, Options::videoPort().toLatin1().constData());
142 
143  clientManager->sendNewText(prop->getText());
144 
145  }
146  break;
147  default:
148  break;
149  }
150 
151  }
152  else if (!strcmp(prop->getName(), "TIME_UTC") && Options::useTimeUpdate() && Options::useComputerSource())
153  {
154  ITextVectorProperty *tvp = prop->getText();
155  if (tvp)
156  updateTime();
157  }
158  else if (!strcmp(prop->getName(), "GEOGRAPHIC_COORD") && Options::useGeographicUpdate() && Options::useComputerSource())
159  {
160  INumberVectorProperty *nvp = baseDevice->getNumber("GEOGRAPHIC_COORD");
161  if (nvp)
162  updateLocation();
163  }
164 }
165 
166 void GenericDevice::removeProperty(INDI::Property *prop)
167 {
168  properties.removeOne(prop);
169 }
170 
171 void GenericDevice::processSwitch(ISwitchVectorProperty * svp)
172 {
173 
174  if (!strcmp(svp->name, "CONNECTION"))
175  {
176  ISwitch *conSP = IUFindSwitch(svp, "CONNECT");
177  if (conSP == NULL)
178  return;
179 
180  if (conSP->s == ISS_ON)
181  {
182  connected = true;
183  emit Connected();
184  createDeviceInit();
185  }
186  else
187  {
188  connected = false;
189  emit Disconnected();
190  }
191  }
192 
193 
194 }
195 
196 void GenericDevice::processNumber(INumberVectorProperty * nvp)
197 {
198  INumber *np=NULL;
199 
200  if (!strcmp(nvp->name, "GEOGRAPHIC_LOCATION"))
201  {
202  // Update KStars Location once we receive update from INDI, if the source is set to DEVICE
203  if (Options::useDeviceSource())
204  {
205  dms lng, lat;
206 
207  np = IUFindNumber(nvp, "LONG");
208  if (!np)
209  return;
210 
211  //sscanf(el->text.toAscii().data(), "%d%*[^0-9]%d%*[^0-9]%d", &d, &min, &sec);
212  lng.setD(np->value);
213 
214  np = IUFindNumber(nvp, "LAT");
215 
216  if (!np)
217  return;
218 
219  //sscanf(el->text.toAscii().data(), "%d%*[^0-9]%d%*[^0-9]%d", &d, &min, &sec);
220  //lat.setD(d,min,sec);
221  lat.setD(np->value);
222 
223  KStars::Instance()->data()->geo()->setLong(lng);
224  KStars::Instance()->data()->geo()->setLat(lat);
225  }
226 
227  }
228 
229 
230 
231 }
232 
233 void GenericDevice::processText(ITextVectorProperty * tvp)
234 {
235 
236  IText *tp=NULL;
237  int d, m, y, min, sec, hour;
238  QDate indiDate;
239  QTime indiTime;
240  KStarsDateTime indiDateTime;
241 
242 
243  if (!strcmp(tvp->name, "TIME_UTC"))
244  {
245 
246  // Update KStars time once we receive update from INDI, if the source is set to DEVICE
247  if (Options::useDeviceSource())
248  {
249  tp = IUFindText(tvp, "UTC");
250 
251  if (!tp)
252  return;
253 
254  sscanf(tp->text, "%d%*[^0-9]%d%*[^0-9]%dT%d%*[^0-9]%d%*[^0-9]%d", &y, &m, &d, &hour, &min, &sec);
255  indiDate.setYMD(y, m, d);
256  indiTime.setHMS(hour, min, sec);
257  indiDateTime.setDate(indiDate);
258  indiDateTime.setTime(indiTime);
259 
260  KStars::Instance()->data()->changeDateTime(indiDateTime);
261  KStars::Instance()->data()->syncLST();
262  }
263 
264  }
265 }
266 
267 void GenericDevice::processLight(ILightVectorProperty * lvp)
268 {
269  INDI_UNUSED(lvp);
270 }
271 
272 void GenericDevice::processBLOB(IBLOB* bp)
273 {
274  QFile *data_file = NULL;
275  INDIDataTypes dataType;
276 
277  if (!strcmp(bp->format, ".ascii"))
278  dataType = DATA_ASCII;
279  else
280  dataType = DATA_OTHER;
281 
282  QString currentDir = Options::fitsDir();
283  int nr, n=0;
284 
285  if (currentDir.endsWith('/'))
286  currentDir.truncate(sizeof(currentDir)-1);
287 
288  QString filename(currentDir + '/');
289 
290  QString ts = QDateTime::currentDateTime().toString("yyyy-MM-ddThh:mm:ss");
291 
292  if (dataType == DATA_ASCII)
293  filename += QString("file_") + ts + bp->format;
294  else
295  filename += QString("file_") + ts + '.' + bp->format;
296 
297  if (dataType == DATA_ASCII)
298  {
299  if (bp->aux0 == NULL)
300  {
301  bp->aux0 = new int();
302  QFile * ascii_data_file = new QFile();
303  ascii_data_file->setFileName(filename);
304  if (!ascii_data_file->open(QIODevice::WriteOnly))
305  {
306  kDebug() << "Error: Unable to open " << ascii_data_file->fileName() << endl;
307  return;
308  }
309 
310  bp->aux1 = ascii_data_file;
311  }
312 
313  data_file = (QFile *) bp->aux1;
314 
315  QDataStream out(data_file);
316  for (nr=0; nr < (int) bp->size; nr += n)
317  n = out.writeRawData( static_cast<char *> (bp->blob) + nr, bp->size - nr);
318 
319  out.writeRawData( (const char *) "\n" , 1);
320  data_file->flush();
321  }
322  else
323  {
324  QFile fits_temp_file(filename);
325  if (!fits_temp_file.open(QIODevice::WriteOnly))
326  {
327  kDebug() << "Error: Unable to open " << fits_temp_file.fileName() << endl;
328  return;
329  }
330 
331  QDataStream out(&fits_temp_file);
332 
333  for (nr=0; nr < (int) bp->size; nr += n)
334  n = out.writeRawData( static_cast<char *> (bp->blob) +nr, bp->size - nr);
335 
336  fits_temp_file.close();
337  }
338 
339  if (dataType == DATA_OTHER)
340  KStars::Instance()->statusBar()->changeItem( i18n("Data file saved to %1", filename ), 0);
341 
342 }
343 
344 bool GenericDevice::setConfig(INDIConfig tConfig)
345 {
346 
347  ISwitchVectorProperty *svp = baseDevice->getSwitch("CONFIG_PROCESS");
348  if (svp == NULL)
349  return false;
350 
351  ISwitch *sp = NULL;
352 
353  IUResetSwitch(svp);
354 
355  switch (tConfig)
356  {
357  case LOAD_LAST_CONFIG:
358  sp = IUFindSwitch(svp, "CONFIG_LOAD");
359  if (sp == NULL)
360  return false;
361 
362  IUResetSwitch(svp);
363  sp->s = ISS_ON;
364  break;
365 
366  case SAVE_CONFIG:
367  sp = IUFindSwitch(svp, "CONFIG_SAVE");
368  if (sp == NULL)
369  return false;
370 
371  IUResetSwitch(svp);
372  sp->s = ISS_ON;
373  break;
374 
375  case LOAD_DEFAULT_CONFIG:
376  sp = IUFindSwitch(svp, "CONFIG_DEFAULT");
377  if (sp == NULL)
378  return false;
379 
380  IUResetSwitch(svp);
381  sp->s = ISS_ON;
382  break;
383 
384  }
385 
386  clientManager->sendNewSwitch(svp);
387 
388  return true;
389 
390 }
391 
392 void GenericDevice::createDeviceInit()
393 {
394 
395  if ( Options::showINDIMessages() )
396  KStars::Instance()->statusBar()->changeItem( i18n("%1 is online.", baseDevice->getDeviceName()), 0);
397 
398  KStars::Instance()->map()->forceUpdateNow();
399 }
400 
401 /*********************************************************************************/
402 /* Update the Driver's Time */
403 /*********************************************************************************/
404 void GenericDevice::updateTime()
405 {
406 
407  QString offset, isoTS;
408 
409  offset = QString().setNum(KStars::Instance()->data()->geo()->TZ(), 'g', 2);
410 
411  QTime newTime( KStars::Instance()->data()->ut().time());
412  QDate newDate( KStars::Instance()->data()->ut().date());
413 
414  isoTS = QString("%1-%2-%3T%4:%5:%6").arg(newDate.year()).arg(newDate.month()).arg(newDate.day()).arg(newTime.hour()).arg(newTime.minute()).arg(newTime.second());
415 
416  /* Update Date/Time */
417  ITextVectorProperty *timeUTC = baseDevice->getText("TIME_UTC");
418 
419  if (timeUTC)
420  {
421 
422  IText *timeEle = IUFindText(timeUTC, "UTC");
423  if (timeEle)
424  IUSaveText(timeEle, isoTS.toLatin1().constData());
425 
426  IText *offsetEle = IUFindText(timeUTC, "OFFSET");
427  if (offsetEle)
428  IUSaveText(offsetEle, offset.toLatin1().constData());
429 
430  if (timeEle && offsetEle)
431  clientManager->sendNewText(timeUTC);
432  }
433 }
434 
435 /*********************************************************************************/
436 /* Update the Driver's Geographical Location */
437 /*********************************************************************************/
438 void GenericDevice::updateLocation()
439 {
440  GeoLocation *geo = KStars::Instance()->data()->geo();
441  double longNP;
442 
443  if (geo->lng()->Degrees() >= 0)
444  longNP = geo->lng()->Degrees();
445  else
446  longNP = dms(geo->lng()->Degrees() + 360.0).Degrees();
447 
448  INumberVectorProperty *nvp = baseDevice->getNumber("GEOGRAPHIC_COORD");
449 
450  if (nvp == NULL)
451  return;
452 
453  INumber *np = IUFindNumber(nvp, "LONG");
454  if (np == NULL)
455  return;
456 
457  np->value = longNP;
458 
459  np = IUFindNumber(nvp, "LAT");
460  if (np == NULL)
461  return;
462 
463  np->value = geo->lat()->Degrees();
464 
465  clientManager->sendNewNumber(nvp);
466 }
467 
468 bool GenericDevice::Connect()
469 {
470  return runCommand(INDI_CONNECT, NULL);
471 }
472 
473 bool GenericDevice::Disconnect()
474 {
475  return runCommand(INDI_DISCONNECT, NULL);
476 }
477 
478 bool GenericDevice::runCommand(int command, void *ptr)
479 {
480  switch (command)
481  {
482  case INDI_CONNECT:
483  clientManager->connectDevice(baseDevice->getDeviceName());
484  break;
485 
486  case INDI_DISCONNECT:
487  clientManager->disconnectDevice(baseDevice->getDeviceName());
488  break;
489 
490  case INDI_SET_PORT:
491  {
492  if (ptr == NULL)
493  return false;
494  ITextVectorProperty *tvp = baseDevice->getText("DEVICE_PORT");
495  if (tvp == NULL)
496  return false;
497 
498  IText *tp = IUFindText(tvp, "PORT");
499 
500  IUSaveText(tp, (static_cast<QString *> (ptr))->toLatin1().constData() );
501 
502  clientManager->sendNewText(tvp);
503  }
504  break;
505 
506  // We do it here because it could be either CCD or FILTER interfaces, so no need to duplicate code
507  case INDI_SET_FILTER:
508  {
509  if (ptr == NULL)
510  return false;
511  INumberVectorProperty *nvp = baseDevice->getNumber("FILTER_SLOT");
512  if (nvp == NULL)
513  return false;
514 
515  int requestedFilter = * ( (int *) ptr);
516 
517  if (requestedFilter == nvp->np[0].value)
518  break;
519 
520  nvp->np[0].value = requestedFilter;
521 
522  clientManager->sendNewNumber(nvp);
523  }
524 
525  break;
526 
527  }
528 
529  return true;
530 }
531 
532 bool GenericDevice::setProperty(QObject * setPropCommand)
533 {
534  GDSetCommand *indiCommand = static_cast<GDSetCommand *> (setPropCommand);
535 
536  //qDebug() << "We are trying to set value for property " << indiCommand->indiProperty << " and element" << indiCommand->indiElement << " and value " << indiCommand->elementValue << endl;
537 
538  INDI::Property *pp= baseDevice->getProperty(indiCommand->indiProperty.toLatin1().constData());
539  if (pp == NULL)
540  return false;
541 
542  switch (indiCommand->propType)
543  {
544  case INDI_SWITCH:
545  {
546  ISwitchVectorProperty *svp = pp->getSwitch();
547  if (svp == NULL)
548  return false;
549 
550  ISwitch *sp = IUFindSwitch(svp, indiCommand->indiElement.toLatin1().constData());
551  if (sp == NULL)
552  return false;
553 
554  if (svp->r == ISR_1OFMANY)
555  IUResetSwitch(svp);
556 
557  sp->s = indiCommand->elementValue.toInt() == 0 ? ISS_OFF : ISS_ON;
558 
559  //qDebug() << "Sending switch " << sp->name << " with status " << ((sp->s == ISS_ON) ? "On" : "Off") << endl;
560  clientManager->sendNewSwitch(svp);
561 
562  return true;
563  }
564  break;
565 
566  case INDI_NUMBER:
567  {
568  INumberVectorProperty *nvp = pp->getNumber();
569  if (nvp == NULL)
570  return false;
571 
572  INumber *np = IUFindNumber(nvp, indiCommand->indiElement.toLatin1().constData());
573  if (np == NULL)
574  return false;
575 
576  double value = indiCommand->elementValue.toDouble();
577 
578  if (value == np->value)
579  return true;
580 
581  np->value = value;
582 
583  //qDebug() << "Sending switch " << sp->name << " with status " << ((sp->s == ISS_ON) ? "On" : "Off") << endl;
584  clientManager->sendNewNumber(nvp);
585  }
586  break;
587  // TODO: Add set property for other types of properties
588  default:
589  break;
590 
591  }
592 
593  return true;
594 }
595 
596 bool GenericDevice::getMinMaxStep(const QString & propName, const QString & elementName, double *min, double *max, double *step)
597 {
598  INumberVectorProperty *nvp = baseDevice->getNumber(propName.toLatin1());
599 
600  if (nvp == NULL)
601  return false;
602 
603  INumber *np = IUFindNumber(nvp, elementName.toLatin1());
604  if (np == NULL)
605  return false;
606 
607  *min = np->min;
608  *max = np->max;
609  *step = np->step;
610 
611  return true;
612 
613 }
614 
615 
616 DeviceDecorator::DeviceDecorator(GDInterface *iPtr)
617 {
618  interfacePtr = iPtr;
619 
620  baseDevice = interfacePtr->getBaseDevice();
621  clientManager = interfacePtr->getDriverInfo()->getClientManager();
622 }
623 
624 DeviceDecorator::~DeviceDecorator()
625 {
626  delete (interfacePtr);
627 }
628 
629 bool DeviceDecorator::runCommand(int command, void *ptr)
630 {
631  return interfacePtr->runCommand(command, ptr);
632 }
633 
634 bool DeviceDecorator::setProperty(QObject *setPropCommand)
635 {
636  return interfacePtr->setProperty(setPropCommand);
637 }
638 
639 void DeviceDecorator::processBLOB(IBLOB *bp)
640 {
641  interfacePtr->processBLOB(bp);
642  emit BLOBUpdated(bp);
643 
644 }
645 
646 void DeviceDecorator::processLight(ILightVectorProperty *lvp)
647 {
648  interfacePtr->processLight(lvp);
649  emit lightUpdated(lvp);
650 
651 }
652 
653 void DeviceDecorator::processNumber(INumberVectorProperty *nvp)
654 {
655  interfacePtr->processNumber(nvp);
656  emit numberUpdated(nvp);
657 }
658 
659 void DeviceDecorator::processSwitch(ISwitchVectorProperty *svp)
660 {
661  interfacePtr->processSwitch(svp);
662  emit switchUpdated(svp);
663 }
664 
665 void DeviceDecorator::processText(ITextVectorProperty *tvp)
666 {
667  interfacePtr->processText(tvp);
668  emit textUpdated(tvp);
669 }
670 
671 void DeviceDecorator::registerProperty(INDI::Property *prop)
672 {
673  interfacePtr->registerProperty(prop);
674 }
675 
676 void DeviceDecorator::removeProperty(INDI::Property *prop)
677 {
678  interfacePtr->removeProperty(prop);
679  emit propertyDeleted(prop);
680 }
681 
682 
683 bool DeviceDecorator::setConfig(INDIConfig tConfig)
684 {
685  return interfacePtr->setConfig(tConfig);
686 }
687 
688 DeviceFamily DeviceDecorator::getType()
689 {
690  return interfacePtr->getType();
691 }
692 
693 DriverInfo * DeviceDecorator::getDriverInfo()
694 {
695  return interfacePtr->getDriverInfo();
696 }
697 
698 DeviceInfo * DeviceDecorator::getDeviceInfo()
699 {
700  return interfacePtr->getDeviceInfo();
701 }
702 
703 const char * DeviceDecorator::getDeviceName()
704 {
705  return interfacePtr->getDeviceName();
706 }
707 
708 INDI::BaseDevice* DeviceDecorator::getBaseDevice()
709 {
710  return interfacePtr->getBaseDevice();
711 }
712 
713 QList<INDI::Property *> DeviceDecorator::getProperties()
714 {
715  return interfacePtr->getProperties();
716 }
717 
718 bool DeviceDecorator::isConnected()
719 {
720  return interfacePtr->isConnected();
721 }
722 
723 bool DeviceDecorator::Connect()
724 {
725  return interfacePtr->Connect();
726 }
727 
728 bool DeviceDecorator::Disconnect()
729 {
730  return interfacePtr->Disconnect();
731 }
732 
733 
734 bool DeviceDecorator::getMinMaxStep(const QString & propName, const QString & elementName, double *min, double *max, double *step)
735 {
736 
737  return interfacePtr->getMinMaxStep(propName, elementName, min, max, step);
738 
739 }
740 
741 
742 ST4::ST4(INDI::BaseDevice *bdv, ClientManager *cm)
743 {
744  baseDevice = bdv;
745  clientManager = cm;
746 }
747 
748 ST4::~ST4() {}
749 
750 const char * ST4::getDeviceName()
751 {
752  return baseDevice->getDeviceName();
753 }
754 
755 bool ST4::doPulse(GuideDirection ra_dir, int ra_msecs, GuideDirection dec_dir, int dec_msecs )
756 {
757  bool raOK=false, decOK=false;
758  raOK = doPulse(ra_dir, ra_msecs);
759  decOK = doPulse(dec_dir, dec_msecs);
760 
761  if (raOK && decOK)
762  return true;
763  else
764  return false;
765 
766 }
767 
768 bool ST4::doPulse(GuideDirection dir, int msecs )
769 {
770  INumberVectorProperty *raPulse = baseDevice->getNumber("TELESCOPE_TIMED_GUIDE_WE");
771  INumberVectorProperty *decPulse = baseDevice->getNumber("TELESCOPE_TIMED_GUIDE_NS");
772  INumberVectorProperty *npulse = NULL;
773  INumber *dirPulse=NULL;
774 
775  if (raPulse == NULL || decPulse == NULL)
776  return false;
777 
778  switch(dir)
779  {
780  case RA_INC_DIR:
781  dirPulse = IUFindNumber(raPulse, "TIMED_GUIDE_W");
782  if (dirPulse == NULL)
783  return false;
784 
785  npulse = raPulse;
786  break;
787 
788  case RA_DEC_DIR:
789  dirPulse = IUFindNumber(raPulse, "TIMED_GUIDE_E");
790  if (dirPulse == NULL)
791  return false;
792 
793  npulse = raPulse;
794  break;
795 
796  case DEC_INC_DIR:
797  dirPulse = IUFindNumber(decPulse, "TIMED_GUIDE_N");
798  if (dirPulse == NULL)
799  return false;
800 
801  npulse = decPulse;
802  break;
803 
804  case DEC_DEC_DIR:
805  dirPulse = IUFindNumber(decPulse, "TIMED_GUIDE_S");
806  if (dirPulse == NULL)
807  return false;
808 
809  npulse = decPulse;
810  break;
811 
812  default:
813  return false;
814 
815  }
816 
817  if (dirPulse == NULL || npulse == NULL)
818  return false;
819 
820  dirPulse->value = msecs;
821 
822  clientManager->sendNewNumber(npulse);
823 
824  //qDebug() << "Sending pulse for " << npulse->name << " in direction " << dirPulse->name << " for " << msecs << " ms " << endl;
825 
826  return true;
827 
828 }
829 
830 }
831 
832 #include "indistd.moc"
ISD::DeviceDecorator::Disconnect
virtual bool Disconnect()
Definition: indistd.cpp:728
ISD::DeviceDecorator::baseDevice
INDI::BaseDevice * baseDevice
Definition: indistd.h:189
LOAD_LAST_CONFIG
Definition: indicommon.h:21
ISD::DeviceDecorator::setProperty
virtual bool setProperty(QObject *)
Definition: indistd.cpp:634
ISD::GDInterface::registerProperty
virtual void registerProperty(INDI::Property *prop)=0
ISD::GenericDevice::updateLocation
void updateLocation()
Definition: indistd.cpp:438
ISD::DeviceDecorator::runCommand
virtual bool runCommand(int command, void *ptr=NULL)
Definition: indistd.cpp:629
Options::filterPort
static QString filterPort()
Get INDI Filter port.
Definition: Options.h:619
KStars::map
SkyMap * map() const
Definition: kstars.h:134
DEC_INC_DIR
Definition: indicommon.h:28
deviceinfo.h
LOAD_DEFAULT_CONFIG
Definition: indicommon.h:21
ISD::GDInterface::runCommand
virtual bool runCommand(int command, void *ptr=NULL)=0
DeviceFamily
DeviceFamily
Definition: indicommon.h:66
ISD::DeviceDecorator::registerProperty
virtual void registerProperty(INDI::Property *prop)
Definition: indistd.cpp:671
Options::useTimeUpdate
static bool useTimeUpdate()
Get Automatically updates time and date?
Definition: Options.h:505
SAVE_CONFIG
Definition: indicommon.h:21
ISD::GDInterface::getBaseDevice
virtual INDI::BaseDevice * getBaseDevice()=0
ISD::GDInterface::setConfig
virtual bool setConfig(INDIConfig tConfig)=0
ISD::DeviceDecorator::setConfig
virtual bool setConfig(INDIConfig tConfig)
Definition: indistd.cpp:683
ISD::GenericDevice::getDeviceName
virtual const char * getDeviceName()
Definition: indistd.cpp:66
ISD::DeviceDecorator::processNumber
virtual void processNumber(INumberVectorProperty *nvp)
Definition: indistd.cpp:653
ISD::GDInterface::getMinMaxStep
virtual bool getMinMaxStep(const QString &propName, const QString &elementName, double *min, double *max, double *step)=0
dms::Degrees
const double & Degrees() const
Definition: dms.h:98
ISD::GenericDevice::~GenericDevice
~GenericDevice()
Definition: indistd.cpp:61
GeoLocation::lng
const dms * lng() const
Definition: geolocation.h:76
KSTARS_UNKNOWN
Definition: indicommon.h:66
ISD::GDInterface::getDeviceName
virtual const char * getDeviceName()=0
ISD::GenericDevice::processLight
virtual void processLight(ILightVectorProperty *lvp)
Definition: indistd.cpp:267
ISD::GDInterface::processLight
virtual void processLight(ILightVectorProperty *lvp)=0
ISD::GDInterface::processNumber
virtual void processNumber(INumberVectorProperty *nvp)=0
KStars::Instance
static KStars * Instance()
Definition: kstars.h:125
GuideDirection
GuideDirection
Definition: indicommon.h:23
Options::showINDIMessages
static bool showINDIMessages()
Get Display INDI messages in the statusbar?
Definition: Options.h:543
DATA_ASCII
Definition: indicommon.h:19
ISD::GDSetCommand
Definition: indistd.h:34
ISD::GenericDevice::setConfig
virtual bool setConfig(INDIConfig tConfig)
Definition: indistd.cpp:344
KStarsDateTime::setDate
void setDate(const QDate &d)
Assign the Date according to a QDate object.
Definition: kstarsdatetime.cpp:119
ISD::GDInterface::processText
virtual void processText(ITextVectorProperty *tvp)=0
INDIDataTypes
INDIDataTypes
Definition: indicommon.h:19
ISD::DeviceDecorator::getDeviceName
const char * getDeviceName()
Definition: indistd.cpp:703
clientmanager.h
KStarsData::geo
GeoLocation * geo()
Definition: kstarsdata.h:164
QObject
ISD::DeviceDecorator::processSwitch
virtual void processSwitch(ISwitchVectorProperty *svp)
Definition: indistd.cpp:659
DeviceInfo::getBaseDevice
INDI::BaseDevice * getBaseDevice()
Definition: deviceinfo.h:24
KSTARS_FOCUSER
Definition: indicommon.h:66
ISD::GenericDevice::processNumber
virtual void processNumber(INumberVectorProperty *nvp)
Definition: indistd.cpp:196
ISD::GDInterface::numberUpdated
void numberUpdated(INumberVectorProperty *nvp)
ISD::GDInterface::removeProperty
virtual void removeProperty(INDI::Property *prop)=0
KStarsDateTime::setTime
void setTime(const QTime &t)
Assign the Time according to a QTime object.
Definition: kstarsdatetime.cpp:133
GeoLocation::setLat
void setLat(dms l)
Set latitude according to dms argument.
Definition: geolocation.h:136
INDI_SET_PORT
Definition: indicommon.h:72
ISD::GDInterface::lightUpdated
void lightUpdated(ILightVectorProperty *lvp)
DATA_OTHER
Definition: indicommon.h:19
ISD::GenericDevice::processText
virtual void processText(ITextVectorProperty *tvp)
Definition: indistd.cpp:233
ISD::GenericDevice::createDeviceInit
void createDeviceInit()
Definition: indistd.cpp:392
ISD::GDInterface::Connect
virtual bool Connect()=0
INDI_CONNECT
Definition: indicommon.h:72
ISD::GDInterface::Disconnected
void Disconnected()
ISD::DeviceDecorator::~DeviceDecorator
~DeviceDecorator()
Definition: indistd.cpp:624
ISD::GenericDevice::setProperty
virtual bool setProperty(QObject *)
Definition: indistd.cpp:532
DriverInfo::getClientManager
ClientManager * getClientManager()
Definition: driverinfo.h:61
GeoLocation::setLong
void setLong(dms l)
Set longitude according to dms argument.
Definition: geolocation.h:128
driverinfo.h
ISD::DeviceDecorator::getDriverInfo
DriverInfo * getDriverInfo()
Definition: indistd.cpp:693
Options::videoPort
static QString videoPort()
Get INDI Video port.
Definition: Options.h:638
KStarsData::changeDateTime
void changeDateTime(const KStarsDateTime &newDate)
change the current simulation date/time to the KStarsDateTime argument.
Definition: kstarsdata.cpp:272
DeviceInfo::getDriverInfo
DriverInfo * getDriverInfo()
Definition: deviceinfo.h:23
ISD::GenericDevice::processBLOB
virtual void processBLOB(IBLOB *bp)
Definition: indistd.cpp:272
GeoLocation
Contains all relevant information for specifying a location on Earth: City Name, State/Province name...
Definition: geolocation.h:39
DEC_DEC_DIR
Definition: indicommon.h:29
ISD::GenericDevice::GenericDevice
GenericDevice(DeviceInfo *idv)
Definition: indistd.cpp:46
ISD::GDInterface::isConnected
virtual bool isConnected()=0
ISD::GDSetCommand::propType
INDI_TYPE propType
Definition: indistd.h:41
ISD::GDInterface::switchUpdated
void switchUpdated(ISwitchVectorProperty *svp)
Options::fitsDir
static QString fitsDir()
Get FITS Default directory.
Definition: Options.h:695
ISD::DeviceDecorator::getMinMaxStep
bool getMinMaxStep(const QString &propName, const QString &elementName, double *min, double *max, double *step)
Definition: indistd.cpp:734
ISD::DeviceDecorator::getDeviceInfo
DeviceInfo * getDeviceInfo()
Definition: indistd.cpp:698
ISD::DeviceDecorator::processBLOB
virtual void processBLOB(IBLOB *bp)
Definition: indistd.cpp:639
skymap.h
ISD::DeviceDecorator::processText
virtual void processText(ITextVectorProperty *tvp)
Definition: indistd.cpp:665
ISD::GDInterface::propertyDeleted
void propertyDeleted(INDI::Property *prop)
RA_INC_DIR
Definition: indicommon.h:26
Options::useDeviceSource
static bool useDeviceSource()
Get Use device time and location for synchronization?
Definition: Options.h:676
KStarsDateTime
Extension of KDateTime for KStars KStarsDateTime can represent the date/time as a Julian Day...
Definition: kstarsdatetime.h:45
ISD::DeviceDecorator::Connect
virtual bool Connect()
Definition: indistd.cpp:723
ISD::GDInterface::properties
QList< INDI::Property * > properties
Definition: indistd.h:79
ISD::ST4::getDeviceName
const char * getDeviceName()
Definition: indistd.cpp:750
dms
An angle, stored as degrees, but expressible in many ways.
Definition: dms.h:42
Options::useGeographicUpdate
static bool useGeographicUpdate()
Get Automatically updates geographic location?
Definition: Options.h:486
ISD::DeviceDecorator::getProperties
QList< INDI::Property * > getProperties()
Definition: indistd.cpp:713
INDI_DISCONNECT
Definition: indicommon.h:72
KSTARS_CCD
Definition: indicommon.h:66
skypoint.h
DriverInfo
Definition: driverinfo.h:24
SkyMap::forceUpdateNow
void forceUpdateNow()
Convenience function; simply calls forceUpdate(true).
Definition: skymap.h:306
ISD::DeviceDecorator::clientManager
ClientManager * clientManager
Definition: indistd.h:190
Options.h
ISD::GDInterface::getType
virtual DeviceFamily getType()=0
ISD::GenericDevice::removeProperty
virtual void removeProperty(INDI::Property *prop)
Definition: indistd.cpp:166
ISD::GDSetCommand::indiElement
QString indiElement
Definition: indistd.h:43
DriverInfo::getType
DeviceFamily getType()
Definition: driverinfo.h:52
GeoLocation::lat
const dms * lat() const
Definition: geolocation.h:79
ISD::GDInterface::processSwitch
virtual void processSwitch(ISwitchVectorProperty *svp)=0
ClientManager
Definition: clientmanager.h:22
NaN::d
const double d
Definition: nan.h:35
ISD::DeviceDecorator::removeProperty
virtual void removeProperty(INDI::Property *prop)
Definition: indistd.cpp:676
ISD::GDInterface::textUpdated
void textUpdated(ITextVectorProperty *tvp)
ISD::GDInterface::BLOBUpdated
void BLOBUpdated(IBLOB *bp)
ISD::GDInterface::processBLOB
virtual void processBLOB(IBLOB *bp)=0
ISD::DeviceDecorator::DeviceDecorator
DeviceDecorator(GDInterface *iPtr)
Definition: indistd.cpp:616
ISD::GDInterface::setProperty
virtual bool setProperty(QObject *)=0
ISD::GDInterface::dType
DeviceFamily dType
Definition: indistd.h:78
ISD::GenericDevice::Disconnect
virtual bool Disconnect()
Definition: indistd.cpp:473
ISD::DeviceDecorator::processLight
virtual void processLight(ILightVectorProperty *lvp)
Definition: indistd.cpp:646
ISD::GDSetCommand::indiProperty
QString indiProperty
Definition: indistd.h:42
ISD::GDSetCommand::GDSetCommand
GDSetCommand(INDI_TYPE inPropertyType, const QString &inProperty, const QString &inElement, QVariant qValue, QObject *parent)
Definition: indistd.cpp:37
KSTARS_FILTER
Definition: indicommon.h:66
MAX_FILENAME_LEN
const int MAX_FILENAME_LEN
Definition: indistd.cpp:31
indistd.h
ISD::GDInterface::getDeviceInfo
virtual DeviceInfo * getDeviceInfo()=0
KStars::data
KStarsData * data() const
Definition: kstars.h:131
INDIConfig
INDIConfig
Definition: indicommon.h:21
ISD::GDSetCommand::elementValue
QVariant elementValue
Definition: indistd.h:44
Options::useComputerSource
static bool useComputerSource()
Get Use computer time and location for synchronization?
Definition: Options.h:657
RA_DEC_DIR
Definition: indicommon.h:27
ISD::GDInterface::Disconnect
virtual bool Disconnect()=0
ISD::DeviceDecorator::isConnected
virtual bool isConnected()
Definition: indistd.cpp:718
ISD::DeviceDecorator::getBaseDevice
virtual INDI::BaseDevice * getBaseDevice()
Definition: indistd.cpp:708
ISD::GenericDevice::processSwitch
virtual void processSwitch(ISwitchVectorProperty *svp)
Definition: indistd.cpp:171
ISD::GenericDevice::runCommand
virtual bool runCommand(int command, void *ptr=NULL)
Definition: indistd.cpp:478
kstarsdata.h
ISD::GenericDevice::updateTime
void updateTime()
Definition: indistd.cpp:404
ISD::GDInterface::propertyDefined
void propertyDefined(INDI::Property *prop)
ISD::GDInterface::getProperties
virtual QList< INDI::Property * > getProperties()=0
Options::telescopePort
static QString telescopePort()
Get INDI Telescope port.
Definition: Options.h:581
dms::setD
void setD(const double &x)
Sets floating-point value of angle, in degrees.
Definition: dms.h:130
DeviceInfo
Definition: deviceinfo.h:18
ISD::DeviceDecorator::interfacePtr
GDInterface * interfacePtr
Definition: indistd.h:191
ISD::DeviceDecorator::getType
virtual DeviceFamily getType()
Definition: indistd.cpp:688
INDI_SET_FILTER
Definition: indicommon.h:72
KSTARS_TELESCOPE
Definition: indicommon.h:66
ISD::ST4::ST4
ST4(INDI::BaseDevice *bdv, ClientManager *cm)
Definition: indistd.cpp:742
dataType
dataType
Definition: binfile.h:51
indicommon.h
Options::focuserPort
static QString focuserPort()
Get INDI Focuser port.
Definition: Options.h:600
ISD::GenericDevice::Connect
virtual bool Connect()
Definition: indistd.cpp:468
kstars.h
ISD::GDInterface
Definition: indistd.h:48
ISD::ST4::~ST4
~ST4()
Definition: indistd.cpp:748
ISD::ST4::doPulse
bool doPulse(GuideDirection ra_dir, int ra_msecs, GuideDirection dec_dir, int dec_msecs)
Definition: indistd.cpp:755
ISD::GenericDevice::getMinMaxStep
virtual bool getMinMaxStep(const QString &propName, const QString &elementName, double *min, double *max, double *step)
Definition: indistd.cpp:596
ISD::GenericDevice::registerProperty
virtual void registerProperty(INDI::Property *prop)
Definition: indistd.cpp:71
QList
ISD::GDInterface::getDriverInfo
virtual DriverInfo * getDriverInfo()=0
ISD::GDInterface::Connected
void Connected()
KStarsData::syncLST
void syncLST()
Sync the LST with the simulation clock.
Definition: kstarsdata.cpp:268
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:36:20 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

kstars

Skip menu "kstars"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdeedu API Reference

Skip menu "kdeedu API Reference"
  • Analitza
  •     lib
  • kalgebra
  • kalzium
  •   libscience
  • kanagram
  • kig
  •   lib
  • klettres
  • kstars
  • libkdeedu
  •   keduvocdocument
  • marble
  • parley
  • rocs
  •   App
  •   RocsCore
  •   VisualEditor
  •   stepcore

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal