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

#include <watchdeviceproperty.h>

Classes

struct  DeviceInfo
 

Public Member Functions

std::vector< BaseDevicegetDevices () const
 
BaseDevice getDeviceByName (const char *name)
 
DeviceInfoensureDeviceByName (const char *name, const std::function< ParentDevice()> &constructor)
 
bool isEmpty () const
 
bool isDeviceWatched (const char *deviceName) const
 checks if the device is being watched by something More...
 
void unwatchDevices ()
 
void watchDevice (const std::string &deviceName)
 
void watchDevice (const std::string &deviceName, const std::function< void(BaseDevice)> &callback)
 
void watchProperty (const std::string &deviceName, const std::string &propertyName)
 
void clear ()
 
void clearDevices ()
 
bool deleteDevice (const BaseDevice &device)
 
int processXml (const INDI::LilXmlElement &root, char *errmsg, const std::function< ParentDevice()> &constructor=[] { return ParentDevice(ParentDevice::Valid);})
 
std::map< std::string, DeviceInfo >::iterator begin ()
 
std::map< std::string, DeviceInfo >::iterator end ()
 

Protected Attributes

std::set< std::string > watchedDevice
 
std::map< std::string, DeviceInfodata
 

Detailed Description

Definition at line 33 of file watchdeviceproperty.h.

Member Function Documentation

◆ begin()

std::map<std::string, DeviceInfo>::iterator INDI::WatchDeviceProperty::begin ( )
inline

Definition at line 81 of file watchdeviceproperty.h.

◆ clear()

void INDI::WatchDeviceProperty::clear ( )

Definition at line 87 of file watchdeviceproperty.cpp.

◆ clearDevices()

void INDI::WatchDeviceProperty::clearDevices ( )

Definition at line 92 of file watchdeviceproperty.cpp.

◆ deleteDevice()

bool INDI::WatchDeviceProperty::deleteDevice ( const BaseDevice device)

Definition at line 100 of file watchdeviceproperty.cpp.

◆ end()

std::map<std::string, DeviceInfo>::iterator INDI::WatchDeviceProperty::end ( )
inline

Definition at line 86 of file watchdeviceproperty.h.

◆ ensureDeviceByName()

WatchDeviceProperty::DeviceInfo & INDI::WatchDeviceProperty::ensureDeviceByName ( const char *  name,
const std::function< ParentDevice()> &  constructor 
)

Definition at line 42 of file watchdeviceproperty.cpp.

◆ getDeviceByName()

BaseDevice INDI::WatchDeviceProperty::getDeviceByName ( const char *  name)

Definition at line 36 of file watchdeviceproperty.cpp.

◆ getDevices()

std::vector< BaseDevice > INDI::WatchDeviceProperty::getDevices ( ) const

Definition at line 26 of file watchdeviceproperty.cpp.

◆ isDeviceWatched()

bool INDI::WatchDeviceProperty::isDeviceWatched ( const char *  deviceName) const

checks if the device is being watched by something

Parameters
deviceNamename of the searched device on the list
Returns
true if the device is in the list or the list is empty

Definition at line 60 of file watchdeviceproperty.cpp.

◆ isEmpty()

bool INDI::WatchDeviceProperty::isEmpty ( ) const

Definition at line 55 of file watchdeviceproperty.cpp.

◆ processXml()

int INDI::WatchDeviceProperty::processXml ( const INDI::LilXmlElement root,
char *  errmsg,
const std::function< ParentDevice()> &  constructor = [] { return ParentDevice(ParentDevice::Valid); } 
)

Definition at line 115 of file watchdeviceproperty.cpp.

◆ unwatchDevices()

void INDI::WatchDeviceProperty::unwatchDevices ( )

Definition at line 65 of file watchdeviceproperty.cpp.

◆ watchDevice() [1/2]

void INDI::WatchDeviceProperty::watchDevice ( const std::string &  deviceName)

Definition at line 70 of file watchdeviceproperty.cpp.

◆ watchDevice() [2/2]

void INDI::WatchDeviceProperty::watchDevice ( const std::string &  deviceName,
const std::function< void(BaseDevice)> &  callback 
)

Definition at line 75 of file watchdeviceproperty.cpp.

◆ watchProperty()

void INDI::WatchDeviceProperty::watchProperty ( const std::string &  deviceName,
const std::string &  propertyName 
)

Definition at line 81 of file watchdeviceproperty.cpp.

Member Data Documentation

◆ data

std::map<std::string, DeviceInfo> INDI::WatchDeviceProperty::data
protected

Definition at line 93 of file watchdeviceproperty.h.

◆ watchedDevice

std::set<std::string> INDI::WatchDeviceProperty::watchedDevice
protected

Definition at line 92 of file watchdeviceproperty.h.


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