25 #ifndef _CORECALLBACK_H_ 26 #define _CORECALLBACK_H_ 28 #include "Devices/DeviceInstances.h" 29 #include "CoreUtils.h" 31 #include "MMEventCallback.h" 32 #include "../MMDevice/DeviceUtils.h" 50 int GetDeviceProperty(
const char* deviceName,
const char* propName,
char* value);
51 int SetDeviceProperty(
const char* deviceName,
const char* propName,
const char* value);
56 int LogMessage(
const MM::Device* caller,
const char* msg,
57 bool debugOnly)
const;
62 MM::Device* GetDevice(
const MM::Device* caller,
const char* label);
64 MM::PortType GetSerialPortType(
const char* portName)
const;
66 int SetSerialProperties(
const char* portName,
67 const char* answerTimeout,
69 const char* delayBetweenCharsMs,
70 const char* handshaking,
72 const char* stopBits);
74 int WriteToSerial(
const MM::Device* caller,
const char* portName,
const unsigned char* buf,
unsigned long length);
75 int ReadFromSerial(
const MM::Device* caller,
const char* portName,
unsigned char* buf,
unsigned long bufLength,
unsigned long &bytesRead);
76 int PurgeSerial(
const MM::Device* caller,
const char* portName);
77 int SetSerialCommand(
const MM::Device*,
const char* portName,
const char* command,
const char* term);
78 int GetSerialAnswer(
const MM::Device*,
const char* portName,
unsigned long ansLength,
char* answerTxt,
const char* term);
80 unsigned long GetClockTicksUs(
const MM::Device* caller);
83 MM::MMTime GetCurrentMMTime();
85 void Sleep(
const MM::Device* caller,
double intervalMs);
88 int InsertImage(
const MM::Device* caller,
const ImgBuffer& imgBuf);
89 int InsertImage(
const MM::Device* caller,
const unsigned char* buf,
unsigned width,
unsigned height,
unsigned byteDepth,
const char* serializedMetadata,
const bool doProcess =
true);
90 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);
92 int InsertImage(
const MM::Device* caller,
const unsigned char* buf,
unsigned width,
unsigned height,
unsigned byteDepth,
const Metadata* pMd = 0,
const bool doProcess =
true);
93 int InsertImage(
const MM::Device* caller,
const unsigned char* buf,
unsigned width,
unsigned height,
unsigned byteDepth,
unsigned nComponents,
const Metadata* pMd = 0,
const bool doProcess =
true);
95 int InsertMultiChannel(
const MM::Device* caller,
const unsigned char* buf,
unsigned numChannels,
unsigned width,
unsigned height,
unsigned byteDepth, Metadata* pMd = 0);
96 void ClearImageBuffer(
const MM::Device* caller);
97 bool InitializeImageBuffer(
unsigned channels,
unsigned slices,
unsigned int w,
unsigned int h,
unsigned int pixDepth);
99 int AcqFinished(
const MM::Device* caller,
int statusCode);
100 int PrepareForAcq(
const MM::Device* caller);
103 const char* GetImage();
104 int GetImageDimensions(
int& width,
int& height,
int& depth);
105 int GetFocusPosition(
double& pos);
106 int SetFocusPosition(
double pos);
107 int MoveFocus(
double v);
108 int SetXYPosition(
double x,
double y);
109 int GetXYPosition(
double& x,
double& y);
110 int MoveXYStage(
double vX,
double vY);
111 int SetExposure(
double expMs);
112 int GetExposure(
double& expMs);
113 int SetConfig(
const char* group,
const char* name);
114 int GetCurrentConfig(
const char* group,
int bufLen,
char* name);
115 int GetChannelConfig(
char* channelConfigName,
const unsigned int channelConfigIterator);
118 int OnPropertiesChanged(
const MM::Device* caller);
119 int OnPropertyChanged(
const MM::Device* device,
const char* propName,
const char* value);
120 int OnStagePositionChanged(
const MM::Device* device,
double pos);
121 int OnXYStagePositionChanged(
const MM::Device* device,
double xpos,
double ypos);
122 int OnExposureChanged(
const MM::Device* device,
double newExposure);
123 int OnSLMExposureChanged(
const MM::Device* device,
double newExposure);
124 int OnMagnifierChanged(
const MM::Device* device);
127 void NextPostedError(
int& errorCode,
char* pMessage,
int maxlen,
int& messageLength);
128 void PostError(
const int errorCode,
const char* pMessage);
129 void ClearPostedErrors();
132 MM::ImageProcessor* GetImageProcessor(
const MM::Device* caller);
133 MM::State* GetStateDevice(
const MM::Device* caller,
const char* label);
134 MM::SignalIO* GetSignalIODevice(
const MM::Device* caller,
136 MM::AutoFocus* GetAutoFocus(
const MM::Device* caller);
137 MM::Hub* GetParentHub(
const MM::Device* caller)
const;
138 void GetLoadedDeviceOfType(
const MM::Device* caller, MM::DeviceType devType,
139 char* deviceName,
const unsigned int deviceIterator);
143 MMThreadLock* pValueChangeLock_;
145 Metadata AddCameraMetadata(
const MM::Device* caller,
const Metadata* pMd);
147 int OnConfigGroupChanged(
const char* groupName,
const char* newConfigName);
148 int OnPixelSizeChanged(
double newPixelSizeUm);
149 int OnPixelSizeAffineChanged(std::vector<double> newPixelSizeAffine);
152 #endif // _CORECALLBACK_H_ Definition: CoreCallback.h:34
The Micro-Manager Core.
Definition: MMCore.h:127
Definition: CoreCallback.h:44