MMCore 10.1.1
Public Member Functions | List of all members
mmcore::internal::CoreCallback Class Reference
Inheritance diagram for mmcore::internal::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 bytesPerPixel, const char *serializedMetadata)
 
int InsertImage (const MM::Device *caller, const unsigned char *buf, unsigned width, unsigned height, unsigned bytesPerPixel, unsigned nComponents, const char *serializedMetadata)
 
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 mmcore::internal::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 * mmcore::internal::CoreCallback::GetDevice ( const MM::Device *  caller,
const char *  label 
)

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

◆ GetSerialAnswer()

int mmcore::internal::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.

◆ LogMessage()

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

Writes a message to the Micro-Manager log file.

◆ OnExposureChanged()

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

Handler for exposure update

◆ OnMagnifierChanged()

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

Handler for magnifier changer

◆ OnPropertiesChanged()

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

Handler for the property change event from the device.

◆ OnPropertyChanged()

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

Device signals that a specific property changed and reports the new value

References Configuration::isPropertyIncluded().

◆ OnShutterOpenChanged()

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

Handler for Shutter State changes.

◆ OnSLMExposureChanged()

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

Handler for SLM exposure update

◆ OnStagePositionChanged()

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

Handler for Stage position update

◆ OnXYStagePositionChanged()

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

Handler for XYStage position update

◆ PurgeSerial()

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

Clears port buffers.

References CMMError::getCode().

◆ ReadFromSerial()

int mmcore::internal::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 mmcore::internal::CoreCallback::SetSerialCommand ( const MM::Device *  ,
const char *  portName,
const char *  command,
const char *  term 
)

Sends an ASCII command terminated by the specified character sequence.

◆ WriteToSerial()

int mmcore::internal::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: