MMDevice  70
Public Member Functions | Protected Member Functions | List of all members
HubBase< U > Class Template Reference

#include <DeviceBase.h>

Inheritance diagram for HubBase< U >:
CDeviceBase< MM::Hub, U > MM::Hub MM::Device

Public Member Functions

virtual int DetectInstalledDevices ()
 
virtual unsigned GetNumberOfInstalledDevices ()
 
virtual MM::DeviceGetInstalledDevice (int devIdx)
 
virtual void ClearInstalledDevices ()
 
- Public Member Functions inherited from CDeviceBase< MM::Hub, U >
virtual HDEVMODULE GetModuleHandle () const
 
virtual void SetModuleName (const char *name)
 
virtual void GetModuleName (char *name) const
 
virtual void SetDescription (const char *descr)
 
virtual void GetDescription (char *name) const
 
virtual void SetModuleHandle (HDEVMODULE hModule)
 
virtual void SetLabel (const char *label)
 
virtual void GetLabel (char *name) const
 
virtual double GetDelayMs () const
 
virtual void SetDelayMs (double delay)
 
virtual void SetCallback (MM::Core *cbk)
 
virtual bool UsesDelay ()
 
virtual unsigned GetNumberOfProperties () const
 
virtual int GetProperty (const char *name, char *value) const
 
int GetProperty (const char *name, double &val)
 
int GetProperty (const char *name, long &val)
 
bool IsPropertyEqualTo (const char *name, const char *val) const
 
virtual int GetPropertyReadOnly (const char *name, bool &readOnly) const
 
virtual int GetPropertyInitStatus (const char *name, bool &preInit) const
 
virtual int HasPropertyLimits (const char *name, bool &hasLimits) const
 
virtual int GetPropertyLowerLimit (const char *name, double &lowLimit) const
 
virtual int GetPropertyUpperLimit (const char *name, double &hiLimit) const
 
virtual int IsPropertySequenceable (const char *name, bool &sequenceable) const
 
virtual int GetPropertySequenceMaxLength (const char *name, long &nrEvents) const
 
virtual int StartPropertySequence (const char *name)
 
virtual int StopPropertySequence (const char *name)
 
virtual int ClearPropertySequence (const char *name)
 
virtual int AddToPropertySequence (const char *name, const char *value)
 
virtual int SendPropertySequence (const char *name)
 
virtual bool GetPropertyName (unsigned uIdx, char *name) const
 
virtual int GetPropertyType (const char *name, MM::PropertyType &pt) const
 
virtual int SetProperty (const char *name, const char *value)
 
virtual bool HasProperty (const char *name) const
 
virtual unsigned GetNumberOfPropertyValues (const char *propertyName) const
 
virtual bool GetPropertyValueAt (const char *propertyName, unsigned index, char *value) const
 
int CreateProperty (const char *name, const char *value, MM::PropertyType eType, bool readOnly, MM::ActionFunctor *pAct=0, bool isPreInitProperty=false)
 
int CreatePropertyWithHandler (const char *name, const char *value, MM::PropertyType eType, bool readOnly, int(U::*memberFunction)(MM::PropertyBase *pProp, MM::ActionType eAct), bool isPreInitProperty=false)
 
int CreateIntegerProperty (const char *name, long value, bool readOnly, MM::ActionFunctor *pAct=0, bool isPreInitProperty=false)
 
int CreateFloatProperty (const char *name, double value, bool readOnly, MM::ActionFunctor *pAct=0, bool isPreInitProperty=false)
 
int CreateStringProperty (const char *name, const char *value, bool readOnly, MM::ActionFunctor *pAct=0, bool isPreInitProperty=false)
 
int SetPropertyLimits (const char *name, double low, double high)
 
int SetAllowedValues (const char *name, std::vector< std::string > &values)
 
int ClearAllowedValues (const char *name)
 
int AddAllowedValue (const char *name, const char *value)
 
int AddAllowedValue (const char *name, const char *value, long data)
 
int GetPropertyData (const char *name, const char *value, long &data)
 
int GetCurrentPropertyData (const char *name, long &data)
 
int UpdateStatus ()
 
int UpdateProperty (const char *name)
 
int ApplyProperty (const char *name)
 
virtual bool GetErrorText (int errorCode, char *text) const
 
virtual bool SupportsDeviceDetection (void)
 
virtual MM::DeviceDetectionStatus DetectDevice (void)
 
virtual void SetParentID (const char *parentId)
 
