|
Instrument Neutral Distributed Interface INDI
0.9.6
|
Class to provide general functionality of a filter wheel device. More...
#include <indifilterwheel.h>
Public Member Functions | |
| virtual bool | initProperties () |
| Initilize properties initial state and value. The child class must implement this function. | |
| virtual bool | updateProperties () |
| updateProperties is called whenever there is a change in the CONNECTION status of the driver. This will enable the driver to react to changes of switching ON/OFF a device. For example, a driver may only define a set of properties after a device is connected, but not before. | |
| virtual void | ISGetProperties (const char *dev) |
| define the driver's properties to the client. | |
| virtual bool | ISSnoopDevice (XMLEle *root) |
| Process a snoop event from INDI server. This function is called when a snooped property is updated in a snooped driver. | |
| virtual bool | ISNewSwitch (const char *dev, const char *name, ISState *states, char *names[], int n) |
| Process the client newSwitch command. | |
| virtual bool | ISNewNumber (const char *dev, const char *name, double values[], char *names[], int n) |
| Process the client newNumber command. | |
| virtual bool | ISNewText (const char *dev, const char *name, char *texts[], char *names[], int n) |
| Process the client newSwitch command. | |
Public Member Functions inherited from INDI::DefaultDevice | |
| void | addAuxControls () |
| Add Debug, Simulation, and Configuration options to the driver. | |
| void | addDebugControl () |
| Add Debug control to the driver. | |
| void | addSimulationControl () |
| Add Simulation control to the driver. | |
| void | addConfigurationControl () |
| Add Configuration control to the driver. | |
| void | resetProperties () |
| Set all properties to IDLE state. | |
| void | defineNumber (INumberVectorProperty *nvp) |
| Define number vector to client & register it. Alternatively, IDDefNumber can be used but the property will not get registered and the driver will not be able to save configuration files. | |
| void | defineText (ITextVectorProperty *tvp) |
| Define text vector to client & register it. Alternatively, IDDefText can be used but the property will not get registered and the driver will not be able to save configuration files. | |
| void | defineSwitch (ISwitchVectorProperty *svp) |
| Define switch vector to client & register it. Alternatively, IDDefswitch can be used but the property will not get registered and the driver will not be able to save configuration files. | |
| void | defineLight (ILightVectorProperty *lvp) |
| Define light vector to client & register it. Alternatively, IDDeflight can be used but the property will not get registered and the driver will not be able to save configuration files. | |
| void | defineBLOB (IBLOBVectorProperty *bvp) |
| Define BLOB vector to client & register it. Alternatively, IDDefBLOB can be used but the property will not get registered and the driver will not be able to save configuration files. | |
| virtual bool | deleteProperty (const char *propertyName) |
| Delete a property and unregister it. It will also be deleted from all clients. | |
| virtual void | setConnected (bool status, IPState state=IPS_OK, const char *msg=NULL) |
| Set connection switch status in the client. | |
| int | SetTimer (int ms) |
| Set a timer to call the function TimerHit after ms milliseconds. | |
| void | RemoveTimer (int id) |
| Remove timer added with SetTimer. | |
| virtual void | TimerHit () |
| Callback function to be called once SetTimer duration elapses. | |
| virtual const char * | getDriverName () |
| void | setVersion (unsigned int vMajor, unsigned int vMinor) |
| Set driver version information to be defined in DRIVER_INFO property as vMajor.vMinor. | |
| unsigned int | getMajorVersion () |
| unsigned int | getMinorVersion () |
| virtual bool | ISNewBLOB (const char *dev, const char *name, int sizes[], int blobsizes[], char *blobs[], char *formats[], char *names[], int n) |
| Process the client newBLOB command. | |
Public Member Functions inherited from INDI::BaseDevice | |
| INumberVectorProperty * | getNumber (const char *name) |
| ITextVectorProperty * | getText (const char *name) |
| ISwitchVectorProperty * | getSwitch (const char *name) |
| ILightVectorProperty * | getLight (const char *name) |
| IBLOBVectorProperty * | getBLOB (const char *name) |
| int | removeProperty (const char *name, char *errmsg) |
| Remove a property. | |
| void * | getRawProperty (const char *name, INDI_TYPE type=INDI_UNKNOWN) |
| Return a property and its type given its name. | |
| INDI::Property * | getProperty (const char *name, INDI_TYPE type=INDI_UNKNOWN) |
| Return a property and its type given its name. | |
| std::vector< INDI::Property * > * | getProperties () |
| Return a list of all properties in the device. | |
| void | buildSkeleton (const char *filename) |
| Build driver properties from a skeleton file. | |
| bool | isConnected () |
| void | setDeviceName (const char *dev) |
| Set the device name. | |
| const char * | getDeviceName () |
| void | addMessage (const char *msg) |
| Add message to the driver's message queue. | |
| const char * | messageQueue (int index) |
| const char * | lastMessage () |
| void | setMediator (INDI::BaseMediator *med) |
| Set the driver's mediator to receive notification of news devices and updated property values. | |
| INDI::BaseMediator * | getMediator () |
| const char * | getDriverExec () |
Public Member Functions inherited from INDI::FilterInterface | |
| void | SelectFilterDone (int newpos) |
| The child class calls this function when the hardware successfully finished selecting a new filter wheel position. | |
Protected Member Functions | |
| virtual int | QueryFilter () |
| Return current filter position. | |
| virtual bool | SelectFilter (int) |
| Select a new filter position. | |
| virtual bool | SetFilterNames () |
| Set filter names as defined by the client for each filter position. Filter names should be saved in hardware if possible. | |
| virtual bool | GetFilterNames (const char *groupName) |
| 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. | |
Protected Member Functions inherited from INDI::DefaultDevice | |
| virtual bool | loadConfig () |
| Load the last saved configuration file. | |
| virtual bool | saveConfig () |
| Save the current properties in a configuration file. | |
| virtual bool | loadDefaultConfig () |
| Load the default configuration file. | |
| void | setDebug (bool enable) |
| Toggle driver debug status. | |
| void | setSimulation (bool enable) |
| Toggle driver simulation status. | |
| bool | isDebug () |
| bool | isSimulation () |
| virtual bool | Connect ()=0 |
| Connect to a device. Child classes must implement this function and perform the connection routine in the function. | |
| virtual bool | Disconnect ()=0 |
| Disconnect from a device. Child classes must implement this function and perform the disconnection routine in the function. | |
| virtual const char * | getDefaultName ()=0 |
Protected Member Functions inherited from INDI::BaseDevice | |
| int | buildProp (XMLEle *root, char *errmsg) |
| Build a property given the supplied XML element (defXXX) | |
| int | setValue (XMLEle *root, char *errmsg) |
| handle SetXXX commands from client | |
| int | setBLOB (IBLOBVectorProperty *pp, XMLEle *root, char *errmsg) |
| Parse and store BLOB in the respective vector. | |
Protected Member Functions inherited from INDI::FilterInterface | |
| 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. | |
| void | processFilterProperties (const char *name, double values[], char *names[], int n) |
| Process client request to change filter position. Call this function in the filter wheel implementation class ISNewNumber function. This is a convenience function only, you can process FilterSlotNP in the child class. | |
Additional Inherited Members | |
Public Types inherited from INDI::BaseDevice | |
| enum | INDI_ERROR { INDI_DEVICE_NOT_FOUND = -1, INDI_PROPERTY_INVALID = -2, INDI_PROPERTY_DUPLICATED = -3, INDI_DISPATCH_ERROR = -4 } |
Class to provide general functionality of a filter wheel device.
Developers need to subclass INDI::FilterWheel to implement any driver for filter wheels within INDI.
Definition at line 34 of file indifilterwheel.h.
|
protectedvirtual |
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.
| groupName | group name for FilterNameTP property to be created. |
Implements INDI::FilterInterface.
Definition at line 182 of file indifilterwheel.cpp.
|
virtual |
Initilize properties initial state and value. The child class must implement this function.
Reimplemented from INDI::DefaultDevice.
Definition at line 35 of file indifilterwheel.cpp.
|
virtual |
define the driver's properties to the client.
| dev | name of the device |
Reimplemented from INDI::DefaultDevice.
Definition at line 44 of file indifilterwheel.cpp.
|
virtual |
Process the client newNumber command.
Reimplemented from INDI::DefaultDevice.
Definition at line 84 of file indifilterwheel.cpp.
|
virtual |
Process the client newSwitch command.
Reimplemented from INDI::DefaultDevice.
Definition at line 79 of file indifilterwheel.cpp.
|
virtual |
Process the client newSwitch command.
Reimplemented from INDI::DefaultDevice.
Definition at line 126 of file indifilterwheel.cpp.
|
virtual |
Process a snoop event from INDI server. This function is called when a snooped property is updated in a snooped driver.
Reimplemented from INDI::DefaultDevice.
Definition at line 188 of file indifilterwheel.cpp.
|
protectedvirtual |
Select a new filter position.
Implements INDI::FilterInterface.
Definition at line 171 of file indifilterwheel.cpp.
|
protectedvirtual |
Set filter names as defined by the client for each filter position. Filter names should be saved in hardware if possible.
Implements INDI::FilterInterface.
Definition at line 176 of file indifilterwheel.cpp.
|
virtual |
updateProperties is called whenever there is a change in the CONNECTION status of the driver. This will enable the driver to react to changes of switching ON/OFF a device. For example, a driver may only define a set of properties after a device is connected, but not before.
Reimplemented from INDI::DefaultDevice.
Definition at line 59 of file indifilterwheel.cpp.
1.8.1.2