Instrument Neutral Distributed Interface INDI  2.0.2
Classes | Public Member Functions | List of all members
INDI::PropertySwitch Class Reference

#include <indipropertyswitch.h>

Inheritance diagram for INDI::PropertySwitch:
INDI::PropertyBasic< ISwitch > INDI::Property

Classes

struct  NewValues
 

Public Member Functions

 PropertySwitch (size_t count)
 
 PropertySwitch (INDI::Property property)
 
 ~PropertySwitch ()
 
void onNewValues (const std::function< void(const NewValues &)> &callback)
 
bool update (const ISState states[], const char *const names[], int n)
 
bool hasUpdateCallback () const
 
void fill (const char *device, const char *name, const char *label, const char *group, IPerm permission, ISRule rule, double timeout, IPState state)
 
void reset ()
 
int findOnSwitchIndex () const
 
INDI::WidgetViewSwitchfindOnSwitch () const
 
void setRule (ISRule rule)
 
ISRule getRule () const
 
const char * getRuleAsString () const
 
- Public Member Functions inherited from INDI::PropertyBasic< ISwitch >
 ~PropertyBasic ()
 
void setName (const char *name)
 
void setName (const std::string &name)
 
void setLabel (const char *label)
 
void setLabel (const std::string &label)
 
void setGroupName (const char *name)
 
void setGroupName (const std::string &name)
 
void setPermission (IPerm permission)
 
void setTimeout (double timeout)
 
void setState (IPState state)
 
void setTimestamp (const char *timestamp)
 
void setTimestamp (const std::string &timestamp)
 
const char * getName () const
 
const char * getLabel () const
 
const char * getGroupName () const
 
IPerm getPermission () const
 
const char * getPermissionAsString () const
 
double getTimeout () const
 
IPState getState () const
 
const char * getStateAsString () const
 
const char * getTimestamp () const
 
bool isEmpty () const
 
bool isNameMatch (const char *otherName) const
 
bool isNameMatch (const std::string &otherName) const
 
bool isLabelMatch (const char *otherLabel) const
 
bool isLabelMatch (const std::string &otherLabel) const
 
void save (FILE *f) const
 
void vapply (const char *format, va_list args) const
 
void vdefine (const char *format, va_list args) const
 
