49 m_Capabilities = capabilities;
58 LightIntensityNP[0].fill(
"FLAT_LIGHT_INTENSITY_VALUE",
"Value",
"%.f", 0, 255, 10, 0);
62 ActiveDeviceTP[0].fill(
"ACTIVE_FILTER",
"Filter",
"Filter Simulator");
68 FilterIntensityNP.fill(m_DefaultDevice->getDeviceName(),
"FLAT_LIGHT_FILTER_INTENSITY",
"Filter Intensity",
"Preset",
IP_RW,
89 if (m_DefaultDevice->isConnected())
91 m_DefaultDevice->defineProperty(
LightSP);
99 m_DefaultDevice->deleteProperty(
LightSP);
115 if (strcmp(dev, m_DefaultDevice->getDeviceName()))
121 auto prevIndex =
LightSP.findOnSwitchIndex();
144 if (strcmp(dev, m_DefaultDevice->getDeviceName()))
174 for (
int i = 0; i <
n; i++)
175 addFilterDuration(names[i], values[i]);
196 if (strcmp(dev, m_DefaultDevice->getDeviceName()))
259 if (!strcmp(propTag,
"delProperty"))
262 if (!strcmp(propName,
"FILTER_NAME"))
266 uint32_t snoopCounter = 0;
267 bool isDifferent =
false;
300 if (m_DefaultDevice->isConnected())
310 else if (!strcmp(propName,
"FILTER_SLOT"))
320 if (!strcmp(elemName,
"FILTER_SLOT_VALUE"))
351void LightBoxInterface::addFilterDuration(
const char *filterName, uint16_t filterDuration)
Class to provide extended functionality for devices in addition to the functionality provided by INDI...
void initProperties(const char *group, uint32_t capabilities)
Initialize light box properties. It is recommended to call this function within initProperties() of y...
void ISGetProperties(const char *deviceName)
isGetLightBoxProperties Get light box properties
INDI::PropertyText ActiveDeviceTP
INDI::PropertyNumber LightIntensityNP
bool saveConfigItems(FILE *fp)
bool processSwitch(const char *dev, const char *name, ISState *states, char *names[], int n)
Process light box switch properties.
virtual bool EnableLightBox(bool enable)
EnableLightBox Turn on/off on a light box. Must be implemented in the child class.
bool processText(const char *dev, const char *name, char *texts[], char *names[], int n)
Process light box text properties.
virtual bool SetLightBoxBrightness(uint16_t value)
setBrightness Set light level. Must be implemented in the child class, if supported.
bool processNumber(const char *dev, const char *name, double values[], char *names[], int n)
Process light box number properties.
LightBoxInterface(DefaultDevice *device)
INDI::PropertySwitch LightSP
INDI::PropertyNumber FilterIntensityNP
virtual ~LightBoxInterface()
void push(WidgetView< T > &&item)
const char * OPTIONS_TAB
OPTIONS_TAB Where all the driver's options are located. Those may include auxiliary controls,...
void IDSnoopDevice(const char *snooped_device, const char *snooped_property)
Function a Driver calls to snoop on another Device. Snooped messages will then arrive via ISSnoopDevi...
*brief user defined string literal for JSON values *sa std::size_t n
const char * findXMLAttValu(XMLEle *ep, const char *name)
Find an XML element's attribute value.
XMLEle * nextXMLEle(XMLEle *ep, int init)
Iterate an XML element for a list of nesetd XML elements.
char * tagXMLEle(XMLEle *ep)
Return the tag of an XML element.
char * pcdataXMLEle(XMLEle *ep)
Return the pcdata of an XML element.
Namespace to encapsulate INDI client, drivers, and mediator classes.
INDI::WidgetViewNumber WidgetNumber