MMCore 10.1.1
Public Member Functions | List of all members
mm::DeviceManager Class Reference

Public Member Functions

std::shared_ptr< DeviceInstanceLoadDevice (std::shared_ptr< LoadedDeviceAdapter > module, const std::string &deviceName, const std::string &label, CMMCore *core, mm::logging::Logger deviceLogger, mm::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< DeviceInstanceGetDevice (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< HubInstanceGetParentDevice (std::shared_ptr< DeviceInstance > device) const
 Get the parent hub device of a peripheral.
 
std::shared_ptr< DeviceInstanceGetDevice (const std::string &label) const
 Get a device by label.
 
std::shared_ptr< DeviceInstanceGetDevice (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 > mm::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.

References GetDeviceOfType().


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