TwiceAsNice  2019-02-18
Public Types | Protected Member Functions | Protected Attributes | Private Member Functions | Private Attributes | List of all members
INDI::LightBoxInterface Class Reference

#include <indilightboxinterface.h>

Inheritance diagram for INDI::LightBoxInterface:
Inheritance graph
Collaboration diagram for INDI::LightBoxInterface:
Collaboration graph

Public Types

enum  { FLAT_LIGHT_ON, FLAT_LIGHT_OFF }
 
enum  { FLAT_LIGHT_ON, FLAT_LIGHT_OFF }
 

Protected Member Functions

 LightBoxInterface (DefaultDevice *device, bool isDimmable)
 
virtual ~LightBoxInterface ()
 
void initLightBoxProperties (const char *deviceName, const char *groupNam)
 Initilize light box properties. More...
 
void isGetLightBoxProperties (const char *deviceName)
 isGetLightBoxProperties Get light box properties More...
 
bool processLightBoxSwitch (const char *dev, const char *name, ISState *states, char *names[], int n)
 Process light box switch properties. More...
 
bool processLightBoxNumber (const char *dev, const char *name, double values[], char *names[], int n)
 Process light box number properties. More...
 
bool processLightBoxText (const char *dev, const char *name, char *texts[], char *names[], int n)
 Process light box text properties. More...
 
bool updateLightBoxProperties ()
 
bool saveLightBoxConfigItems (FILE *fp)
 
bool snoopLightBox (XMLEle *root)
 
virtual bool SetLightBoxBrightness (uint16_t value)
 setBrightness Set light level. More...
 
virtual bool EnableLightBox (bool enable)
 EnableLightBox Turn on/off on a light box. More...
 
 LightBoxInterface (DefaultDevice *device, bool isDimmable)
 
virtual ~LightBoxInterface ()
 
void initLightBoxProperties (const char *deviceName, const char *groupNam)
 Initilize light box properties. More...
 
void isGetLightBoxProperties (const char *deviceName)
 isGetLightBoxProperties Get light box properties More...
 
bool processLightBoxSwitch (const char *dev, const char *name, ISState *states, char *names[], int n)
 Process light box switch properties. More...
 
bool processLightBoxNumber (const char *dev, const char *name, double values[], char *names[], int n)
 Process light box number properties. More...
 
bool processLightBoxText (const char *dev, const char *name, char *texts[], char *names[], int n)
 Process light box text properties. More...
 
bool updateLightBoxProperties ()
 
bool saveLightBoxConfigItems (FILE *fp)
 
bool snoopLightBox (XMLEle *root)
 
virtual bool SetLightBoxBrightness (uint16_t value)
 setBrightness Set light level. More...
 
virtual bool EnableLightBox (bool enable)
 EnableLightBox Turn on/off on a light box. More...
 

Protected Attributes

ISwitchVectorProperty LightSP
 
ISwitch LightS [2]
 
INumberVectorProperty LightIntensityNP
 
INumber LightIntensityN [1]
 
ITextVectorProperty ActiveDeviceTP
 
IText ActiveDeviceT [1] {}
 
INumberVectorProperty FilterIntensityNP
 
INumberFilterIntensityN
 

Private Member Functions

void addFilterDuration (const char *filterName, uint16_t filterDuration)
 
void addFilterDuration (const char *filterName, uint16_t filterDuration)
 

Private Attributes

DefaultDevicedevice
 
uint8_t currentFilterSlot
 
bool isDimmable
 

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
FLAT_LIGHT_ON 
FLAT_LIGHT_OFF 

◆ anonymous enum

anonymous enum
Enumerator
FLAT_LIGHT_ON 
FLAT_LIGHT_OFF 

Constructor & Destructor Documentation

◆ LightBoxInterface() [1/2]

LightBoxInterface::LightBoxInterface ( DefaultDevice device,
bool  isDimmable 
)
protected

◆ ~LightBoxInterface() [1/2]

LightBoxInterface::~LightBoxInterface ( )
protectedvirtual

◆ LightBoxInterface() [2/2]

INDI::LightBoxInterface::LightBoxInterface ( DefaultDevice device,
bool  isDimmable 
)
protected

◆ ~LightBoxInterface() [2/2]

virtual INDI::LightBoxInterface::~LightBoxInterface ( )
protectedvirtual

Member Function Documentation

◆ addFilterDuration() [1/2]

void LightBoxInterface::addFilterDuration ( const char *  filterName,
uint16_t  filterDuration 
)
private

◆ addFilterDuration() [2/2]

void INDI::LightBoxInterface::addFilterDuration ( const char *  filterName,
uint16_t  filterDuration 
)
private

◆ EnableLightBox() [1/2]

bool LightBoxInterface::EnableLightBox ( bool  enable)
protectedvirtual

EnableLightBox Turn on/off on a light box.

Must be impelemented in the child class.

Parameters
enableIf true, turn on the light, otherwise turn off the light.
Returns
True if successful, false otherwise.

