TwiceAsNice  2019-02-18
Public Member Functions | Static Public Attributes | Protected Member Functions | Protected Attributes | Private Attributes | Static Private Attributes | List of all members
IOPv3::Driver Class Reference

#include <ioptronv3driver.h>

Collaboration diagram for IOPv3::Driver:
Collaboration graph

Public Member Functions

 Driver (const char *deviceName)
 
 ~Driver ()=default
 
bool sendCommand (const char *command, int count=1, char *response=nullptr, uint8_t timeout=IOP_TIMEOUT, uint8_t debugLog=INDI::Logger::DBG_DEBUG)
 
bool checkConnection (int fd)
 
bool getStatus (IOPInfo *info)
 Get iEQ current status info. More...
 
bool getFirmwareInfo (FirmwareInfo *info)
 Get All firmware informatin in addition to mount model. More...
 
bool getCoords (double *ra, double *de, IOP_PIER_STATE *pierState, IOP_CW_STATE *cwState)
 Get RA/DEC. More...
 
bool getUTCDateTime (double *JD, int *utcOffsetMinutes, bool *dayLightSaving)
 Get UTC JD plus utc offset and whether daylight savings is active or not. More...
 
bool startMotion (IOP_DIRECTION dir)
 
bool stopMotion (IOP_DIRECTION dir)
 
bool setSlewRate (IOP_SLEW_RATE rate)
 
bool setCustomRATrackRate (double rate)
 
bool setTrackMode (IOP_TRACK_RATE rate)
 
bool setTrackEnabled (bool enabled)
 
bool abort ()
 
bool slewNormal ()
 
bool slewCWUp ()
 
bool sync ()
 
bool setRA (double ra)
 
bool setDE (double de)
 
bool findHome ()
 
bool gotoHome ()
 
bool setCurrentHome ()
 
bool park ()
 
bool unpark ()
 
bool setGuideRate (double RARate, double DERate)
 
bool getGuideRate (double *RARate, double *DERate)
 
bool startGuide (IOP_DIRECTION dir, uint32_t ms)
 
bool setLongitude (double longitude)
 
bool setLatitude (double latitude)
 
bool setUTCDateTime (double JD)
 
bool setUTCOffset (int offsetMinutes)
 
bool setDaylightSaving (bool enabled)
 
void setDebug (bool enable)
 
void setSimulation (bool enable)
 
void setSimGPSstatus (IOP_GPS_STATUS value)
 
void setSimSytemStatus (IOP_SYSTEM_STATUS value)
 
void setSimTrackRate (IOP_TRACK_RATE value)
 
void setSimSlewRate (IOP_SLEW_RATE value)
 
void setSimTimeSource (IOP_TIME_SOURCE value)
 
void setSimHemisphere (IOP_HEMISPHERE value)
 
void setSimRA (double ra)
 
void setSimDE (double de)
 
void setSimLongLat (double longitude, double latitude)
 
void setSimGuideRate (double raRate, double deRate)
 

Static Public Attributes

static const std::map< std::string, std::string > models
 
static const uint16_t IOP_SLEW_RATES [] = {1, 2, 8, 16, 64, 128, 256, 512, 1024}
 

Protected Member Functions

bool getMainFirmware (std::string &mainFirmware, std::string &controllerFirmware)
 Get mainboard and controller firmware only. More...
 
bool getRADEFirmware (std::string &RAFirmware, std::string &DEFirmware)
 Get RA and DEC firmware info. More...
 
bool getModel (std::string &model)
 Get Mount model. More...
 

Protected Attributes

struct {
   double   ra
 
   double   de
 
   double   ra_guide_rate
 
   double   de_guide_rate
 
   double   JD
 
   int   utc_offset_minutes
 
   bool   day_light_saving
 
   IOP_PIER_STATE   pier_state
 
   IOP_CW_STATE   cw_state
 
