MMCore 10.1.1
Public Member Functions | List of all members
CoreCallback Class Reference
Inheritance diagram for CoreCallback:

Public Member Functions

 CoreCallback (CMMCore *c)
 
int GetDeviceProperty (const char *deviceName, const char *propName, char *value)
 
int SetDeviceProperty (const char *deviceName, const char *propName, const char *value)
 
int LogMessage (const MM::Device *caller, const char *msg, bool debugOnly) const
 
MM::Device * GetDevice (const MM::Device *caller, const char *label)
 
MM::PortType GetSerialPortType (const char *portName) const
 
int SetSerialProperties (const char *portName, const char *answerTimeout, const char *baudRate, const char *delayBetweenCharsMs, const char *handshaking, const char *parity, const char *stopBits)
 
int WriteToSerial (const MM::Device *caller, const char *portName, const unsigned char *buf, unsigned long length)
 
int ReadFromSerial (const MM::Device *caller, const char *portName, unsigned char *buf, unsigned long bufLength, unsigned long &bytesRead)
 
int PurgeSerial (const MM::Device *caller, const char *portName)
 
int SetSerialCommand (const MM::Device *, const char *portName, const char *command, const char *term)
 
int GetSerialAnswer (const MM::Device *, const char *portName, unsigned long ansLength, char *answerTxt, const char *term)
 
unsigned long GetClockTicksUs (const MM::Device *caller)
 
MM::MMTime GetCurrentMMTime ()
 
void Sleep (const MM::Device *caller, double intervalMs)
 
int InsertImage (const MM::Device *caller, const unsigned char *buf, unsigned width, unsigned height, unsigned byteDepth, const char *serializedMetadata, const bool doProcess=true)
 
int InsertImage (const MM::Device *caller, const unsigned char *buf, unsigned width, unsigned height, unsigned byteDepth, unsigned nComponents, const char *serializedMetadata, const bool doProcess=true)
 
bool InitializeImageBuffer (unsigned channels, unsigned slices, unsigned int w, unsigned int h, unsigned int pixDepth)
 
int AcqFinished (const MM::Device *caller, int statusCode)
 
int PrepareForAcq (const MM::Device *caller)
 
int GetFocusPosition (double &pos)
 
int OnPropertiesChanged (const MM::Device *caller)
 
int OnPropertyChanged (const MM::Device *device, const char *propName, const char *value)
 
int OnStagePositionChanged (const MM::Device *device, double pos)
 
int OnXYStagePositionChanged (const MM::Device *device, double xpos, double ypos)
 
int OnExposureChanged (const MM::Device *device, double newExposure)
 
int OnSLMExposureChanged (const MM::Device *device, double newExposure)
 
int OnMagnifierChanged (const MM::Device *device)
 
int OnShutterOpenChanged (const MM::Device *device, bool open)
 
MM::SignalIO * GetSignalIODevice (const MM::Device *caller, const char *label)
 
MM::Hub * GetParentHub (const MM::Device *caller) const
 
void GetLoadedDeviceOfType (const MM::Device *caller, MM::DeviceType devType, char *deviceName, const unsigned int deviceIterator)
 

Member Function Documentation

◆ GetClockTicksUs()

unsigned long CoreCallback::GetClockTicksUs ( const MM::Device *  caller)

Returns the number of microsecond tick N.B. an unsigned long microsecond count rolls over in just over an hour!!!!

This method is obsolete and deprecated. Prefer std::chrono::steady_clock for time delta measurements

◆ GetDevice()

MM::Device * CoreCallback::GetDevice ( const MM::Device *  caller,
const char *  label 
)

Returns a direct pointer to the device with the specified name.

◆ GetSerialAnswer()

int CoreCallback::GetSerialAnswer ( const MM::Device *  ,
const char *  portName,
unsigned long  ansLength,
char *  answerTxt,
const char *  term 
)

Receives an ASCII string terminated by the specified character sequence. The terminator string is stripped of the answer. If the termination code is not received within the com port timeout and error will be flagged.

References CMMCore::getSerialPortAnswer().

◆ LogMessage()

int CoreCallback::LogMessage ( const MM::Device *  caller,
const char *  msg,
bool  debugOnly 
) const

Writes a message to the Micro-Manager log file.

◆ OnExposureChanged()

int CoreCallback::OnExposureChanged ( const MM::Device *  device,
double  newExposure 
)

Handler for exposure update

◆ OnMagnifierChanged()

int CoreCallback::OnMagnifierChanged ( const MM::Device *  device)

Handler for magnifier changer

References CMMCore::getPixelSizeAffine(), and CMMCore::getPixelSizeUm().

◆ OnPropertiesChanged()

int CoreCallback::OnPropertiesChanged ( const MM::Device *  caller)

Handler for the property change event from the device.

◆ OnPropertyChanged()

int CoreCallback::OnPropertyChanged ( const MM::Device *  device,
const char *  propName,
const char *  value 
)

◆ OnShutterOpenChanged()

int CoreCallback::OnShutterOpenChanged ( const MM::Device *  device,
bool  state 
)

Handler for Shutter State changes.

◆ OnSLMExposureChanged()

int CoreCallback::OnSLMExposureChanged ( const MM::Device *  device,
double  newExposure 
)

Handler for SLM exposure update

◆ OnStagePositionChanged()

int CoreCallback::OnStagePositionChanged ( const MM::Device *  device,
double  pos 
)

Handler for Stage position update

◆ OnXYStagePositionChanged()

int CoreCallback::OnXYStagePositionChanged ( const MM::Device *  device,
double  xPos,
double  yPos 
)

Handler for XYStage position update

◆ PurgeSerial()

int CoreCallback::PurgeSerial ( const MM::Device *  caller,
const char *  portName 
)

Clears port buffers.

References CMMError::getCode().

◆ ReadFromSerial()

int CoreCallback::ReadFromSerial ( const MM::Device *  caller,
const char *  portName,
unsigned char *  buf,
unsigned long  bufLength,
unsigned long &  bytesRead 
)

Reads bytes form the port, up to the buffer length.

References CMMError::getCode().

◆ SetSerialCommand()

int CoreCallback::SetSerialCommand ( const MM::Device *  ,
const char *  portName,
const char *  command,
const char *  term 
)

Sends an ASCII command terminated by the specified character sequence.

References CMMCore::setSerialPortCommand().

◆ WriteToSerial()

int CoreCallback::WriteToSerial ( const MM::Device *  caller,
const char *  portName,
const unsigned char *  buf,
unsigned long  length 
)

Sends an array of bytes to the port.

References CMMError::getCode().


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