virtual void GetParentID (char *parentID) const
 
- Public Member Functions inherited from MM::Hub
virtual DeviceType GetType () const
 
- Public Member Functions inherited from MM::Device
virtual bool Busy ()=0
 
 MM_DEPRECATED (virtual HDEVMODULE GetModuleHandle() const)=0
 
 MM_DEPRECATED (virtual void SetModuleHandle(HDEVMODULE hLibraryHandle))=0
 
virtual int Initialize ()=0
 
virtual int Shutdown ()=0
 
virtual void GetName (char *name) const =0
 

Protected Member Functions

void AddInstalledDevice (MM::Device *pdev)
 
- Protected Member Functions inherited from CDeviceBase< MM::Hub, U >
void SetErrorText (int errorCode, const char *text)
 
const char * GetMorePropertyErrorInfo (void) const
 
void SetMorePropertyErrorInfo (const char *ptext) const
 
int LogMessage (const char *msg, bool debugOnly=false) const
 
int LogMessage (const std::string &msg, bool debugOnly=false) const
 
int LogMessageCode (const int errorCode, bool debugOnly=false) const
 
int LogTimeDiff (MM::MMTime start, MM::MMTime end, const std::string &message, bool debugOnly=false) const
 
int LogTimeDiff (MM::MMTime start, MM::MMTime end, bool debugOnly=false) const
 
void InitializeDefaultErrorMessages ()
 
MM::DeviceGetDevice (const char *deviceLabel) const
 
void GetLoadedDeviceOfType (MM::DeviceType devType, char *deviceName, const unsigned int deviceIterator)
 
int WriteToComPort (const char *portLabel, const unsigned char *buf, unsigned bufLength)
 
int SendSerialCommand (const char *portName, const char *command, const char *term)
 
int GetSerialAnswer (const char *portName, const char *term, std::string &ans)
 
int ReadFromComPort (const char *portLabel, unsigned char *buf, unsigned bufLength, unsigned long &read)
 
int PurgeComPort (const char *portLabel)
 
MM::PortType GetSerialPortType (const char *portLabel)
 
int OnPropertiesChanged ()
 
int OnPropertyChanged (const char *propName, const char *propValue)
 
int OnStagePositionChanged (double pos)
 
int OnXYStagePositionChanged (double xPos, double yPos)
 
int OnExposureChanged (double exposure)
 
int OnSLMExposureChanged (double exposure)
 
int OnMagnifierChanged ()
 
unsigned long GetClockTicksUs ()
 
MM::MMTime GetCurrentMMTime ()
 
bool IsCallbackRegistered () const
 
MM::CoreGetCoreCallback () const
 
void EnableDelay (bool state=true)
 
void CreateHubIDProperty ()
 
MM::HubGetParentHub () const
 
T_HUB * AssignToHub ()
 

Additional Inherited Members

- Public Types inherited from CDeviceBase< MM::Hub, U >
typedef MM::Action< U > CPropertyAction
 
typedef MM::ActionEx< U > CPropertyActionEx
 
- Static Public Attributes inherited from MM::Hub
static const DeviceType Type = HubDevice
 

Detailed Description

template<class U>
class HubBase< U >

Base class for creating special HUB devices for managing device libraries.

Member Function Documentation

◆ ClearInstalledDevices()

template<class U >
virtual void HubBase< U >::ClearInstalledDevices ( )
inlinevirtual

Removes all installed devices that were created by DetectInstalledDevices() (Don't override this method.)

Implements MM::Hub.

◆ DetectInstalledDevices()

template<class U >
virtual int HubBase< U >::DetectInstalledDevices ( )
inlinevirtual

To provide automatic child device discovery, override this method with code to instantiate child devices and use them to populate "installedDevices" list. If this method is not overridden, it will do nothing and return DEVICE_OK.

Implements MM::Hub.

◆ GetInstalledDevice()

template<class U >
virtual MM::Device* HubBase< U >::GetInstalledDevice ( int  devIdx)
inlinevirtual

Returns a pointer to the device with index devIdx. 0 <= devIdx < GetNumberOfInstalledDevices(). (Don't override this method.)

Implements MM::Hub.

◆ GetNumberOfInstalledDevices()

template<class U >
virtual unsigned HubBase< U >::GetNumberOfInstalledDevices ( )
inlinevirtual

Returns the number of child devices after DetectInstalledDevices was called. (Don't override this method.)

Implements MM::Hub.


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