Reimplemented in SnapCap, and FlipFlat.

◆ EnableLightBox() [2/2]

virtual bool INDI::LightBoxInterface::EnableLightBox ( bool  enable)
protectedvirtual

EnableLightBox Turn on/off on a light box.

Must be impelemented in the child class.

Parameters
enableIf true, turn on the light, otherwise turn off the light.
Returns
True if successful, false otherwise.

Reimplemented in SnapCap, and FlipFlat.

◆ initLightBoxProperties() [1/2]

void LightBoxInterface::initLightBoxProperties ( const char *  deviceName,
const char *  groupNam 
)
protected

Initilize light box 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 light box properties.

◆ initLightBoxProperties() [2/2]

void INDI::LightBoxInterface::initLightBoxProperties ( const char *  deviceName,
const char *  groupNam 
)
protected

Initilize light box 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 light box properties.

◆ isGetLightBoxProperties() [1/2]

void LightBoxInterface::isGetLightBoxProperties ( const char *  deviceName)
protected

isGetLightBoxProperties Get light box properties

Parameters
deviceNameparent device name

◆ isGetLightBoxProperties() [2/2]

void INDI::LightBoxInterface::isGetLightBoxProperties ( const char *  deviceName)
protected

isGetLightBoxProperties Get light box properties

Parameters
deviceNameparent device name

◆ processLightBoxNumber() [1/2]

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

Process light box number properties.

◆ processLightBoxNumber() [2/2]

bool INDI::LightBoxInterface::processLightBoxNumber ( const char *  dev,
const char *  name,
double  values[],
char *  names[],
int  n 
)
protected

Process light box number properties.

◆ processLightBoxSwitch() [1/2]

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

Process light box switch properties.

◆ processLightBoxSwitch() [2/2]

bool INDI::LightBoxInterface::processLightBoxSwitch ( const char *  dev,
const char *  name,
ISState states,
char *  names[],
int  n 
)
protected

Process light box switch properties.

◆ processLightBoxText() [1/2]

bool INDI::LightBoxInterface::processLightBoxText ( const char *  dev,
const char *  name,
char *  texts[],
char *  names[],
int  n 
)
protected

Process light box text properties.

◆ processLightBoxText() [2/2]

bool LightBoxInterface::processLightBoxText ( const char *  dev,
const char *  name,
char *  texts[],
char *  names[],
int  n 
)
protected

Process light box text properties.

◆ saveLightBoxConfigItems() [1/2]

bool INDI::LightBoxInterface::saveLightBoxConfigItems ( FILE *  fp)
protected

◆ saveLightBoxConfigItems() [2/2]

bool LightBoxInterface::saveLightBoxConfigItems ( FILE *  fp)
protected

◆ SetLightBoxBrightness() [1/2]

virtual bool INDI::LightBoxInterface::SetLightBoxBrightness ( uint16_t  value)
protectedvirtual

setBrightness Set light level.

Must be impelemented in the child class, if supported.

Parameters
valuelevel of light box
Returns
True if successful, false otherwise.

Reimplemented in SnapCap, and FlipFlat.

◆ SetLightBoxBrightness() [2/2]

bool LightBoxInterface::SetLightBoxBrightness ( uint16_t  value)
protectedvirtual

setBrightness Set light level.

Must be impelemented in the child class, if supported.

Parameters
valuelevel of light box
Returns
True if successful, false otherwise.

Reimplemented in SnapCap, and FlipFlat.

◆ snoopLightBox() [1/2]

bool LightBoxInterface::snoopLightBox ( XMLEle root)
protected

◆ snoopLightBox() [2/2]

bool INDI::LightBoxInterface::snoopLightBox ( XMLEle root)
protected

◆ updateLightBoxProperties() [1/2]

bool LightBoxInterface::updateLightBoxProperties ( )
protected

◆ updateLightBoxProperties() [2/2]

bool INDI::LightBoxInterface::updateLightBoxProperties ( )
protected

Member Data Documentation

◆ ActiveDeviceT

IText LightBoxInterface::ActiveDeviceT {}
protected

◆ ActiveDeviceTP

ITextVectorProperty LightBoxInterface::ActiveDeviceTP
protected

◆ currentFilterSlot

uint8_t LightBoxInterface::currentFilterSlot
private

◆ device

DefaultDevice * LightBoxInterface::device
private

◆ FilterIntensityN

INumber * LightBoxInterface::FilterIntensityN
protected

◆ FilterIntensityNP

INumberVectorProperty LightBoxInterface::FilterIntensityNP
protected

◆ isDimmable

bool LightBoxInterface::isDimmable
private

◆ LightIntensityN

INumber LightBoxInterface::LightIntensityN
protected

◆ LightIntensityNP

INumberVectorProperty LightBoxInterface::LightIntensityNP
protected

◆ LightS

ISwitch LightBoxInterface::LightS
protected

◆ LightSP

ISwitchVectorProperty LightBoxInterface::LightSP
protected

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