Instrument Neutral Distributed Interface INDI 2.2.5
Public Member Functions | List of all members
GeminiFlatpanelAdapter Class Referenceabstract

Abstract adapter interface for Gemini Flatpanel firmware versions. More...

#include <gemini_flatpanel_adapters.h>

Inheritance diagram for GeminiFlatpanelAdapter:
GeminiFlatpanelLiteAdapter GeminiFlatpanelProAdapter GeminiFlatpanelRev1Adapter GeminiFlatpanelRev2Adapter GeminiFlatpanelSimulationAdapter

Public Member Functions

virtual ~GeminiFlatpanelAdapter ()=default
 
virtual bool ping ()=0
 Ping the device to check if it responds to this adapter's protocol.
 
virtual int getRevision () const =0
 Get the firmware revision this adapter supports.
 
virtual bool getFirmwareVersion (int *version)=0
 Get the firmware version from the device.
 
virtual bool supportsBeep () const =0
 Check if device supports beep functionality.
 
virtual bool supportsDustCap () const =0
 Check if device supports dust cap functionality.
 
virtual bool supportsBrightnessMode () const =0
 Check if device supports brightness mode selection (high/low)
 
virtual bool getConfigStatus (int *status)=0
 Get the current configuration status.
 
virtual bool getBrightness (int *brightness)=0
 Get the current brightness level.
 
virtual bool setBrightness (int value)=0
 Set the brightness level.
 
virtual bool lightOn ()=0
 Turn the light on.
 
virtual bool lightOff ()=0
 Turn the light off.
 
virtual bool openCover ()=0
 Open the dust cover.
 
virtual bool closeCover ()=0
 Close the dust cover.
 
virtual bool getStatus (int *coverStatus, int *lightStatus, int *motorStatus)=0
 Get the current device status.
 
virtual bool move (uint16_t value, int direction)=0
 Move the cover by a specified amount.
 
virtual bool setClosePosition ()=0
 Set the current position as the closed position.
 
virtual bool setOpenPosition ()=0
 Set the current position as the open position.
 
virtual bool setBeep (bool enable)=0
 Enable or disable beep functionality.
 
virtual bool setBrightnessMode (int mode)=0
 Set the brightness mode (high/low)
 
virtual char getCommandTerminator () const =0
 Get the command terminator character for this revision.
 
virtual void setupCommunication (int portFD)=0
 Set up communication parameters for this revision.
 

Detailed Description

Abstract adapter interface for Gemini Flatpanel firmware versions.

This interface abstracts the differences between firmware revisions, providing a uniform command-oriented API for the main driver to use.

Definition at line 79 of file gemini_flatpanel_adapters.h.

Constructor & Destructor Documentation

◆ ~GeminiFlatpanelAdapter()

virtual GeminiFlatpanelAdapter::~GeminiFlatpanelAdapter ( )
virtualdefault

Member Function Documentation

◆ closeCover()

virtual bool GeminiFlatpanelAdapter::closeCover ( )
pure virtual

Close the dust cover.

Returns
true if successful, false otherwise

Implemented in GeminiFlatpanelRev1Adapter, GeminiFlatpanelRev2Adapter, GeminiFlatpanelLiteAdapter, GeminiFlatpanelProAdapter, and GeminiFlatpanelSimulationAdapter.

◆ getBrightness()

virtual bool GeminiFlatpanelAdapter::getBrightness ( int *  brightness)
pure virtual

Get the current brightness level.

Parameters
brightnesspointer to store the brightness value (0-255)
Returns
true if successful, false otherwise

Implemented in GeminiFlatpanelRev1Adapter, GeminiFlatpanelRev2Adapter, GeminiFlatpanelLiteAdapter, GeminiFlatpanelProAdapter, and GeminiFlatpanelSimulationAdapter.

◆ getCommandTerminator()

virtual char GeminiFlatpanelAdapter::getCommandTerminator ( ) const
pure virtual

Get the command terminator character for this revision.

