Instrument Neutral Distributed Interface INDI  1.6.0
Public Types | Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | List of all members
INDI::FocuserInterface Class Reference

#include <indifocuserinterface.h>

Inheritance diagram for INDI::FocuserInterface:
INDI::Focuser DMFC FocusLynxBase FocusSim Gemini HitecAstroDCFocuser Integra Lakeside Microtouch MoonLite NFocus NightCrawler NSTEP PerfectStar RoboFocus SestoSenso SmartFocus SteelDrive TCFS USBFocusV3

Public Types

Public Member Functions

uint32_t GetFocuserCapability () const
 GetFocuserCapability returns the capability of the focuser. More...
 
void SetFocuserCapability (uint32_t cap)
 SetFocuserCapability sets the focuser capabilities. All capabilities must be initialized. More...
 
bool CanAbsMove ()
 
bool CanRelMove ()
 
bool CanAbort ()
 
bool HasVariableSpeed ()
 

Public Attributes

enum INDI::FocuserInterface:: { ... }  FocuserCapability
 

Protected Member Functions

 FocuserInterface ()=default
 
virtual ~FocuserInterface ()=default
 
void initFocuserProperties (const char *deviceName, const char *groupName)
 Initilize focuser properties. It is recommended to call this function within initProperties() of your primary device. More...
 
bool processFocuserNumber (const char *dev, const char *name, double values[], char *names[], int n)
 Process focus number properties. More...
 
bool processFocuserSwitch (const char *dev, const char *name, ISState *states, char *names[], int n)
 Process focus switch properties. More...
 
virtual bool SetFocuserSpeed (int speed)
 SetFocuserSpeed Set Focuser speed. More...
 
virtual IPState MoveFocuser (FocusDirection dir, int speed, uint16_t duration)
 MoveFocuser the focuser in a particular direction with a specific speed for a finite duration. More...
 
virtual IPState MoveAbsFocuser (uint32_t targetTicks)
 MoveFocuser the focuser to an absolute position. More...
 
virtual IPState MoveRelFocuser (FocusDirection dir, uint32_t ticks)
 MoveFocuser the focuser to an relative position. More...
 
virtual bool AbortFocuser ()
 AbortFocuser all focus motion. More...
 

Protected Attributes

INumberVectorProperty FocusSpeedNP
 
INumber FocusSpeedN [1]
 
ISwitchVectorProperty FocusMotionSP
 
ISwitch FocusMotionS [2]
 
INumberVectorProperty FocusTimerNP
 
INumber FocusTimerN [1]
 
INumberVectorProperty FocusAbsPosNP
 
INumber FocusAbsPosN [1]
 
INumberVectorProperty FocusRelPosNP
 
INumber FocusRelPosN [1]
 
ISwitchVectorProperty AbortSP
 
ISwitch AbortS [1]
 
uint32_t capability
 
char focuserName [MAXINDIDEVICE]
 
double lastTimerValue
 

Detailed Description

Definition at line 41 of file indifocuserinterface.h.

Member Enumeration Documentation

anonymous enum
Enumerator
FOCUSER_CAN_ABS_MOVE 

Can the focuser move by absolute position?

FOCUSER_CAN_REL_MOVE 

Can the focuser move by relative position?

FOCUSER_CAN_ABORT 

Is it possible to abort focuser motion?

FOCUSER_HAS_VARIABLE_SPEED 

Can the focuser move in different configurable speeds?

Definition at line 50 of file indifocuserinterface.h.

Enumerator
FOCUS_INWARD 
FOCUS_OUTWARD 

Definition at line 44 of file indifocuserinterface.h.

Constructor & Destructor Documentation

INDI::FocuserInterface::FocuserInterface ( )
protecteddefault
virtual INDI::FocuserInterface::~FocuserInterface ( )
protectedvirtualdefault

Member Function Documentation

bool FocuserInterface::AbortFocuser ( )
protectedvirtual

AbortFocuser all focus motion.

Returns
True if abort is successful, false otherwise.

Reimplemented in USBFocusV3, FocusLynxBase, Gemini, SteelDrive, Microtouch, Integra, PerfectStar, Lakeside, NightCrawler, NSTEP, SestoSenso, MoonLite, DMFC, RoboFocus, and SmartFocus.

Definition at line 288 of file indifocuserinterface.cpp.

bool INDI::FocuserInterface::CanAbort ( )
inline
Returns
True if the focuser motion can be aborted.

Definition at line 82 of file indifocuserinterface.h.

bool INDI::FocuserInterface::CanAbsMove ( )
inline
Returns
True if the focuser has absolute position encoders.

Definition at line 72 of file indifocuserinterface.h.

bool INDI::FocuserInterface::CanRelMove ( )
inline
Returns
True if the focuser has relative position encoders.

Definition at line 77 of file indifocuserinterface.h.

uint32_t INDI::FocuserInterface::GetFocuserCapability ( ) const
inline

GetFocuserCapability returns the capability of the focuser.

Definition at line 61 of file indifocuserinterface.h.

bool INDI::FocuserInterface::HasVariableSpeed ( )
inline
Returns
True if the focuser has multiple speeds.

Definition at line 87 of file indifocuserinterface.h.

void FocuserInterface::initFocuserProperties ( const char *  deviceName,
const char *  groupName 
)
protected

Initilize focuser properties. It is recommended to call this function within initProperties() of your primary device.

Parameters
deviceNameName of the primary device
groupNameGroup or tab name to be used to define focuser properties.

Definition at line 30 of file indifocuserinterface.cpp.

