Instrument Neutral Distributed Interface INDI 2.2.5
INDI::HotPlugCapableDevice Class Referenceabstract

#include <hotplugcapabledevice.h>

Public Member Functions

 HotPlugCapableDevice ()=default
virtual ~HotPlugCapableDevice ()=default
virtual std::vector< std::string > discoverConnectedDeviceIdentifiers ()=0
 Discovers currently connected devices of this driver's type.
virtual std::shared_ptr< DefaultDevice > createDevice (const std::string &identifier)=0
 Factory method to create a new device instance.
virtual void destroyDevice (std::shared_ptr< DefaultDevice > device)=0
 Destroys a device instance and performs driver-specific cleanup.
virtual const std::map< std::string, std::shared_ptr< DefaultDevice > > & getManagedDevices () const =0
 Provides a unified map view of currently managed devices.

Static Public Member Functions

static const char * getDeviceName ()
 Static name used for LOGGING purposes.

Detailed Description

Definition at line 32 of file hotplugcapabledevice.h.

Constructor & Destructor Documentation

◆ HotPlugCapableDevice()

INDI::HotPlugCapableDevice::HotPlugCapableDevice ( )
default

◆ ~HotPlugCapableDevice()

virtual INDI::HotPlugCapableDevice::~HotPlugCapableDevice ( )
virtualdefault

Member Function Documentation

◆ createDevice()

virtual std::shared_ptr< DefaultDevice > INDI::HotPlugCapableDevice::createDevice ( const std::string & identifier)
pure virtual

Factory method to create a new device instance.

Parameters
identifierThe unique string identifier of the device to create.
Returns
A shared pointer to the newly created DefaultDevice instance.

◆ destroyDevice()

virtual void INDI::HotPlugCapableDevice::destroyDevice ( std::shared_ptr< DefaultDevice > device)
pure virtual

Destroys a device instance and performs driver-specific cleanup.

Parameters
deviceA shared pointer to the device to destroy.

◆ discoverConnectedDeviceIdentifiers()

virtual std::vector< std::string > INDI::HotPlugCapableDevice::discoverConnectedDeviceIdentifiers ( )
pure virtual

Discovers currently connected devices of this driver's type.

Returns
A vector of unique string identifiers for connected devices.

◆ getDeviceName()

const char * INDI::HotPlugCapableDevice::getDeviceName ( )
inlinestatic

Static name used for LOGGING purposes.

Definition at line 41 of file hotplugcapabledevice.h.

◆ getManagedDevices()

virtual const std::map< std::string, std::shared_ptr< DefaultDevice > > & INDI::HotPlugCapableDevice::getManagedDevices ( ) const
pure virtual

Provides a unified map view of currently managed devices.

Returns
A const reference to a map of managed devices, keyed by their unique string identifiers.

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