|
Instrument Neutral Distributed Interface INDI 2.2.5
|
The BaseFirmware class provides control for iOptron version 2014 v2.0 protocol. More...
#include <ieqdriverbase.h>
Classes | |
| struct | FirmwareInfo |
| struct | Info |
| struct | MountInfo |
Public Member Functions | |
| Base () | |
| virtual | ~Base ()=default |
| void | setDebugEnabled (bool enable) |
| void | setDeviceName (const std::string &name) |
| const char * | getDeviceName () |
| bool | getStatus (Info *info) |
| bool | getModel () |
| bool | getMainFirmware () |
| bool | getRADEFirmware () |
| bool | getCoords (double *ra, double *dec) |
| bool | getUTCDateTime (double *utc_hours, int *yy, int *mm, int *dd, int *hh, int *minute, int *ss) |
| const FirmwareInfo & | getFirmwareInfo () const |
| bool | getPierSide (IEQ_PIER_SIDE *pierSide) |
| bool | initCommunication (int fd) |
| initCommunication Checks if communication with the mount is working | |
| bool | sendCommand (const char *cmd, char *res=nullptr, int cmd_len=-1, int res_len=-1) |
| sendCommand Send a string command to device. | |
| void | hexDump (char *buf, const char *data, int size) |
| hexDump Helper function to print non-string commands to the logger so it is easier to debug | |
| bool | isCommandSupported (const std::string &command, bool silent=false) |
| isCommandSupported Check if specific iOptron command is supported for this mount model | |
| virtual bool | startMotion (Direction dir) |
| virtual bool | stopMotion (Direction dir) |
| virtual bool | setSlewRate (SlewRate rate) |
| virtual bool | setCustomRATrackRate (double rate) |
| virtual bool | setTrackMode (TrackRate rate) |
| virtual bool | setTrackEnabled (bool enabled) |
| virtual bool | abort () |
| virtual bool | slew () |
| virtual bool | sync () |
| virtual bool | setRA (double ra) |
| virtual bool | setDE (double dec) |
| virtual bool | setAz (double az) |
| virtual bool | setAlt (double alt) |
| virtual bool | findHome () |
| virtual bool | gotoHome () |
| virtual bool | setCurrentHome () |
| virtual bool | park () |
| virtual bool | unpark () |
| virtual bool | setParkAz (double az) |
| virtual bool | setParkAlt (double alt) |
| virtual bool | setGuideRate (double raRate, double deRate) |
| virtual bool | getGuideRate (double *raRate, double *deRate) |
| virtual bool | startGuide (Direction dir, uint32_t ms) |
| virtual bool | setLongitude (double longitude) |
| virtual bool | setLatitude (double latitude) |
| virtual bool | setLocalDate (int yy, int mm, int dd) |
| virtual bool | setLocalTime (int hh, int mm, int ss) |
| virtual bool | setUTCOffset (double offset_hours) |
| virtual bool | setDST (bool enabled) |
Protected Member Functions | |
| double | DecodeString (const char *data, size_t size, double factor) |
| DecodeString converts the string to a double by dividing by the factor. | |
| int | DecodeString (const char *data, size_t size) |
| DecodeString converts a string of defined size to an int. | |
Protected Attributes | |
| int | m_PortFD {-1} |
| std::string | m_DeviceName { "iEQ" } |
| bool | m_IsDebug { false } |
| FirmwareInfo | m_FirmwareInfo |
| const std::vector< MountInfo > | m_MountList |
Static Protected Attributes | |
| static const uint8_t | DRIVER_TIMEOUT { 3 } |
| static const uint8_t | DRIVER_LEN { 64 } |
| static const char | DRIVER_STOP_CHAR { '#' } |
| static constexpr const double | ieqDegrees { 60.0 * 60.0 * 100.0 } |
| static constexpr const double | ieqHours { 60.0 * 60.0 * 1000.0 } |
The BaseFirmware class provides control for iOptron version 2014 v2.0 protocol.
Definition at line 57 of file ieqdriverbase.h.
| iEQ::Base::Base | ( | ) |
Definition at line 39 of file ieqdriverbase.cpp.
|
virtualdefault |
|
virtual |
Definition at line 351 of file ieqdriverbase.cpp.
|
protected |
DecodeString converts a string of defined size to an int.
| data | |
| size |
Definition at line 891 of file ieqdriverbase.cpp.
|
protected |
DecodeString converts the string to a double by dividing by the factor.
| data | |
| size | |
| factor |
Definition at line 886 of file ieqdriverbase.cpp.
|
virtual |
Definition at line 189 of file ieqdriverbase.cpp.
| bool iEQ::Base::getCoords | ( | double * | ra, |
| double * | dec | ||
| ) |
Get RA/DEC
Definition at line 526 of file ieqdriverbase.cpp.
|
inline |
Definition at line 101 of file ieqdriverbase.h.
|
inline |
Get firmware information
Definition at line 122 of file ieqdriverbase.h.
|
virtual |
Definition at line 280 of file ieqdriverbase.cpp.
| bool iEQ::Base::getMainFirmware | ( | ) |
Get mainboard and controller firmware only
Definition at line 99 of file ieqdriverbase.cpp.
| bool iEQ::Base::getModel | ( | ) |
Initializes communication with the mount and gets mount model
Definition at line 73 of file ieqdriverbase.cpp.
| bool iEQ::Base::getPierSide | ( | IEQ_PIER_SIDE * | pierSide | ) |
Definition at line 691 of file ieqdriverbase.cpp.
| bool iEQ::Base::getRADEFirmware | ( | ) |
Get RA and DEC firmware info
Definition at line 119 of file ieqdriverbase.cpp.
| bool iEQ::Base::getStatus | ( | Info * | info | ) |
Get iEQ current status info
Definition at line 646 of file ieqdriverbase.cpp.
| bool iEQ::Base::getUTCDateTime | ( | double * | utc_hours, |
| int * | yy, | ||
| int * | mm, | ||
| int * | dd, | ||
| int * | hh, | ||
| int * | minute, | ||
| int * | ss | ||
| ) |
Get UTC/Date/Time
Definition at line 605 of file ieqdriverbase.cpp.
|
virtual |
Definition at line 199 of file ieqdriverbase.cpp.
| void iEQ::Base::hexDump | ( | char * | buf, |
| const char * | data, | ||
| int | size | ||
| ) |
hexDump Helper function to print non-string commands to the logger so it is easier to debug
| buf | buffer to format the command into hex strings. |
| data | the command |
| size | length of the command in bytes. |
Definition at line 828 of file ieqdriverbase.cpp.
| bool iEQ::Base::initCommunication | ( | int | fd | ) |
initCommunication Checks if communication with the mount is working
| fd | file descriptor |
| deviceName | name of device used to log debugging messages. |
Definition at line 43 of file ieqdriverbase.cpp.
| bool iEQ::Base::isCommandSupported | ( | const std::string & | command, |
| bool | silent = false |
||
| ) |
isCommandSupported Check if specific iOptron command is supported for this mount model
| command | command code (e.g. MS) |
| silent | if false (default), it will report why command is not supported. If true, it will not print any messages. |
Definition at line 837 of file ieqdriverbase.cpp.
|
virtual |
Definition at line 327 of file ieqdriverbase.cpp.
| bool iEQ::Base::sendCommand | ( | const char * | cmd, |
| char * | res = nullptr, |
||
| int | cmd_len = -1, |
||
| int | res_len = -1 |
||
| ) |
sendCommand Send a string command to device.
| cmd | Command to be sent. Can be either NULL TERMINATED or just byte buffer. |
| res | If not nullptr, the function will wait for a response from the device. If nullptr, it returns true immediately after the command is successfully sent. |
| cmd_len | if -1, it is assumed that the cmd is a null-terminated string. Otherwise, it would write cmd_len bytes from the cmd buffer. |
| res_len | if -1 and if res is not nullptr, the function will read until it detects the default delimiter DRIVER_STOP_CHAR up to DRIVER_LEN length. Otherwise, the function will read res_len from the device and store it in res. |
Definition at line 769 of file ieqdriverbase.cpp.
|
virtual |
Definition at line 420 of file ieqdriverbase.cpp.
|
virtual |
Definition at line 407 of file ieqdriverbase.cpp.
|
virtual |
Definition at line 205 of file ieqdriverbase.cpp.
|
virtual |
Definition at line 246 of file ieqdriverbase.cpp.
|
virtual |
Definition at line 394 of file ieqdriverbase.cpp.
|
inline |
Definition at line 93 of file ieqdriverbase.h.
|
inline |
Definition at line 97 of file ieqdriverbase.h.
|
virtual |
Definition at line 509 of file ieqdriverbase.cpp.
|
virtual |
Definition at line 263 of file ieqdriverbase.cpp.
|
virtual |
Definition at line 478 of file ieqdriverbase.cpp.
|
virtual |
Definition at line 489 of file ieqdriverbase.cpp.
|
virtual |
Definition at line 499 of file ieqdriverbase.cpp.
|
virtual |
Definition at line 467 of file ieqdriverbase.cpp.
|
virtual |
Definition at line 449 of file ieqdriverbase.cpp.
|
virtual |
Definition at line 433 of file ieqdriverbase.cpp.
|
virtual |
Definition at line 381 of file ieqdriverbase.cpp.
|
virtual |
Definition at line 211 of file ieqdriverbase.cpp.
|
virtual |
Definition at line 375 of file ieqdriverbase.cpp.
|
virtual |
Definition at line 219 of file ieqdriverbase.cpp.
|
virtual |
Definition at line 515 of file ieqdriverbase.cpp.
|
virtual |
Definition at line 357 of file ieqdriverbase.cpp.
|
virtual |
Definition at line 298 of file ieqdriverbase.cpp.
|
virtual |
Definition at line 139 of file ieqdriverbase.cpp.
|
virtual |
Definition at line 168 of file ieqdriverbase.cpp.
|
virtual |
Definition at line 369 of file ieqdriverbase.cpp.
|
virtual |
Definition at line 342 of file ieqdriverbase.cpp.
|
staticprotected |
Definition at line 234 of file ieqdriverbase.h.
|
staticprotected |
Definition at line 235 of file ieqdriverbase.h.
|
staticprotected |
Definition at line 233 of file ieqdriverbase.h.
|
staticconstexprprotected |
Definition at line 275 of file ieqdriverbase.h.
|
staticconstexprprotected |
Definition at line 276 of file ieqdriverbase.h.
|
protected |
Definition at line 231 of file ieqdriverbase.h.
|
protected |
Definition at line 237 of file ieqdriverbase.h.
|
protected |
Definition at line 232 of file ieqdriverbase.h.
|
protected |
Definition at line 239 of file ieqdriverbase.h.
|
protected |
Definition at line 230 of file ieqdriverbase.h.