IPState FocuserInterface::MoveAbsFocuser ( uint32_t  targetTicks)
protectedvirtual

MoveFocuser the focuser to an absolute position.

Parameters
ticksThe new position of the focuser.
Returns
Return IPS_OK if motion is completed and focuser reached requested position. Return IPS_BUSY if focuser started motion to requested position and is in progress. Return IPS_ALERT if there is an error.

Reimplemented in USBFocusV3, FocusLynxBase, Gemini, TCFS, SteelDrive, Microtouch, FocusSim, Integra, PerfectStar, Lakeside, NSTEP, NightCrawler, SestoSenso, NFocus, MoonLite, DMFC, SmartFocus, and RoboFocus.

Definition at line 281 of file indifocuserinterface.cpp.

IPState FocuserInterface::MoveFocuser ( FocusDirection  dir,
int  speed,
uint16_t  duration 
)
protectedvirtual

MoveFocuser the focuser in a particular direction with a specific speed for a finite duration.

Parameters
dirDirection of focuser, either FOCUS_INWARD or FOCUS_OUTWARD.
speedSpeed of focuser if supported by the focuser.
durationThe timeout in milliseconds before the focus motion halts.
Returns
Return IPS_OK if motion is completed and focuser reached requested position. Return IPS_BUSY if focuser started motion to requested position and is in progress. Return IPS_ALERT if there is an error.

Reimplemented in FocusLynxBase, Gemini, SteelDrive, Microtouch, FocusSim, HitecAstroDCFocuser, and MoonLite.

Definition at line 264 of file indifocuserinterface.cpp.

IPState FocuserInterface::MoveRelFocuser ( FocusDirection  dir,
uint32_t  ticks 
)
protectedvirtual

MoveFocuser the focuser to an relative position.

Parameters
dirDirection of focuser, either FOCUS_INWARD or FOCUS_OUTWARD.
ticksThe relative ticks to move.
Returns
Return IPS_OK if motion is completed and focuser reached requested position. Return IPS_BUSY if focuser started motion to requested position and is in progress. Return IPS_ALERT if there is an error.

Reimplemented in USBFocusV3, FocusLynxBase, Gemini, TCFS, Microtouch, FocusSim, Integra, HitecAstroDCFocuser, PerfectStar, Lakeside, NightCrawler, NFocus, MoonLite, SestoSenso, DMFC, SmartFocus, and RoboFocus.

Definition at line 273 of file indifocuserinterface.cpp.

bool FocuserInterface::processFocuserNumber ( const char *  dev,
const char *  name,
double  values[],
char *  names[],
int  n 
)
protected

Process focus number properties.

Definition at line 60 of file indifocuserinterface.cpp.

bool FocuserInterface::processFocuserSwitch ( const char *  dev,
const char *  name,
ISState states,
char *  names[],
int  n 
)
protected

Process focus switch properties.

Definition at line 220 of file indifocuserinterface.cpp.

void FocuserInterface::SetFocuserCapability ( uint32_t  cap)

SetFocuserCapability sets the focuser capabilities. All capabilities must be initialized.

Parameters
cappointer to focuser capability struct.

Definition at line 306 of file indifocuserinterface.cpp.

bool FocuserInterface::SetFocuserSpeed ( int  speed)
protectedvirtual

SetFocuserSpeed Set Focuser speed.

Parameters
speedfocuser speed
Returns
true if successful, false otherwise

Reimplemented in USBFocusV3, SteelDrive, Microtouch, FocusSim, NSTEP, and MoonLite.

Definition at line 296 of file indifocuserinterface.cpp.

Member Data Documentation

ISwitch INDI::FocuserInterface::AbortS[1]
protected

Definition at line 162 of file indifocuserinterface.h.

ISwitchVectorProperty INDI::FocuserInterface::AbortSP
protected

Definition at line 161 of file indifocuserinterface.h.

uint32_t INDI::FocuserInterface::capability
protected

Definition at line 164 of file indifocuserinterface.h.

INumber INDI::FocuserInterface::FocusAbsPosN[1]
protected

Definition at line 158 of file indifocuserinterface.h.

INumberVectorProperty INDI::FocuserInterface::FocusAbsPosNP
protected

Definition at line 157 of file indifocuserinterface.h.

enum { ... } INDI::FocuserInterface::FocuserCapability
char INDI::FocuserInterface::focuserName[MAXINDIDEVICE]
protected

Definition at line 166 of file indifocuserinterface.h.

ISwitch INDI::FocuserInterface::FocusMotionS[2]
protected

Definition at line 154 of file indifocuserinterface.h.

ISwitchVectorProperty INDI::FocuserInterface::FocusMotionSP
protected

Definition at line 153 of file indifocuserinterface.h.

INumber INDI::FocuserInterface::FocusRelPosN[1]
protected

Definition at line 160 of file indifocuserinterface.h.

INumberVectorProperty INDI::FocuserInterface::FocusRelPosNP
protected

Definition at line 159 of file indifocuserinterface.h.

INumber INDI::FocuserInterface::FocusSpeedN[1]
protected

Definition at line 152 of file indifocuserinterface.h.

INumberVectorProperty INDI::FocuserInterface::FocusSpeedNP
protected

Definition at line 151 of file indifocuserinterface.h.

INumber INDI::FocuserInterface::FocusTimerN[1]
protected

Definition at line 156 of file indifocuserinterface.h.

INumberVectorProperty INDI::FocuserInterface::FocusTimerNP
protected

Definition at line 155 of file indifocuserinterface.h.

double INDI::FocuserInterface::lastTimerValue
protected

Definition at line 167 of file indifocuserinterface.h.


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