MMDevice  70
Public Member Functions | List of all members
MM::Core Class Referenceabstract

#include <MMDevice.h>

Public Member Functions

virtual int LogMessage (const Device *caller, const char *msg, bool debugOnly) const =0
 
virtual DeviceGetDevice (const Device *caller, const char *label)=0
 
virtual int GetDeviceProperty (const char *deviceName, const char *propName, char *value)=0
 
virtual int SetDeviceProperty (const char *deviceName, const char *propName, const char *value)=0
 
virtual void GetLoadedDeviceOfType (const Device *caller, MM::DeviceType devType, char *pDeviceName, const unsigned int deviceIterator)=0
 Get the names of currently loaded devices of a given type. More...
 
virtual int SetSerialProperties (const char *portName, const char *answerTimeout, const char *baudRate, const char *delayBetweenCharsMs, const char *handshaking, const char *parity, const char *stopBits)=0
 
virtual int SetSerialCommand (const Device *caller, const char *portName, const char *command, const char *term)=0
 
virtual int GetSerialAnswer (const Device *caller, const char *portName, unsigned long ansLength, char *answer, const char *term)=0
 
virtual int WriteToSerial (const Device *caller, const char *port, const unsigned char *buf, unsigned long length)=0
 
virtual int ReadFromSerial (const Device *caller, const char *port, unsigned char *buf, unsigned long length, unsigned long &read)=0
 
virtual int PurgeSerial (const Device *caller, const char *portName)=0
 
virtual MM::PortType GetSerialPortType (const char *portName) const =0
 
virtual int OnPropertiesChanged (const Device *caller)=0
 
virtual int OnPropertyChanged (const Device *caller, const char *propName, const char *propValue)=0
 
virtual int OnStagePositionChanged (const Device *caller, double pos)=0
 
virtual int OnXYStagePositionChanged (const Device *caller, double xPos, double yPos)=0
 
virtual int OnExposureChanged (const Device *caller, double newExposure)=0
 
virtual int OnSLMExposureChanged (const Device *caller, double newExposure)=0
 
virtual int OnMagnifierChanged (const Device *caller)=0
 
virtual unsigned long GetClockTicksUs (const Device *caller)=0
 
virtual MM::MMTime GetCurrentMMTime ()=0
 
virtual int AcqFinished (const Device *caller, int statusCode)=0
 
virtual int PrepareForAcq (const Device *caller)=0
 
virtual int InsertImage (const Device *caller, const ImgBuffer &buf)=0
 
virtual int InsertImage (const Device *caller, const unsigned char *buf, unsigned width, unsigned height, unsigned byteDepth, unsigned nComponents, const char *serializedMetadata, const bool doProcess=true)=0
 
virtual int InsertImage (const Device *caller, const unsigned char *buf, unsigned width, unsigned height, unsigned byteDepth, const Metadata *md=0, const bool doProcess=true)=0
 
virtual int InsertImage (const Device *caller, const unsigned char *buf, unsigned width, unsigned height, unsigned byteDepth, const char *serializedMetadata, const bool doProcess=true)=0
 
virtual void ClearImageBuffer (const Device *caller)=0
 
virtual bool InitializeImageBuffer (unsigned channels, unsigned slices, unsigned int w, unsigned int h, unsigned int pixDepth)=0
 
virtual int InsertMultiChannel (const Device *caller, const unsigned char *buf, unsigned numChannels, unsigned width, unsigned height, unsigned byteDepth, Metadata *md=0)=0
 
 MM_DEPRECATED (virtual const char *GetImage())=0
 
 MM_DEPRECATED (virtual int GetImageDimensions(int &width, int &height, int &depth))=0
 
 MM_DEPRECATED (virtual int GetFocusPosition(double &pos))=0
 
 MM_DEPRECATED (virtual int SetFocusPosition(double pos))=0
 
 MM_DEPRECATED (virtual int MoveFocus(double velocity))=0
 
 MM_DEPRECATED (virtual int SetXYPosition(double x, double y))=0
 
 MM_DEPRECATED (virtual int GetXYPosition(double &x, double &y))=0
 
 MM_DEPRECATED (virtual int MoveXYStage(double vX, double vY))=0
 
 MM_DEPRECATED (virtual int SetExposure(double expMs))=0
 
 MM_DEPRECATED (virtual int GetExposure(double &expMs))=0
 
 MM_DEPRECATED (virtual int SetConfig(const char *group, const char *name))=0
 
 MM_DEPRECATED (virtual int GetCurrentConfig(const char *group, int bufLen, char *name))=0
 
 MM_DEPRECATED (virtual int GetChannelConfig(char *channelConfigName, const unsigned int channelConfigIterator))=0
 
 MM_DEPRECATED (virtual MM::ImageProcessor *GetImageProcessor(const MM::Device *caller))=0
 
 MM_DEPRECATED (virtual MM::AutoFocus *GetAutoFocus(const MM::Device *caller))=0
 