   IOPInfo   simInfo
 
simData
 

Private Attributes

int PortFD = { -1 }
 
bool m_Debug = {false}
 
bool m_Simulation = {false}
 
const char * m_DeviceName
 

Static Private Attributes

static const uint8_t IOP_TIMEOUT =5
 
static const uint8_t IOP_BUFFER =64
 

Constructor & Destructor Documentation

◆ Driver()

IOPv3::Driver::Driver ( const char *  deviceName)
explicit

◆ ~Driver()

IOPv3::Driver::~Driver ( )
default

Member Function Documentation

◆ abort()

bool IOPv3::Driver::abort ( void  )

◆ checkConnection()

bool IOPv3::Driver::checkConnection ( int  fd)

◆ findHome()

bool IOPv3::Driver::findHome ( )

◆ getCoords()

bool IOPv3::Driver::getCoords ( double *  ra,
double *  de,
IOP_PIER_STATE pierState,
IOP_CW_STATE cwState 
)

Get RA/DEC.

◆ getFirmwareInfo()

bool IOPv3::Driver::getFirmwareInfo ( FirmwareInfo info)

Get All firmware informatin in addition to mount model.

◆ getGuideRate()

bool IOPv3::Driver::getGuideRate ( double *  RARate,
double *  DERate 
)

◆ getMainFirmware()

bool IOPv3::Driver::getMainFirmware ( std::string &  mainFirmware,
std::string &  controllerFirmware 
)
protected

Get mainboard and controller firmware only.

◆ getModel()

bool IOPv3::Driver::getModel ( std::string &  model)
protected

Get Mount model.

◆ getRADEFirmware()

bool IOPv3::Driver::getRADEFirmware ( std::string &  RAFirmware,
std::string &  DEFirmware 
)
protected

Get RA and DEC firmware info.

◆ getStatus()

bool IOPv3::Driver::getStatus ( IOPInfo info)

Get iEQ current status info.

◆ getUTCDateTime()

bool IOPv3::Driver::getUTCDateTime ( double *  JD,
int *  utcOffsetMinutes,
bool dayLightSaving 
)

Get UTC JD plus utc offset and whether daylight savings is active or not.

◆ gotoHome()

bool IOPv3::Driver::gotoHome ( )

◆ park()

bool IOPv3::Driver::park ( )

◆ sendCommand()

bool IOPv3::Driver::sendCommand ( const char *  command,
int  count = 1,
char *  response = nullptr,
uint8_t  timeout = IOP_TIMEOUT,
uint8_t  debugLog = INDI::Logger::DBG_DEBUG 
)

◆ setCurrentHome()

bool IOPv3::Driver::setCurrentHome ( )

◆ setCustomRATrackRate()

bool IOPv3::Driver::setCustomRATrackRate ( double  rate)

◆ setDaylightSaving()

bool IOPv3::Driver::setDaylightSaving ( bool  enabled)

◆ setDE()

bool IOPv3::Driver::setDE ( double  de)

◆ setDebug()

void IOPv3::Driver::setDebug ( bool  enable)

◆ setGuideRate()

bool IOPv3::Driver::setGuideRate ( double  RARate,
double  DERate 
)

◆ setLatitude()

bool IOPv3::Driver::setLatitude ( double  latitude)

◆ setLongitude()

bool IOPv3::Driver::setLongitude ( double  longitude)

◆ setRA()

bool IOPv3::Driver::setRA ( double  ra)

◆ setSimDE()

void IOPv3::Driver::setSimDE ( double  de)

◆ setSimGPSstatus()

void IOPv3::Driver::setSimGPSstatus ( IOP_GPS_STATUS  value)

◆ setSimGuideRate()

void IOPv3::Driver::setSimGuideRate ( double  raRate,
double  deRate 
)

◆ setSimHemisphere()

void IOPv3::Driver::setSimHemisphere ( IOP_HEMISPHERE  value)

◆ setSimLongLat()

void IOPv3::Driver::setSimLongLat ( double  longitude,
double  latitude 
)

◆ setSimRA()

void IOPv3::Driver::setSimRA ( double  ra)

◆ setSimSlewRate()

void IOPv3::Driver::setSimSlewRate ( IOP_SLEW_RATE  value)

◆ setSimSytemStatus()

void IOPv3::Driver::setSimSytemStatus ( IOP_SYSTEM_STATUS  value)

◆ setSimTimeSource()

void IOPv3::Driver::setSimTimeSource ( IOP_TIME_SOURCE  value)

◆ setSimTrackRate()

void IOPv3::Driver::setSimTrackRate ( IOP_TRACK_RATE  value)

◆ setSimulation()

void IOPv3::Driver::setSimulation ( bool  enable)

◆ setSlewRate()

bool IOPv3::Driver::setSlewRate ( IOP_SLEW_RATE  rate)

◆ setTrackEnabled()

bool IOPv3::Driver::setTrackEnabled ( bool  enabled)

◆ setTrackMode()

bool IOPv3::Driver::setTrackMode ( IOP_TRACK_RATE  rate)

◆ setUTCDateTime()

bool IOPv3::Driver::setUTCDateTime ( double  JD)

◆ setUTCOffset()

bool IOPv3::Driver::setUTCOffset ( int  offsetMinutes)

◆ slewCWUp()

bool IOPv3::Driver::slewCWUp ( )

◆ slewNormal()

bool IOPv3::Driver::slewNormal ( )

◆ startGuide()

bool IOPv3::Driver::startGuide ( IOP_DIRECTION  dir,
uint32_t  ms 
)

◆ startMotion()

bool IOPv3::Driver::startMotion ( IOP_DIRECTION  dir)

◆ stopMotion()

bool IOPv3::Driver::stopMotion ( IOP_DIRECTION  dir)

◆ sync()

bool IOPv3::Driver::sync ( )

◆ unpark()

bool IOPv3::Driver::unpark ( )

Member Data Documentation

◆ cw_state

IOP_CW_STATE IOPv3::Driver::cw_state

◆ day_light_saving

bool IOPv3::Driver::day_light_saving

◆ de

double IOPv3::Driver::de

◆ de_guide_rate

double IOPv3::Driver::de_guide_rate

◆ IOP_BUFFER

const uint8_t IOPv3::Driver::IOP_BUFFER =64
staticprivate

◆ IOP_SLEW_RATES

const uint16_t IOPv3::Driver::IOP_SLEW_RATES = {1, 2, 8, 16, 64, 128, 256, 512, 1024}
static

◆ IOP_TIMEOUT

const uint8_t IOPv3::Driver::IOP_TIMEOUT =5
staticprivate

◆ JD

double IOPv3::Driver::JD

◆ m_Debug

bool IOPv3::Driver::m_Debug = {false}
private

◆ m_DeviceName

const char* IOPv3::Driver::m_DeviceName
private

◆ m_Simulation

bool IOPv3::Driver::m_Simulation = {false}
private

◆ models

const std::map< std::string, std::string > IOPv3::Driver::models
static
Initial value:
=
{
{"0010", "Cube II EQ"},
{"0011", "SmartEQ Pro+"},
{"0025", "CEM25"},
{"0026", "CEM25-EC"},
{"0030", "iEQ30 Pro"},
{"0045", "iEQ45 Pro EQ"},
{"0060", "CEM60"},
{"0061", "CEM60-EC"},
{"0120", "CEM120"},
{"0121", "CEM120-EC"},
{"0122", "CEM120-EC2"},
{"5010", "Cube II AA"},
{"5035", "AZ Mount Pro"},
{"5045", "iEQ45 Pro AA"}
}

◆ pier_state

IOP_PIER_STATE IOPv3::Driver::pier_state

◆ PortFD

int IOPv3::Driver::PortFD = { -1 }
private

◆ ra

double IOPv3::Driver::ra

◆ ra_guide_rate

double IOPv3::Driver::ra_guide_rate

◆ simData

struct { ... } IOPv3::Driver::simData

◆ simInfo

IOPInfo IOPv3::Driver::simInfo

◆ utc_offset_minutes

int IOPv3::Driver::utc_offset_minutes

The documentation for this class was generated from the following files: