Instrument Neutral Distributed Interface INDI 2.2.5
Public Member Functions | Public Attributes | Static Public Attributes | List of all members
INDI::DefaultDevicePrivate Class Reference

#include <defaultdevice_p.h>

Inheritance diagram for INDI::DefaultDevicePrivate:
INDI::ParentDevicePrivate INDI::BaseDevicePrivate

Public Member Functions

 DefaultDevicePrivate (DefaultDevice *defaultDevice)
 
virtual ~DefaultDevicePrivate ()
 
int loadINDINicknamesXML (const char *devicename)
 
int saveINDINicknamesXML (const char *devicename)
 Save Nickname data to XML.
 
- Public Member Functions inherited from INDI::BaseDevicePrivate
 BaseDevicePrivate ()
 
virtual ~BaseDevicePrivate ()
 
int setBLOB (INDI::PropertyBlob propertyBlob, const INDI::LilXmlElement &root, char *errmsg)
 Parse and store BLOB in the respective vector.
 
void emitWatchProperty (const INDI::Property &property, bool isNew)
 
void addProperty (const INDI::Property &property)
 
void mediateNewDevice (BaseDevice baseDevice)
 
void mediateRemoveDevice (BaseDevice baseDevice)
 
void mediateNewProperty (Property property)
 
void mediateUpdateProperty (Property property)
 
void mediateRemoveProperty (Property property)
 
void mediateNewMessage (BaseDevice baseDevice, int messageID)
 

Public Attributes

DefaultDevice * defaultDevice
 
bool isInit { false }
 
bool isDebug { false }
 
bool isSimulation { false }
 
bool isDefaultConfigLoaded {false}
 
bool isConfigLoading { false }
 
uint16_t majorVersion { 1 }
 
uint16_t minorVersion { 0 }
 
int m_ConfigConnectionMode {-1}
 
PropertySwitch SimulationSP { 2 }
 
PropertySwitch DebugSP { 2 }
 
PropertySwitch ConfigProcessSP { 4 }
 
PropertySwitch ConnectionSP { 2 }
 
PropertyNumber PollPeriodNP { 1 }
 
PropertyText DriverInfoTP { 4 }
 
PropertySwitch ConnectionModeSP { 0 }
 
PropertyText NicknameTP { 1 }
 
std::vector< Connection::Interface * > connections
 
Connection::Interface * activeConnection = nullptr
 
uint32_t pollingPeriod = 1000
 pollingPeriod Period in milliseconds to call TimerHit(). Default 1000 ms
 
bool defineDynamicProperties {true}
 
bool deleteDynamicProperties {true}
 
INDI::Timer m_MainLoopTimer
 
WatchDeviceProperty watchDevice
 
bool nicknamesLoaded {false}
 
std::string deviceNickname {}
 
std::map< std::string, std::string > nicknameMap {}
 
- Public Attributes inherited from INDI::ParentDevicePrivate
std::atomic_int ref {0}
 
- Public Attributes inherited from INDI::BaseDevicePrivate
BaseDevice self {make_shared_weak(this)}
 
std::string deviceName
 
BaseDevice::Properties pAll
 
std::map< std::string, WatchDetails > watchPropertyMap
 
LilXmlParser xmlParser
 
INDI::BaseMediator * mediator {nullptr}
 
std::deque< std::string > messageLog
 
std::mutex m_Lock
 
bool valid {true}
 

Static Public Attributes

static std::list< DefaultDevicePrivate * > devices
 
static std::recursive_mutex devicesLock
 

Additional Inherited Members

- Static Public Member Functions inherited from INDI::BaseDevicePrivate
static std::shared_ptr< BaseDevicePrivate > invalid ()
 

Detailed Description

Definition at line 37 of file defaultdevice_p.h.

Constructor & Destructor Documentation

◆ DefaultDevicePrivate()

INDI::DefaultDevicePrivate::DefaultDevicePrivate ( DefaultDevice *  defaultDevice)

Definition at line 423 of file defaultdevice.cpp.

◆ ~DefaultDevicePrivate()

INDI::DefaultDevicePrivate::~DefaultDevicePrivate ( )
virtual

Definition at line 430 of file defaultdevice.cpp.

Member Function Documentation

◆ loadINDINicknamesXML()

int INDI::DefaultDevicePrivate::loadINDINicknamesXML ( const char *  devicename)

Definition at line 250 of file defaultdevice.cpp.

◆ saveINDINicknamesXML()

int INDI::DefaultDevicePrivate::saveINDINicknamesXML ( const char *  devicename)

Save Nickname data to XML.

This needs to re-read the XML file in case other devices wrote data since it was last read. First read the whole file, find entry for this driver (if exists), create if not. Clear old and add new entries for nicknames from mNickname map.

Definition at line 338 of file defaultdevice.cpp.

Member Data Documentation

◆ activeConnection