virtual MM::HubGetParentHub (const MM::Device *caller) const =0
 
 MM_DEPRECATED (virtual MM::State *GetStateDevice(const MM::Device *caller, const char *deviceName))=0
 
 MM_DEPRECATED (virtual MM::SignalIO *GetSignalIODevice(const MM::Device *caller, const char *deviceName))=0
 
 MM_DEPRECATED (virtual void NextPostedError(int &, char *, int, int &))=0
 
 MM_DEPRECATED (virtual void PostError(const int, const char *))=0
 
 MM_DEPRECATED (virtual void ClearPostedErrors(void))=0
 

Detailed Description

Callback API to the core control module. Devices use this abstract interface to use Core services

Member Function Documentation

◆ GetDevice()

virtual Device* MM::Core::GetDevice ( const Device caller,
const char *  label 
)
pure virtual

Callback that allows this device adapter to get a pointer to another device. Be aware of potential threading issues. Provide a valid label for the device and receive a pointer to the desired device.

Referenced by CDeviceBase< T, U >::GetDevice().

◆ GetLoadedDeviceOfType()

virtual void MM::Core::GetLoadedDeviceOfType ( const Device caller,
MM::DeviceType  devType,
char *  pDeviceName,
const unsigned int  deviceIterator 
)
pure virtual

Get the names of currently loaded devices of a given type.

If deviceIterator exceeds or is equal to the number of currently loaded devices of type devType, an empty string is returned.

Parameters
[in]devType- the device type
[out]pDeviceName- buffer in which device name will be returned
[in]deviceIterator- index of device (within the given type)

Referenced by CDeviceBase< T, U >::GetLoadedDeviceOfType().

◆ InsertImage()

virtual int MM::Core::InsertImage ( const Device caller,
const unsigned char *  buf,
unsigned  width,
unsigned  height,
unsigned  byteDepth,
const char *  serializedMetadata,
const bool  doProcess = true 
)
pure virtual
Deprecated:
Use the other forms instead.

◆ InsertMultiChannel()

virtual int MM::Core::InsertMultiChannel ( const Device caller,
const unsigned char *  buf,
unsigned  numChannels,
unsigned  width,
unsigned  height,
unsigned  byteDepth,
Metadata md = 0 
)
pure virtual
Deprecated:
Use the other forms instead.

◆ LogMessage()

virtual int MM::Core::LogMessage ( const Device caller,
const char *  msg,
bool  debugOnly 
) const
pure virtual

Logs a message (msg) in the Corelog output, labeled with the device name (derived from caller). If debugOnly flag is true, the output will only be logged if the general system has been set to output debug logging.

Referenced by CDeviceBase< T, U >::LogMessage(), CDeviceBase< T, U >::LogMessageCode(), and CDeviceBase< T, U >::LogTimeDiff().

◆ MM_DEPRECATED() [1/3]

MM::Core::MM_DEPRECATED ( virtual void   ClearPostedErrorsvoid)
pure virtual
Deprecated:
Better handling of asynchronous errors to be developed.

◆ MM_DEPRECATED() [2/3]

MM::Core::MM_DEPRECATED ( virtual void   NextPostedErrorint &, char *, int, int &)
pure virtual
Deprecated:
Not sure what this was meant to do.

◆ MM_DEPRECATED() [3/3]

MM::Core::MM_DEPRECATED ( virtual void   PostErrorconst int, const char *)
pure virtual
Deprecated:
Better handling of asynchronous errors to be developed.

◆ OnExposureChanged()

virtual int MM::Core::OnExposureChanged ( const Device caller,
double  newExposure 
)
pure virtual

When the exposure time has changed, use this callback to inform the UI

◆ OnMagnifierChanged()

virtual int MM::Core::OnMagnifierChanged ( const Device caller)
pure virtual

Magnifiers can use this to signal changes in magnification

◆ OnPropertyChanged()

virtual int MM::Core::OnPropertyChanged ( const Device caller,
const char *  propName,
const char *  propValue 
)
pure virtual

Callback to signal the UI that a property changed The Core will check if groups or pixel size changed as a consequence of the change of this property and inform the UI

Referenced by CDeviceBase< T, U >::OnPropertyChanged().

◆ OnSLMExposureChanged()

virtual int MM::Core::OnSLMExposureChanged ( const Device caller,
double  newExposure 
)
pure virtual

When the SLM exposure time has changed, use this callback to inform the UI

◆ OnStagePositionChanged()

virtual int MM::Core::OnStagePositionChanged ( const Device caller,
double  pos 
)
pure virtual

If the stage is aware that it has reached a new position, it should call this callback to signal the UI

◆ OnXYStagePositionChanged()

virtual int MM::Core::OnXYStagePositionChanged ( const Device caller,
double  xPos,
double  yPos 
)
pure virtual

If an XY stage is aware that it has reached a new position, it should call this callback to signal the UI


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