25static std::unique_ptr<ManualFilter> manual_filter(
new ManualFilter());
29 return static_cast<const char *
>(
"Manual Filter");
44 MaxFiltersNP[0].
fill(
"MAX",
"Filters",
"%.f", 1, 16, 1, 5);
57 std::vector<std::string> labels, values;
60 labels.push_back(oneFilter.getLabel());
61 values.push_back(oneFilter.getText());
68 for (uint8_t i = 0; i < labels.size(); i++)
85 FilterSetSP[0].
fill(
"FILTER_SET",
"Filter is set",
ISS_OFF);
89 SyncNP[0].
fill(
"TARGET_FILTER",
"Target Filter",
"%.f", 1, 16, 1, 0);
123 SyncNP.
update(values, names, n);
136 MaxFiltersNP.
update(values, names, n);
140 MaxFiltersNP.
apply();
189 MaxFiltersNP.
save(fp);
INDI::PropertyText getText(const char *name) const
virtual bool saveConfig(bool silent=false, const char *property=nullptr)
Save the current properties in a configuration file.
virtual bool deleteProperty(const char *propertyName)
Delete a property and unregister it. It will also be deleted from all clients.
void defineProperty(INumberVectorProperty *property)
INDI::PropertyNumber FilterSlotNP
INDI::PropertyText FilterNameTP
void generateSampleFilters()
generateSampleFilters Generate sample 8-filter wheel and fill it sample filters
void SelectFilterDone(int newpos)
The child class calls this function when the hardware successfully finished selecting a new filter wh...
virtual void ISGetProperties(const char *dev) override
define the driver's properties to the client. Usually, only a minimum set of properties are defined t...
virtual bool updateProperties() override
updateProperties is called whenever there is a change in the CONNECTION status of the driver....
virtual bool ISNewSwitch(const char *dev, const char *name, ISState *states, char *names[], int n) override
Process the client newSwitch command.
virtual bool initProperties() override
Initialize properties initial state and value. The child class must implement this function.
virtual bool saveConfigItems(FILE *fp) override
saveConfigItems Save specific properties in the provide config file handler. Child class usually over...
virtual bool ISNewNumber(const char *dev, const char *name, double values[], char *names[], int n) override
Process the client newNumber command.
void setState(IPState state)
void apply(const char *format,...) const ATTRIBUTE_FORMAT_PRINTF(2
bool load()
load Attempt to load property values from configuration file.
void save(FILE *f) const
save Save property to configuration file.
void setLabel(const char *label)
bool isNameMatch(const char *otherName) const
bool update(const double values[], const char *const names[], int n)
void fill(const char *device, const char *name, const char *label, const char *group, IPerm permission, double timeout, IPState state)
void fill(const char *device, const char *name, const char *label, const char *group, IPerm permission, ISRule rule, double timeout, IPState state)
Manual filter enables users from changing filter wheels manually.
bool initProperties() override
Initialize properties initial state and value. The child class must implement this function.
virtual bool Connect() override
Connect to the device. INDI::DefaultDevice implementation connects to appropriate connection interfac...
bool updateProperties() override
updateProperties is called whenever there is a change in the CONNECTION status of the driver....
virtual bool SelectFilter(int) override
Select a new filter position.
const char * getDefaultName() override
virtual bool ISNewSwitch(const char *dev, const char *name, ISState *states, char *names[], int n) override
Process the client newSwitch command.
virtual bool ISNewNumber(const char *dev, const char *name, double values[], char *names[], int n) override
Process the client newNumber command.
virtual bool saveConfigItems(FILE *fp) override
saveConfigItems Save specific properties in the provide config file handler. Child class usually over...
void ISGetProperties(const char *dev) override
define the driver's properties to the client. Usually, only a minimum set of properties are defined t...
virtual bool Disconnect() override
Disconnect from device.
const char * MAIN_CONTROL_TAB
MAIN_CONTROL_TAB Where all the primary controls for the device are located.
#define LOGF_INFO(fmt,...)