Instrument Neutral Distributed Interface INDI 2.2.5
Public Member Functions | List of all members
GeminiFlatpanelSimulationAdapter Class Reference

Simulation adapter for testing and development. More...

#include <gemini_flatpanel_adapters.h>

Inheritance diagram for GeminiFlatpanelSimulationAdapter:
GeminiFlatpanelAdapter

Public Member Functions

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

Detailed Description

Simulation adapter for testing and development.

This adapter simulates device behavior without requiring actual hardware. It can simulate either Rev1 or Rev2 features based on configuration.

Definition at line 658 of file gemini_flatpanel_adapters.h.

Constructor & Destructor Documentation

◆ GeminiFlatpanelSimulationAdapter()

GeminiFlatpanelSimulationAdapter::GeminiFlatpanelSimulationAdapter ( bool  simulateRev2Features = true)

Definition at line 1622 of file gemini_flatpanel_adapters.cpp.

Member Function Documentation

◆ closeCover()

bool GeminiFlatpanelSimulationAdapter::closeCover ( )
overridevirtual

Close the dust cover.

Returns
true if successful, false otherwise

Implements GeminiFlatpanelAdapter.

Definition at line 1726 of file gemini_flatpanel_adapters.cpp.

◆ getBrightness()

bool GeminiFlatpanelSimulationAdapter::getBrightness ( int *  brightness)
overridevirtual

Get the current brightness level.

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

Implements GeminiFlatpanelAdapter.

Definition at line 1691 of file gemini_flatpanel_adapters.cpp.

◆ getCommandTerminator()

char GeminiFlatpanelSimulationAdapter::getCommandTerminator ( ) const
overridevirtual

Get the command terminator character for this revision.

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

Implements GeminiFlatpanelAdapter.

Definition at line 1792 of file gemini_flatpanel_adapters.cpp.

◆ getConfigStatus()

bool GeminiFlatpanelSimulationAdapter::getConfigStatus ( int *  status)
overridevirtual

Get the current configuration status.

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

Implements GeminiFlatpanelAdapter.

Definition at line 1685 of file gemini_flatpanel_adapters.cpp.

◆ getFirmwareVersion()

bool GeminiFlatpanelSimulationAdapter::getFirmwareVersion ( int *  version)
overridevirtual

Get the firmware version from the device.

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

Implements GeminiFlatpanelAdapter.

Definition at line 1658 of file gemini_flatpanel_adapters.cpp.

◆ getRevision()

int GeminiFlatpanelSimulationAdapter::getRevision ( ) const
overridevirtual

Get the firmware revision this adapter supports.

Returns
revision number (1, 2, etc.)

Implements GeminiFlatpanelAdapter.

Definition at line 1653 of file gemini_flatpanel_adapters.cpp.

◆ getStatus()

bool GeminiFlatpanelSimulationAdapter::getStatus ( int *  coverStatus,
int *  lightStatus,
int *  motorStatus 
)
overridevirtual

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

Implements GeminiFlatpanelAdapter.

Definition at line 1732 of file gemini_flatpanel_adapters.cpp.

◆ lightOff()

bool GeminiFlatpanelSimulationAdapter::lightOff ( )
overridevirtual

Turn the light off.

Returns
true if successful, false otherwise

Implements GeminiFlatpanelAdapter.

Definition at line 1714 of file gemini_flatpanel_adapters.cpp.

◆ lightOn()

bool GeminiFlatpanelSimulationAdapter::lightOn ( )
overridevirtual

Turn the light on.

Returns
true if successful, false otherwise

Implements GeminiFlatpanelAdapter.

Definition at line 1708 of file gemini_flatpanel_adapters.cpp.

◆ move()

bool GeminiFlatpanelSimulationAdapter::move ( uint16_t  value,
int  direction 
)
overridevirtual

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

Implements GeminiFlatpanelAdapter.

Definition at line 1740 of file gemini_flatpanel_adapters.cpp.

◆ openCover()

bool GeminiFlatpanelSimulationAdapter::openCover ( )
overridevirtual

Open the dust cover.

Returns
true if successful, false otherwise

Implements GeminiFlatpanelAdapter.

Definition at line 1720 of file gemini_flatpanel_adapters.cpp.

◆ ping()

bool GeminiFlatpanelSimulationAdapter::ping ( )
overridevirtual

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

Returns
true if device responds correctly, false otherwise

Implements GeminiFlatpanelAdapter.

Definition at line 1647 of file gemini_flatpanel_adapters.cpp.

◆ setBeep()

bool GeminiFlatpanelSimulationAdapter::setBeep ( bool  enable)
overridevirtual

Enable or disable beep functionality.

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

Implements GeminiFlatpanelAdapter.

Definition at line 1765 of file gemini_flatpanel_adapters.cpp.

◆ setBrightness()

bool GeminiFlatpanelSimulationAdapter::setBrightness ( int  value)
overridevirtual

Set the brightness level.

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

Implements GeminiFlatpanelAdapter.

Definition at line 1697 of file gemini_flatpanel_adapters.cpp.

◆ setBrightnessMode()

bool GeminiFlatpanelSimulationAdapter::setBrightnessMode ( int  mode)
overridevirtual

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

Implements GeminiFlatpanelAdapter.

Definition at line 1776 of file gemini_flatpanel_adapters.cpp.

◆ setClosePosition()

bool GeminiFlatpanelSimulationAdapter::setClosePosition ( )
overridevirtual

Set the current position as the closed position.

Returns
true if successful, false otherwise

Implements GeminiFlatpanelAdapter.

Definition at line 1755 of file gemini_flatpanel_adapters.cpp.

◆ setOpenPosition()

bool GeminiFlatpanelSimulationAdapter::setOpenPosition ( )
overridevirtual

Set the current position as the open position.

Returns
true if successful, false otherwise

Implements GeminiFlatpanelAdapter.

Definition at line 1760 of file gemini_flatpanel_adapters.cpp.

◆ setupCommunication()

void GeminiFlatpanelSimulationAdapter::setupCommunication ( int  portFD)
overridevirtual

Set up communication parameters for this revision.

Parameters
portFDfile descriptor for the serial port

Implements GeminiFlatpanelAdapter.

Definition at line 1798 of file gemini_flatpanel_adapters.cpp.

◆ supportsBeep()

bool GeminiFlatpanelSimulationAdapter::supportsBeep ( ) const
overridevirtual

Check if device supports beep functionality.

Returns
true if beep is supported

Implements GeminiFlatpanelAdapter.

Definition at line 1670 of file gemini_flatpanel_adapters.cpp.

◆ supportsBrightnessMode()

bool GeminiFlatpanelSimulationAdapter::supportsBrightnessMode ( ) const
overridevirtual

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

Returns
true if brightness modes are supported

Implements GeminiFlatpanelAdapter.

Definition at line 1680 of file gemini_flatpanel_adapters.cpp.

◆ supportsDustCap()

bool GeminiFlatpanelSimulationAdapter::supportsDustCap ( ) const
overridevirtual

Check if device supports dust cap functionality.

Returns
true if dust cap is supported

Implements GeminiFlatpanelAdapter.

Definition at line 1675 of file gemini_flatpanel_adapters.cpp.


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