53 for (
size_t i = 0; i < Outputs; i++)
55 auto label = prefix +
" #" + std::to_string(i + 1);
57 oneDuration[0].
fill(
"DURATION",
"Duration (ms)",
"%.0f", 0, 60000, 100, 0);
66 for (
auto i = 0; i < Outputs; i++)
68 auto name =
"DIGITAL_OUTPUT_" + std::to_string(i + 1);
69 auto label = prefix +
" #" + std::to_string(i + 1);
72 oneLabel.
fill(name, label, label);
84 for (
size_t i = 0; i < Outputs; i++)
86 auto name =
"DIGITAL_OUTPUT_" + std::to_string(i + 1);
87 auto label = prefix +
" #" + std::to_string(i + 1);
141 if (oldState != newState)
239 oneDuration.save(fp);
const char * getDeviceName() const
Class to provide extended functionality for devices in addition to the functionality provided by INDI...
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)
bool processNumber(const char *dev, const char *name, double values[], char *names[], int n)
Process number properties.
void initProperties(const char *groupName, uint8_t outputs, const std::string &prefix="Output")
Initialize filter wheel properties. It is recommended to call this function within initProperties() o...
bool processSwitch(const char *dev, const char *name, ISState states[], char *names[], int n)
Process switch properties.
OutputInterface(DefaultDevice *defaultDevice)
OutputInterface Initiailize Output Interface.
bool saveConfigItems(FILE *fp)
saveConfigItems save Filter Names in config file
std::vector< INDI::PropertySwitch > DigitalOutputsSP
bool processText(const char *dev, const char *name, char *texts[], char *names[], int n)
Process text properties.
virtual bool CommandOutput(uint32_t index, OutputState command)=0
Send command to output.
INDI::PropertyText DigitalOutputLabelsTP
std::vector< INDI::PropertyNumber > PulseDurationNP
bool updateProperties()
updateProperties Defines or Delete properties based on default device connection status
bool m_DigitalOutputLabelsConfig
DefaultDevice * m_defaultDevice
void push(WidgetView< T > &&item)
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.
bool isNameMatch(const char *otherName) const
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)
bool update(const char *const texts[], 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)
INDI::PropertyViewText * getText() const
static void singleShot(int msec, const std::function< void()> &callback)
This static function calls a the given function after a given time interval.
Namespace to encapsulate INDI client, drivers, and mediator classes.
void fill(const char *device, const char *name, const char *label, const char *group, IPerm permission, double timeout, IPState state)
void fill(const char *name, const char *label, const char *initialText)