void apply (const char *format,...) const ATTRIBUTE_FORMAT_PRINTF(2
 
void void void apply () const
 
void void define (const char *format,...) const ATTRIBUTE_FORMAT_PRINTF(2
 
void define () const
 
size_t size () const
 
size_t count () const
 
void reserve (size_t size)
 
void resize (size_t size)
 
void shrink_to_fit ()
 
void push (WidgetView< ISwitch > &&item)
 
void push (const WidgetView< ISwitch > &item)
 
const WidgetView< ISwitch > * at (size_t index) const
 
WidgetView< ISwitch > & operator[] (ssize_t index) const
 
WidgetView< ISwitch > * begin ()
 
const WidgetView< ISwitch > * begin () const
 
WidgetView< ISwitch > * end ()
 
const WidgetView< ISwitch > * end () const
 
WidgetView< ISwitch > * find_if (Predicate pred)
 
const WidgetView< ISwitch > * find_if (Predicate pred) const
 
WidgetView< ISwitch > * findWidgetByName (const char *name) const
 
int findWidgetIndexByName (const char *name) const
 
INDI::PropertyView< ISwitch > * operator-> ()
 
INDI::PropertyView< ISwitchoperator* ()
 
- Public Member Functions inherited from INDI::Property
 Property ()
 
 ~Property ()
 
 Property (INDI::PropertyNumber property)
 
 Property (INDI::PropertyText property)
 
 Property (INDI::PropertySwitch property)
 
 Property (INDI::PropertyLight property)
 
 Property (INDI::PropertyBlob property)
 
 Property (INumberVectorProperty *property)
 
 Property (ITextVectorProperty *property)
 
 Property (ISwitchVectorProperty *property)
 
 Property (ILightVectorProperty *property)
 
 Property (IBLOBVectorProperty *property)
 
 Property (INDI::PropertyViewNumber *property)
 
 Property (INDI::PropertyViewText *property)
 
 Property (INDI::PropertyViewSwitch *property)
 
 Property (INDI::PropertyViewLight *property)
 
 Property (INDI::PropertyViewBlob *property)
 
void setProperty (void *)
 
void setType (INDI_PROPERTY_TYPE t)
 
void setRegistered (bool r)
 
void setDynamic (bool d)
 
void setBaseDevice (BaseDevice *idp)
 
void setBaseDevice (BaseDevice device)
 
void * getProperty () const
 
INDI_PROPERTY_TYPE getType () const
 
const char * getTypeAsString () const
 
bool getRegistered () const
 
bool isDynamic () const
 
BaseDevice getBaseDevice () const
 
void setName (const char *name)
 
void setLabel (const char *label)
 
void setGroupName (const char *groupName)
 
void setDeviceName (const char *deviceName)
 
void setTimestamp (const char *timestamp)
 
void setState (IPState state)
 
void setPermission (IPerm permission)
 
void setTimeout (double timeout)
 
const char * getName () const
 
const char * getLabel () const
 
const char * getGroupName () const
 
const char * getDeviceName () const
 
const char * getTimestamp () const
 
IPState getState () const
 
const char * getStateAsString () const
 
IPerm getPermission () const
 
bool isEmpty () const
 
bool isValid () const
 
bool isNameMatch (const char *otherName) const
 
bool isNameMatch (const std::string &otherName) const
 
bool isLabelMatch (const char *otherLabel) const
 
bool isLabelMatch (const std::string &otherLabel) const
 
bool isDeviceNameMatch (const char *otherDeviceName) const
 
bool isDeviceNameMatch (const std::string &otherDeviceName) const
 
bool isTypeMatch (INDI_PROPERTY_TYPE otherType) const
 
void onUpdate (const std::function< void()> &callback)
 
void emitUpdate ()
 
bool hasUpdateCallback () const
 
void save (FILE *fp) const
 
void apply (const char *format,...) const ATTRIBUTE_FORMAT_PRINTF(2
 
void void define (const char *format,...) const ATTRIBUTE_FORMAT_PRINTF(2
 
void void void apply () const
 
void define () const
 
INDI::PropertyViewNumbergetNumber () const
 
INDI::PropertyViewTextgetText () const
 
INDI::PropertyViewSwitchgetSwitch () const
 
INDI::PropertyViewLightgetLight () const
 
INDI::PropertyViewBlobgetBLOB () const
 
INDI::Propertyoperator-> ()
 
const INDI::Propertyoperator-> () const
 
 operator INDI::Property * ()
 
 operator const INDI::Property * () const
 
 operator INDI::PropertyViewNumber * () const
 
 operator INDI::PropertyViewText * () const
 
 operator INDI::PropertyViewSwitch * () const
 
 operator INDI::PropertyViewLight * () const
 
 operator INDI::PropertyViewBlob * () const
 
bool operator!= (std::nullptr_t) const
 
bool operator== (std::nullptr_t) const
 
 operator bool () const
 
 operator bool ()
 

Additional Inherited Members

- Public Types inherited from INDI::PropertyBasic< ISwitch >
using ViewType = ISwitch
 
- Protected Member Functions inherited from INDI::PropertyBasic< ISwitch >
PropertyView< ISwitch > * operator& ()
 
 PropertyBasic (PropertyBasicPrivate &dd)
 
 PropertyBasic (const std::shared_ptr< PropertyBasicPrivate > &dd)
 
- Protected Member Functions inherited from INDI::Property
 Property (const std::shared_ptr< PropertyPrivate > &dd)
 
 Property (PropertyPrivate &dd)
 
INDI::Propertyself ()
 
- Protected Attributes inherited from INDI::Property
std::shared_ptr< PropertyPrivated_ptr
 

Detailed Description

Examples
dome.h, raindetector.h, and simpleskeleton.cpp.

Definition at line 28 of file indipropertyswitch.h.

Constructor & Destructor Documentation

◆ PropertySwitch() [1/2]

INDI::PropertySwitch::PropertySwitch ( size_t  count)

Definition at line 32 of file indipropertyswitch.cpp.

◆ PropertySwitch() [2/2]

INDI::PropertySwitch::PropertySwitch ( INDI::Property  property)

Definition at line 36 of file indipropertyswitch.cpp.

◆ ~PropertySwitch()

INDI::PropertySwitch::~PropertySwitch ( )

Definition at line 40 of file indipropertyswitch.cpp.

Member Function Documentation

◆ fill()

void INDI::PropertySwitch::fill ( const char *  device,
const char *  name,
const char *  label,
const char *  group,
IPerm  permission,
ISRule  rule,
double  timeout,
IPState  state 
)
Examples
dome.cpp.

Definition at line 84 of file indipropertyswitch.cpp.

◆ findOnSwitch()

INDI::WidgetViewSwitch * INDI::PropertySwitch::findOnSwitch ( ) const

Definition at line 55 of file indipropertyswitch.cpp.

◆ findOnSwitchIndex()

int INDI::PropertySwitch::findOnSwitchIndex ( ) const
Examples
simpleskeleton.cpp.

Definition at line 49 of file indipropertyswitch.cpp.

◆ getRule()

ISRule INDI::PropertySwitch::getRule ( ) const

Definition at line 100 of file indipropertyswitch.cpp.

◆ getRuleAsString()

const char * INDI::PropertySwitch::getRuleAsString ( ) const

Definition at line 106 of file indipropertyswitch.cpp.

◆ hasUpdateCallback()

bool INDI::PropertySwitch::hasUpdateCallback ( ) const

Definition at line 78 of file indipropertyswitch.cpp.

◆ onNewValues()

void INDI::PropertySwitch::onNewValues ( const std::function< void(const NewValues &)> &  callback)

Definition at line 112 of file indipropertyswitch.cpp.

◆ reset()

void INDI::PropertySwitch::reset ( )

Definition at line 43 of file indipropertyswitch.cpp.

◆ setRule()

void INDI::PropertySwitch::setRule ( ISRule  rule)

Definition at line 94 of file indipropertyswitch.cpp.

◆ update()

bool INDI::PropertySwitch::update ( const ISState  states[],
const char *const  names[],
int  n 
)

Definition at line 61 of file indipropertyswitch.cpp.


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