Instrument Neutral Distributed Interface INDI
2.0.2
|
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 More... | |
bool | sendCommand (const char *cmd, char *res=nullptr, int cmd_len=-1, int res_len=-1) |
sendCommand Send a string command to device. More... | |
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 More... | |
bool | isCommandSupported (const std::string &command, bool silent=false) |
isCommandSupported Check if specific iOptron command is supported for this mount model More... | |
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. More... | |
int | DecodeString (const char *data, size_t size) |
DecodeString converts a string of defined size to an int. More... | |
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 { '#' } |
constexpr static const double | ieqDegrees { 60.0 * 60.0 * 100.0 } |
constexpr static 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 38 of file ieqdriverbase.cpp.
|
virtualdefault |
|
virtual |
Definition at line 350 of file ieqdriverbase.cpp.
|
protected |
DecodeString converts a string of defined size to an int.
data | |
size |
Definition at line 825 of file ieqdriverbase.cpp.
|
protected |
DecodeString converts the string to a double by dividing by the factor.
data | |
size | |
factor |
Definition at line 820 of file ieqdriverbase.cpp.
|
virtual |
Definition at line 188 of file ieqdriverbase.cpp.
bool iEQ::Base::getCoords | ( | double * | ra, |
double * | dec | ||
) |
Get RA/DEC
Definition at line 525 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 279 of file ieqdriverbase.cpp.
bool iEQ::Base::getMainFirmware | ( | ) |
Get mainboard and controller firmware only
Definition at line 98 of file ieqdriverbase.cpp.
bool iEQ::Base::getModel | ( | ) |
Initilizes communication with the mount and gets mount model
Definition at line 72 of file ieqdriverbase.cpp.
bool iEQ::Base::getPierSide | ( | IEQ_PIER_SIDE * | pierSide | ) |
Definition at line 625 of file ieqdriverbase.cpp.
bool iEQ::Base::getRADEFirmware | ( | ) |
Get RA and DEC firmware info
Definition at line 118 of file ieqdriverbase.cpp.
bool iEQ::Base::getStatus | ( | Info * | info | ) |
Get iEQ current status info
Definition at line 580 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 539 of file ieqdriverbase.cpp.
|
virtual |
Definition at line 198 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 762 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 42 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 771 of file ieqdriverbase.cpp.
|
virtual |
Definition at line 326 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 delimeter 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 703 of file ieqdriverbase.cpp.
|
virtual |
Definition at line 419 of file ieqdriverbase.cpp.
|
virtual |
Definition at line 406 of file ieqdriverbase.cpp.
|
virtual |
Definition at line 204 of file ieqdriverbase.cpp.
|
virtual |
Definition at line 245 of file ieqdriverbase.cpp.
|
virtual |
Definition at line 393 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 508 of file ieqdriverbase.cpp.
|
virtual |
Definition at line 262 of file ieqdriverbase.cpp.
|
virtual |
Definition at line 477 of file ieqdriverbase.cpp.
|
virtual |
Definition at line 488 of file ieqdriverbase.cpp.
|
virtual |
Definition at line 498 of file ieqdriverbase.cpp.
|
virtual |
Definition at line 466 of file ieqdriverbase.cpp.
|
virtual |
Definition at line 448 of file ieqdriverbase.cpp.
|
virtual |
Definition at line 432 of file ieqdriverbase.cpp.
|
virtual |
Definition at line 380 of file ieqdriverbase.cpp.
|
virtual |
Definition at line 210 of file ieqdriverbase.cpp.
|
virtual |
Definition at line 374 of file ieqdriverbase.cpp.
|
virtual |
Definition at line 218 of file ieqdriverbase.cpp.
|
virtual |
Definition at line 514 of file ieqdriverbase.cpp.
|
virtual |
Definition at line 356 of file ieqdriverbase.cpp.
|
virtual |
Definition at line 297 of file ieqdriverbase.cpp.
|
virtual |
Definition at line 138 of file ieqdriverbase.cpp.
|
virtual |
Definition at line 167 of file ieqdriverbase.cpp.
|
virtual |
Definition at line 368 of file ieqdriverbase.cpp.
|
virtual |
Definition at line 341 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.