Instrument Neutral Distributed Interface INDI  0.9.9
Public Member Functions | Protected Member Functions | List of all members
INDI::FilterInterface Class Referenceabstract

Provides interface to implement Filter Wheel functionality. More...

#include <indifilterinterface.h>

Inheritance diagram for INDI::FilterInterface:
INDI::FilterWheel

Public Member Functions

virtual int QueryFilter ()=0
 Return current filter position.
 
virtual bool SelectFilter (int position)=0
 Select a new filter position. More...
 
virtual bool SetFilterNames ()=0
 Set filter names as defined by the client for each filter position. The desired filter names are stored in FilterNameTP property. Filter names should be saved in hardware if possible. More...
 
virtual bool GetFilterNames (const char *groupName)=0
 Obtains a list of filter names from the hardware and initilizes the FilterNameTP property. The function should check for the number of filters available in the filter wheel and build the FilterNameTP property accordingly. More...
 
void SelectFilterDone (int newpos)
 The child class calls this function when the hardware successfully finished selecting a new filter wheel position. More...
 

Protected Member Functions

void initFilterProperties (const char *deviceName, const char *groupName)
 Initilize filter wheel properties. It is recommended to call this function within initProperties() of your primary device. More...
 
void processFilterSlot (const char *deviceName, double values[], char *names[])
 Process client request to change filter position. Call this function in the filter wheel implementation class ISNewNumber function. More...
 
void processFilterName (const char *deviceName, char *texts[], char *names[], int n)
 Process client request to change filter name(s). Call this function in the filter wheel implementation class ISNewText() function. More...
 

Detailed Description

Provides interface to implement Filter Wheel functionality.

A filter wheel can be an independent device, or an embedded filter wheel within another device (e.g. CCD camera). Child class must implement all the pure virtual functions and call SelectFilterDone(int) when selection of a new filter position is complete in the hardware.

IMPORTANT: initFilterProperties() must be called before any other function to initilize the filter properties.

IMPORTANT: processFilterSlot() must be called in your driver's ISNewNumber() function. processFilterSlot() will call the driver's SelectFilter() accordingly.

Note
Filter position starts from 1 and not 0
Author
Gerry Rozema, Jasem Mutlaq

Definition at line 41 of file indifilterinterface.h.

Member Function Documentation

virtual bool INDI::FilterInterface::GetFilterNames ( const char *  groupName)
pure virtual

Obtains a list of filter names from the hardware and initilizes the FilterNameTP property. The function should check for the number of filters available in the filter wheel and build the FilterNameTP property accordingly.

Parameters
groupNamegroup name for FilterNameTP property to be created.
Returns
True if successful, false if unsupported or failed operation
See Also
QSI CCD implementation of the FilterInterface. QSI CCD is available as a 3rd party INDI driver.

Implemented in INDI::FilterWheel.

void INDI::FilterInterface::initFilterProperties ( const char *  deviceName,
const char *  groupName 
)
protected

Initilize filter wheel 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 filter wheel properties.

Definition at line 32 of file indifilterinterface.cpp.

void INDI::FilterInterface::processFilterName ( const char *  deviceName,
char *  texts[],
char *  names[],
int  n 
)
protected

Process client request to change filter name(s). Call this function in the filter wheel implementation class ISNewText() function.

Parameters
deviceNameName of the primary device
textsvalues from ISNewText().
namesnames from ISNewText();
nn from ISNewtext();

Definition at line 87 of file indifilterinterface.cpp.

void INDI::FilterInterface::processFilterSlot ( const char *  deviceName,
double  values[],
char *  names[] 
)
protected

Process client request to change filter position. Call this function in the filter wheel implementation class ISNewNumber function.

Parameters
deviceNameName of the primary device
valuesvalues from ISNewNumber().
namesnames from ISNewNumber();

Definition at line 55 of file indifilterinterface.cpp.

virtual bool INDI::FilterInterface::SelectFilter ( int  position)
pure virtual

Select a new filter position.

Returns
True if operation is successful, false otherwise

Implemented in INDI::FilterWheel.

void INDI::FilterInterface::SelectFilterDone ( int  newpos)

The child class calls this function when the hardware successfully finished selecting a new filter wheel position.

Parameters
newposNew position of the filter wheel

Definition at line 44 of file indifilterinterface.cpp.

virtual bool INDI::FilterInterface::SetFilterNames ( )
pure virtual

Set filter names as defined by the client for each filter position. The desired filter names are stored in FilterNameTP property. Filter names should be saved in hardware if possible.

Returns
True if successful, false if supported or failed operation

Implemented in INDI::FilterWheel.


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