Connection::Interface* INDI::DefaultDevicePrivate::activeConnection = nullptr

Definition at line 65 of file defaultdevice_p.h.

◆ ConfigProcessSP

PropertySwitch INDI::DefaultDevicePrivate::ConfigProcessSP { 4 }

Definition at line 57 of file defaultdevice_p.h.

◆ ConnectionModeSP

PropertySwitch INDI::DefaultDevicePrivate::ConnectionModeSP { 0 }

Definition at line 61 of file defaultdevice_p.h.

◆ connections

std::vector<Connection::Interface *> INDI::DefaultDevicePrivate::connections

Definition at line 64 of file defaultdevice_p.h.

◆ ConnectionSP

PropertySwitch INDI::DefaultDevicePrivate::ConnectionSP { 2 }

Definition at line 58 of file defaultdevice_p.h.

◆ DebugSP

PropertySwitch INDI::DefaultDevicePrivate::DebugSP { 2 }

Definition at line 56 of file defaultdevice_p.h.

◆ defaultDevice

DefaultDevice* INDI::DefaultDevicePrivate::defaultDevice

Definition at line 43 of file defaultdevice_p.h.

◆ defineDynamicProperties

bool INDI::DefaultDevicePrivate::defineDynamicProperties {true}

Definition at line 72 of file defaultdevice_p.h.

◆ deleteDynamicProperties

bool INDI::DefaultDevicePrivate::deleteDynamicProperties {true}

Definition at line 73 of file defaultdevice_p.h.

◆ deviceNickname

std::string INDI::DefaultDevicePrivate::deviceNickname {}

Definition at line 88 of file defaultdevice_p.h.

◆ devices

std::list< INDI::DefaultDevicePrivate * > INDI::DefaultDevicePrivate::devices
static

Definition at line 79 of file defaultdevice_p.h.

◆ devicesLock

std::recursive_mutex INDI::DefaultDevicePrivate::devicesLock
static

Definition at line 80 of file defaultdevice_p.h.

◆ DriverInfoTP

PropertyText INDI::DefaultDevicePrivate::DriverInfoTP { 4 }

Definition at line 60 of file defaultdevice_p.h.

◆ isConfigLoading

bool INDI::DefaultDevicePrivate::isConfigLoading { false }

Definition at line 49 of file defaultdevice_p.h.

◆ isDebug

bool INDI::DefaultDevicePrivate::isDebug { false }

Definition at line 46 of file defaultdevice_p.h.

◆ isDefaultConfigLoaded

bool INDI::DefaultDevicePrivate::isDefaultConfigLoaded {false}

Definition at line 48 of file defaultdevice_p.h.

◆ isInit

bool INDI::DefaultDevicePrivate::isInit { false }

Definition at line 45 of file defaultdevice_p.h.

◆ isSimulation

bool INDI::DefaultDevicePrivate::isSimulation { false }

Definition at line 47 of file defaultdevice_p.h.

◆ m_ConfigConnectionMode

int INDI::DefaultDevicePrivate::m_ConfigConnectionMode {-1}

Definition at line 53 of file defaultdevice_p.h.

◆ m_MainLoopTimer

INDI::Timer INDI::DefaultDevicePrivate::m_MainLoopTimer

Definition at line 76 of file defaultdevice_p.h.

◆ majorVersion

uint16_t INDI::DefaultDevicePrivate::majorVersion { 1 }

Definition at line 51 of file defaultdevice_p.h.

◆ minorVersion

uint16_t INDI::DefaultDevicePrivate::minorVersion { 0 }

Definition at line 52 of file defaultdevice_p.h.

◆ nicknameMap

std::map<std::string, std::string> INDI::DefaultDevicePrivate::nicknameMap {}

Definition at line 89 of file defaultdevice_p.h.

◆ nicknamesLoaded

bool INDI::DefaultDevicePrivate::nicknamesLoaded {false}

Definition at line 87 of file defaultdevice_p.h.

◆ NicknameTP

PropertyText INDI::DefaultDevicePrivate::NicknameTP { 1 }

Definition at line 62 of file defaultdevice_p.h.

◆ pollingPeriod

uint32_t INDI::DefaultDevicePrivate::pollingPeriod = 1000

pollingPeriod Period in milliseconds to call TimerHit(). Default 1000 ms

Definition at line 70 of file defaultdevice_p.h.

◆ PollPeriodNP

PropertyNumber INDI::DefaultDevicePrivate::PollPeriodNP { 1 }

Definition at line 59 of file defaultdevice_p.h.

◆ SimulationSP

PropertySwitch INDI::DefaultDevicePrivate::SimulationSP { 2 }

Definition at line 55 of file defaultdevice_p.h.

◆ watchDevice

WatchDeviceProperty INDI::DefaultDevicePrivate::watchDevice

Definition at line 82 of file defaultdevice_p.h.


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