27class PropertySwitchPrivate;
32 struct NewValues:
public std::map<std::string, ISState>
36 auto it = this->find(key);
37 return it != this->cend() && it->second == state;
47 void onNewValues(
const std::function<
void(
const NewValues &)> &callback);
50 bool update(
const ISState states[],
const char *
const names[],
int n);
51 bool isUpdated(
const ISState states[],
const char *
const names[],
int n)
const;
55 const char *
device,
const char *name,
const char *label,
const char *group,
64 bool isSwitchOn(
const std::string &name)
const;
std::string findOnSwitchName() const
void onNewValues(const std::function< void(const NewValues &)> &callback)
bool isSwitchOn(const std::string &name) const
bool update(const ISState states[], const char *const names[], int n)
bool hasUpdateCallback() const
const char * getRuleAsString() const
void setRule(ISRule rule)
INDI::WidgetViewSwitch * findOnSwitch() const
bool isUpdated(const ISState states[], const char *const names[], int n) const
int findOnSwitchIndex() const
void fill(const char *device, const char *name, const char *label, const char *group, IPerm permission, ISRule rule, double timeout, IPState state)
Provides generic container for INDI properties.
IPerm
Permission hint, with respect to client.
ISRule
Switch vector rule hint.
Namespace to encapsulate INDI client, drivers, and mediator classes.
bool contains(const std::string &key, const ISState &state) const