MMCore 10.1.1
mmcore::internal::DeviceManager Class Reference

Public Member Functions

std::shared_ptr< DeviceInstance > LoadDevice (std::shared_ptr< LoadedDeviceAdapter > module, const std::string &deviceName, const std::string &label, CMMCore *core, logging::Logger deviceLogger, logging::Logger coreLogger)
 Load the specified device and assign a device label.
void UnloadDevice (std::shared_ptr< DeviceInstance > device)
 Unload a device.
void UnloadAllDevices ()
 Unload all devices.
std::shared_ptr< DeviceInstance > GetDevice (const MM::Device *rawPtr) const
 Get a device from a raw pointer to its MMDevice object.
std::vector< std::string > GetDeviceList (MM::DeviceType t=MM::AnyType) const
 Get the labels of all loaded devices of a given type.
std::vector< std::string > GetLoadedPeripherals (const char *hubLabel) const
 Get the labels of all loaded peripherals of a hub device.
std::shared_ptr< HubInstance > GetParentDevice (std::shared_ptr< DeviceInstance > device) const
 Get the parent hub device of a peripheral.
std::shared_ptr< DeviceInstance > GetDevice (const std::string &label) const
 Get a device by label.
std::shared_ptr< DeviceInstance > GetDevice (const char *label) const
template<class TDeviceInstance>
std::shared_ptr< TDeviceInstance > GetDeviceOfType (std::shared_ptr< DeviceInstance > device) const
 Get a device by label, requiring a specific type.
template<class TDeviceInstance>
std::shared_ptr< TDeviceInstance > GetDeviceOfType (const std::string &label) const
template<class TDeviceInstance>
std::shared_ptr< TDeviceInstance > GetDeviceOfType (const char *label) const

Member Function Documentation

◆ GetParentDevice()

std::shared_ptr< HubInstance > mmcore::internal::DeviceManager::GetParentDevice ( std::shared_ptr< DeviceInstance > device) const

Get the parent hub device of a peripheral.

Parameters
device
Returns
The hub device, or null if device has no parent.

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