Returns
terminator character ('
' for rev1, '#' for rev2)

Implemented in GeminiFlatpanelRev1Adapter, GeminiFlatpanelRev2Adapter, GeminiFlatpanelLiteAdapter, GeminiFlatpanelProAdapter, and GeminiFlatpanelSimulationAdapter.

◆ getConfigStatus()

virtual bool GeminiFlatpanelAdapter::getConfigStatus ( int *  status)
pure virtual

Get the current configuration status.

Parameters
statuspointer to store the configuration status
Returns
true if successful, false otherwise

Implemented in GeminiFlatpanelRev1Adapter, GeminiFlatpanelRev2Adapter, GeminiFlatpanelLiteAdapter, GeminiFlatpanelProAdapter, and GeminiFlatpanelSimulationAdapter.

◆ getFirmwareVersion()

virtual bool GeminiFlatpanelAdapter::getFirmwareVersion ( int *  version)
pure virtual

Get the firmware version from the device.

Parameters
versionpointer to store the firmware version
Returns
true if successful, false otherwise

Implemented in GeminiFlatpanelRev1Adapter, GeminiFlatpanelRev2Adapter, GeminiFlatpanelLiteAdapter, GeminiFlatpanelProAdapter, and GeminiFlatpanelSimulationAdapter.

◆ getRevision()

virtual int GeminiFlatpanelAdapter::getRevision ( ) const
pure virtual

Get the firmware revision this adapter supports.

Returns
revision number (1, 2, etc.)

Implemented in GeminiFlatpanelRev1Adapter, GeminiFlatpanelRev2Adapter, GeminiFlatpanelLiteAdapter, GeminiFlatpanelProAdapter, and GeminiFlatpanelSimulationAdapter.

◆ getStatus()

virtual bool GeminiFlatpanelAdapter::getStatus ( int *  coverStatus,
int *  lightStatus,
int *  motorStatus 
)
pure virtual

Get the current device status.

Parameters
coverStatuspointer to store cover status
lightStatuspointer to store light status
motorStatuspointer to store motor status
Returns
true if successful, false otherwise

Implemented in GeminiFlatpanelRev1Adapter, GeminiFlatpanelRev2Adapter, GeminiFlatpanelLiteAdapter, GeminiFlatpanelProAdapter, and GeminiFlatpanelSimulationAdapter.

◆ lightOff()

virtual bool GeminiFlatpanelAdapter::lightOff ( )
pure virtual

Turn the light off.

Returns
true if successful, false otherwise

Implemented in GeminiFlatpanelRev1Adapter, GeminiFlatpanelRev2Adapter, GeminiFlatpanelLiteAdapter, GeminiFlatpanelProAdapter, and GeminiFlatpanelSimulationAdapter.

◆ lightOn()

virtual bool GeminiFlatpanelAdapter::lightOn ( )
pure virtual

Turn the light on.

Returns
true if successful, false otherwise

Implemented in GeminiFlatpanelRev1Adapter, GeminiFlatpanelRev2Adapter, GeminiFlatpanelLiteAdapter, GeminiFlatpanelProAdapter, and GeminiFlatpanelSimulationAdapter.

◆ move()

virtual bool GeminiFlatpanelAdapter::move ( uint16_t  value,
int  direction 
)
pure virtual

Move the cover by a specified amount.

Parameters
valuenumber of steps to move
directiondirection of movement (1 for open, -1 for close)
Returns
true if successful, false otherwise

Implemented in GeminiFlatpanelRev1Adapter, GeminiFlatpanelRev2Adapter, GeminiFlatpanelLiteAdapter, GeminiFlatpanelProAdapter, and GeminiFlatpanelSimulationAdapter.

◆ openCover()

virtual bool GeminiFlatpanelAdapter::openCover ( )
pure virtual

Open the dust cover.

Returns
true if successful, false otherwise

Implemented in GeminiFlatpanelRev1Adapter, GeminiFlatpanelRev2Adapter, GeminiFlatpanelLiteAdapter, GeminiFlatpanelProAdapter, and GeminiFlatpanelSimulationAdapter.

◆ ping()

virtual bool GeminiFlatpanelAdapter::ping ( )
pure virtual

Ping the device to check if it responds to this adapter's protocol.

Returns
true if device responds correctly, false otherwise

Implemented in GeminiFlatpanelRev1Adapter, GeminiFlatpanelRev2Adapter, GeminiFlatpanelLiteAdapter, GeminiFlatpanelProAdapter, and GeminiFlatpanelSimulationAdapter.

◆ setBeep()

virtual bool GeminiFlatpanelAdapter::setBeep ( bool  enable)
pure virtual

Enable or disable beep functionality.

Parameters
enabletrue to enable beep, false to disable
Returns
true if successful, false if not supported or failed

Implemented in GeminiFlatpanelRev1Adapter, GeminiFlatpanelRev2Adapter, GeminiFlatpanelLiteAdapter, GeminiFlatpanelProAdapter, and GeminiFlatpanelSimulationAdapter.

◆ setBrightness()

virtual bool GeminiFlatpanelAdapter::setBrightness ( int  value)
pure virtual

Set the brightness level.

Parameters
valuebrightness value (0-255)
Returns
true if successful, false otherwise

Implemented in GeminiFlatpanelRev1Adapter, GeminiFlatpanelRev2Adapter, GeminiFlatpanelLiteAdapter, GeminiFlatpanelProAdapter, and GeminiFlatpanelSimulationAdapter.

◆ setBrightnessMode()

virtual bool GeminiFlatpanelAdapter::setBrightnessMode ( int  mode)
pure virtual

Set the brightness mode (high/low)

Parameters
modebrightness mode (GEMINI_BRIGHTNESS_MODE_LOW or GEMINI_BRIGHTNESS_MODE_HIGH)
Returns
true if successful, false if not supported or failed

Implemented in GeminiFlatpanelRev1Adapter, GeminiFlatpanelRev2Adapter, GeminiFlatpanelLiteAdapter, GeminiFlatpanelProAdapter, and GeminiFlatpanelSimulationAdapter.

◆ setClosePosition()

virtual bool GeminiFlatpanelAdapter::setClosePosition ( )
pure virtual

Set the current position as the closed position.

Returns
true if successful, false otherwise

Implemented in GeminiFlatpanelRev1Adapter, GeminiFlatpanelRev2Adapter, GeminiFlatpanelLiteAdapter, GeminiFlatpanelProAdapter, and GeminiFlatpanelSimulationAdapter.

◆ setOpenPosition()

virtual bool GeminiFlatpanelAdapter::setOpenPosition ( )
pure virtual

Set the current position as the open position.

Returns
true if successful, false otherwise

Implemented in GeminiFlatpanelRev1Adapter, GeminiFlatpanelRev2Adapter, GeminiFlatpanelLiteAdapter, GeminiFlatpanelProAdapter, and GeminiFlatpanelSimulationAdapter.

◆ setupCommunication()

virtual void GeminiFlatpanelAdapter::setupCommunication ( int  portFD)
pure virtual

Set up communication parameters for this revision.

Parameters
portFDfile descriptor for the serial port

Implemented in GeminiFlatpanelRev1Adapter, GeminiFlatpanelRev2Adapter, GeminiFlatpanelLiteAdapter, GeminiFlatpanelProAdapter, and GeminiFlatpanelSimulationAdapter.

◆ supportsBeep()

virtual bool GeminiFlatpanelAdapter::supportsBeep ( ) const
pure virtual

Check if device supports beep functionality.

Returns
true if beep is supported

Implemented in GeminiFlatpanelRev1Adapter, GeminiFlatpanelRev2Adapter, GeminiFlatpanelLiteAdapter, GeminiFlatpanelProAdapter, and GeminiFlatpanelSimulationAdapter.

◆ supportsBrightnessMode()

virtual bool GeminiFlatpanelAdapter::supportsBrightnessMode ( ) const
pure virtual

Check if device supports brightness mode selection (high/low)

Returns
true if brightness modes are supported

Implemented in GeminiFlatpanelRev1Adapter, GeminiFlatpanelRev2Adapter, GeminiFlatpanelLiteAdapter, GeminiFlatpanelProAdapter, and GeminiFlatpanelSimulationAdapter.

◆ supportsDustCap()

virtual bool GeminiFlatpanelAdapter::supportsDustCap ( ) const
pure virtual

Check if device supports dust cap functionality.

Returns
true if dust cap is supported

Implemented in GeminiFlatpanelRev1Adapter, GeminiFlatpanelRev2Adapter, GeminiFlatpanelLiteAdapter, GeminiFlatpanelProAdapter, and GeminiFlatpanelSimulationAdapter.


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