12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205 |
- /*
- Bruker.API.CommonFunctions.cpp
- Implementation for Bruker CommonFunctions used by Esprit- and M4-API
- Microsoft Visual Studio 2015
- */
- #include "stdafx.h"
- #include <windows.h>
- #include <stdio.h>
- #include <stdint.h>
- #include "Bruker.API.CommonFunctions.h"
- namespace BrukerDll
- {
- // type definitions for callback functions
- typedef int32_t (WINAPI *PSetLanguage)(char* Language);
- typedef int32_t (WINAPI *PQueryServers)(char* pServerList, int32_t BufSize);
- typedef int32_t (WINAPI *PQueryUser)(char* pServer, char* pClientBuf, int32_t BufSize);
- typedef int32_t (WINAPI *POpenClient)(char* pServer, char* pUser, char* pPassword, bool StartNew, bool GUI, uint32_t& CID);
- typedef int32_t (WINAPI *POpenClientEx)(char* pServer, char* pUser, char* pPassword, const TOpenClientOptions& Options, uint32_t& CID);
- typedef int32_t (WINAPI *POpenClientTCP)(char* pServer, char* pUser, char* pPassword, char* pHost, WORD Port, const TOpenClientOptions Options, uint32_t& CID);
- typedef int32_t (WINAPI *PQueryInfo)(uint32_t CID, char* pInfo, int32_t BufSize);
- typedef int32_t (WINAPI *PCloseConnection)(uint32_t CID);
- typedef int32_t (WINAPI *PCloseClient)(uint32_t CID);
- typedef int32_t (WINAPI *PGetDebugErrorString)(uint32_t CID, int32_t aError, char* pErrorStr, int32_t& BufSize);
- typedef int32_t (WINAPI *PWriteDebugErrorStringToLog)(uint32_t CID, int32_t aError);
- typedef int32_t (WINAPI *PCheckConnection)(uint32_t CID);
- typedef int32_t (WINAPI *PCombineSpectrometer)(uint32_t CID, int32_t Devices);
- typedef int32_t (WINAPI *PGetSpectrometerStatus)(uint32_t CID, int32_t SPU, TRTSpectrometerStatus& Status);
- typedef int32_t (WINAPI *PSetDetectorCoolingMode)(uint32_t CID, int32_t SPU, int32_t Det, int32_t aCoolingMode);
- typedef int32_t (WINAPI *PResetSpectrometerInterlock)(uint32_t CID, int32_t SPU);
- typedef int32_t (WINAPI *PStartSpectrumMeasurement)(uint32_t CID, int32_t Device, uint32_t RealTime);
- typedef int32_t (WINAPI *PStartSpectrumLifeTimeMeasurement)(uint32_t CID, int32_t Device, uint32_t LifeTime);
- typedef int32_t (WINAPI *PStartSpectrumCounterMeasurement)(uint32_t CID, int32_t SPU, double StartEnergy, double EndEnergy, uint32_t Counts);
- typedef int32_t (WINAPI *PStopSpectrumMeasurement)(uint32_t CID, int32_t Device);
- typedef int32_t (WINAPI *PGetSpectrumMeasureState)(uint32_t CID, int32_t Device, bool& Running, double& State, double& PulseRate);
- typedef int32_t (WINAPI *PGetSpectrumMeasureStateEx)(uint32_t CID, int32_t Device, bool& Running, double& State, double& PulseRate, int32_t& RealTime);
- typedef int32_t (WINAPI *PReadSpectrum)(uint32_t CID, int32_t Device);
- typedef int32_t (WINAPI *PGetSpectrometerConfiguration)(uint32_t CID, int32_t SPU, uint32_t& MaxEnergy, uint32_t& PulseThroughput);
- typedef int32_t (WINAPI *PGetSpectrometerConfigurationEx)(uint32_t CID, int32_t SPU, int32_t Det, uint32_t& MaxEnergyIndex, uint32_t& PulseThroughputIndex);
- typedef int32_t (WINAPI *PSetSpectrometerConfiguration)(uint32_t CID, int32_t SPU, int32_t Det, const uint32_t MaxEnergyIndex, const uint32_t PulseThroughputIndex);
- typedef int32_t (WINAPI *PSetActiveDetectors)(uint32_t CID, int32_t SPU, const uint32_t Detectors);
- typedef int32_t (WINAPI *PGetActiveDetectors)(uint32_t CID, int32_t SPU, uint32_t& Detectors);
- typedef int32_t (WINAPI *PGetAvailableDetectors)(uint32_t CID, int32_t SPU, uint32_t& Detectors);
- typedef int32_t (WINAPI *PGetAvailableWDSDetectors)(uint32_t CID, int32_t SPU, uint32_t& Detectors);
- typedef int32_t (WINAPI *PGetHardwareConfiguration)(uint32_t CID, TRTHardwareConfiguration& aHardwareConfiguration);
- typedef int32_t (WINAPI *PCalibrateSpectrometer)(uint32_t CID, int32_t Device, bool ShowProgress, PRTCalibSettings Settings, PRTCalibResults Results);
- typedef int32_t (WINAPI *PGetSpectrometerParam)(uint32_t CID, int32_t Device, char* ParamName, char* ParamType, void* Buffer, int32_t BufSize);
- typedef int32_t (WINAPI *PGetSpectrometerCount)(uint32_t CID, int32_t& Value);
- typedef int32_t (WINAPI *PGetSpectrometerRanges)(uint32_t CID, int32_t SPU, int32_t Det, TRTDetectorRanges& aDetectorSettings);
- typedef int32_t (WINAPI *PGetSpectrometerParams)(uint32_t CID, int32_t SPU, void* Buffer, int32_t& BufSize);
- typedef int32_t (WINAPI *PGetSpectrum)(uint32_t CID, int32_t Buffer, PRTSpectrumHeaderRec pSpectrumBuf, int32_t BufSize);
- typedef int32_t (WINAPI *PQuantifySpectrum)(uint32_t CID, int32_t Buffer, char* pMethodName, char* pParams, char* pResultBuf, int32_t ResultBufSize);
- typedef int32_t (WINAPI *PSendRCLCommand)(uint32_t CID, int32_t Device, char* pCommand, char* pAnswer, int32_t AnswerBufSize);
- typedef int32_t (WINAPI *PSendRCLCommandOnly)(uint32_t CID, int32_t Device, char* Command);
- typedef int32_t (WINAPI *PReceiveRCLAnswer)(uint32_t CID, int32_t Device, char* Answer, int32_t AnswerBufSize);
- typedef int32_t (WINAPI *PLockSpectrometer)(uint32_t CID, int32_t Device);
- typedef int32_t (WINAPI *PUnlockSpectrometer)(uint32_t CID, int32_t Device);
- typedef int32_t (WINAPI *PLoadSpectrum)(uint32_t CID, char* pFileName);
- typedef int32_t (WINAPI *PPutSpectrum)(uint32_t CID, void* Spectrum, int32_t BufSize);
- typedef int32_t (WINAPI *PSaveSpectrum)(uint32_t CID, int32_t Buffer, char* pFileName);
- typedef int32_t (WINAPI *PCreateSpectrum)(char* SpectrometerParams, PRTSpectrumHeaderRec SpectrumData, char* ResultData, int32_t& ResultSize);
- typedef int32_t (WINAPI *PGetCorrectedSpectrum)(char* SpectrometerParams, PRTSpectrumHeaderRec Spectrum, double* ResultData);
- typedef int32_t (WINAPI *PShowSpectrum)(uint32_t CID, int32_t Buffer, char* Name);
- typedef int32_t (WINAPI *PDeleteSpectrum)(uint32_t CID, char* aName);
- typedef int32_t (WINAPI *PGetSpectrumGraphic)(uint32_t CID, int32_t Buffer, int32_t Width, int32_t Height, char* Format, void* ResultBuf, uint32_t& ResultBufSize);
- typedef int32_t (WINAPI *PGetHardwareProfiles)(uint32_t CID, char* pProfiles, int32_t BufSize);
- typedef int32_t (WINAPI *PSetHardwareProfile)(uint32_t CID, char* pProfile);
- typedef int32_t (WINAPI *PGetQuantificationMethods)(uint32_t CID, bool AutomaticOnly, char* pMethods, int32_t BufSize);
- typedef int32_t (WINAPI *PGetQuantificationMethodElements)(uint32_t CID, char* MethodName, char* ElementBuffer, int32_t BufSize);
- typedef int32_t (WINAPI *PEditQuantificationMethod)(uint32_t CID, char* MethodName);
- typedef int32_t (WINAPI *PCopyQuantificationMethod)(uint32_t CID, char* MethodName, char* TargetName, bool ToProfile);
- typedef int32_t (WINAPI *PGetRegionForElement)(uint32_t CID, int32_t Buffer, char* Params, char* ResultBuf, int32_t ResultBufSize);
- typedef int32_t (WINAPI *PXRayTubeSetConfiguration)(uint32_t CID, int32_t Tube, uint32_t HighVoltage, uint32_t Current, uint32_t FilterIndex);
- typedef int32_t (WINAPI *PXRayTubeGetState)(uint32_t CID, int32_t Tube, uint32_t& HighVoltage, uint32_t& Current, uint32_t& FilterIndex, bool& ShutterOpen);
- typedef int32_t (WINAPI *PXRayTubeOpenShutter)(uint32_t CID, int32_t Tube);
- typedef int32_t (WINAPI *PXRayTubeCloseShutter)(uint32_t CID, int32_t Tube);
- typedef int32_t (WINAPI *PXRayTubeHVOn)(uint32_t CID, int32_t Tube, int32_t DestHV, int32_t DestCurrent, bool HVOn);
- typedef int32_t (WINAPI *PXRaySetActiveTube)(uint32_t CID, int32_t Tube);
- typedef int32_t (WINAPI *PXRayGetActiveTube)(uint32_t CID, int32_t& Tube);
- typedef int32_t (WINAPI *PSetImageExportParameter)(uint32_t CID, int32_t ExportImageWidth, bool ExportWithOverlay);
- typedef int32_t (WINAPI *PHyMapStop)(uint32_t CID, bool WaitForFrameEnd);
- typedef int32_t (WINAPI *PHyMapClearDatabase)(uint32_t CID);
- typedef int32_t (WINAPI *PHyMapGetState)(uint32_t CID, bool& Running, double& MeasureState);
- typedef int32_t (WINAPI *PHyMapGetStateEx)(uint32_t CID, bool& Running, double& MeasureState, int32_t& CurrentLine);
- typedef int32_t (WINAPI *PHyMapGetXYSpectrum)(uint32_t CID, int32_t X, int32_t Y, bool Corrected, PRTSpectrumHeaderRec SpectrumBuffer, int32_t BufferSize);
- typedef int32_t (WINAPI *PHyMapGetLineSpectra)(uint32_t CID, int32_t X, int32_t Y, int32_t Count, bool Corrected, PPointerArray SpectrumBuffer, int32_t BufferSize);
- typedef int32_t (WINAPI *PHyMapGetCompressedLineSpectra)(uint32_t CID, int32_t X, int32_t Y, int32_t Count, bool Corrected, PPointerArray SpectrumBuffer, int32_t BufferSize);
- typedef int32_t (WINAPI *PHyMapQuantifySpectra)(uint32_t CID, PPointArray Points, int32_t PointCount, int32_t Binning, char* MethodName, char* Params, char* ResultBuf, int32_t ResultBufSize);
- typedef int32_t (WINAPI *PHyMapSaveToFile)(uint32_t CID, char* aFileName);
- typedef int32_t (WINAPI *PHyMapLoadFromFile)(unsigned _int32 CID, char* aFileName, int32_t& Width, int32_t& Height, int32_t& DetCount, int32_t& ImgCount);
- typedef int32_t (WINAPI *PHyMapGetMaxPixelSpectrum)(uint32_t CID, PRTSpectrumHeaderRec SpectrumBuffer, int32_t BufferSize);
- typedef int32_t (WINAPI *PHyMapAutoIdent)(uint32_t CID, char* pMethodName, char* pElementBuffer, int32_t ElementBufSize);
- typedef int32_t (WINAPI *PHyMapGetImage)(uint32_t CID, char* Format, int32_t ImgChannel, void* Buffer, uint32_t& BufferSize);
- typedef int32_t (WINAPI *PHyMapGetElementData)(uint32_t CID, int32_t ElementIndex, void* Buffer, uint32_t& BufferSize);
- typedef int32_t (WINAPI *PHyMapGetElementImage)(uint32_t CID, char* Format, int32_t ElementIndex, void* Buffer, uint32_t& BufferSize);
- typedef int32_t (WINAPI *PHyMapGetMixedMapImage)(uint32_t CID, char* Format, void* Buffer, uint32_t& BufferSize);
- typedef int32_t (WINAPI *PHyMapSaveImage)(uint32_t CID, int32_t ImgChannel, char* aFileName);
- typedef int32_t (WINAPI *PHyMapSaveElementImage)(uint32_t CID, int32_t ElementIndex, char* aFileName);
- typedef int32_t (WINAPI *PHyMapSaveMixedMapImage)(uint32_t CID, char* aFileName);
- // DLL Handle
- HMODULE hDllBaseAddress;
- // global callback function pointers
- PSetLanguage pSetLanguage = NULL;
- PQueryServers pQueryServers = NULL;
- PQueryUser pQueryUser = NULL;
- POpenClient pOpenClient = NULL;
- POpenClientEx pOpenClientEx = NULL;
- POpenClientTCP pOpenClientTCP = NULL;
- PQueryInfo pQueryInfo = NULL;
- PCloseConnection pCloseConnection = NULL;
- PCloseClient pCloseClient = NULL;
- PGetDebugErrorString pGetDebugErrorString = NULL;
- PWriteDebugErrorStringToLog pWriteDebugErrorStringToLog = NULL;
- PCheckConnection pCheckConnection = NULL;
- PCombineSpectrometer pCombineSpectrometer = NULL;
- PGetSpectrometerStatus pGetSpectrometerStatus = NULL;
- PSetDetectorCoolingMode pSetDetectorCoolingMode = NULL;
- PResetSpectrometerInterlock pResetSpectrometerInterlock = NULL;
- PStartSpectrumMeasurement pStartSpectrumMeasurement = NULL;
- PStartSpectrumLifeTimeMeasurement pStartSpectrumLifeTimeMeasurement = NULL;
- PStartSpectrumCounterMeasurement pStartSpectrumCounterMeasurement = NULL;
- PStopSpectrumMeasurement pStopSpectrumMeasurement = NULL;
- PGetSpectrumMeasureState pGetSpectrumMeasureState = NULL;
- PGetSpectrumMeasureStateEx pGetSpectrumMeasureStateEx = NULL;
- PReadSpectrum pReadSpectrum = NULL;
- PGetSpectrometerConfiguration pGetSpectrometerConfiguration = NULL;
- PGetSpectrometerConfigurationEx pGetSpectrometerConfigurationEx = NULL;
- PSetSpectrometerConfiguration pSetSpectrometerConfiguration = NULL;
- PSetActiveDetectors pSetActiveDetectors = NULL;
- PGetActiveDetectors pGetActiveDetectors = NULL;
- PGetAvailableDetectors pGetAvailableDetectors = NULL;
- PGetAvailableWDSDetectors pGetAvailableWDSDetectors = NULL;
- PGetHardwareConfiguration pGetHardwareConfiguration = NULL;
- PCalibrateSpectrometer pCalibrateSpectrometer = NULL;
- PGetSpectrometerParam pGetSpectrometerParam = NULL;
- PGetSpectrometerCount pGetSpectrometerCount = NULL;
- PGetSpectrometerRanges pGetSpectrometerRanges = NULL;
- PGetSpectrometerParams pGetSpectrometerParams = NULL;
- PGetSpectrum pGetSpectrum = NULL;
- PQuantifySpectrum pQuantifySpectrum = NULL;
- PSendRCLCommand pSendRCLCommand = NULL;
- PSendRCLCommandOnly pSendRCLCommandOnly = NULL;
- PReceiveRCLAnswer pReceiveRCLAnswer = NULL;
- PLockSpectrometer pLockSpectrometer = NULL;
- PUnlockSpectrometer pUnlockSpectrometer = NULL;
- PLoadSpectrum pLoadSpectrum = NULL;
- PPutSpectrum pPutSpectrum = NULL;
- PSaveSpectrum pSaveSpectrum = NULL;
- PCreateSpectrum pCreateSpectrum = NULL;
- PGetCorrectedSpectrum pGetCorrectedSpectrum = NULL;
- PShowSpectrum pShowSpectrum = NULL;
- PDeleteSpectrum pDeleteSpectrum = NULL;
- PGetSpectrumGraphic pGetSpectrumGraphic = NULL;
- PGetHardwareProfiles pGetHardwareProfiles = NULL;
- PSetHardwareProfile pSetHardwareProfile = NULL;
- PGetQuantificationMethods pGetQuantificationMethods = NULL;
- PGetQuantificationMethodElements pGetQuantificationMethodElements = NULL;
- PEditQuantificationMethod pEditQuantificationMethod = NULL;
- PCopyQuantificationMethod pCopyQuantificationMethod = NULL;
- PGetRegionForElement pGetRegionForElement = NULL;
- PXRayTubeSetConfiguration pXRayTubeSetConfiguration = NULL;
- PXRayTubeGetState pXRayTubeGetState = NULL;
- PXRayTubeOpenShutter pXRayTubeOpenShutter = NULL;
- PXRayTubeCloseShutter pXRayTubeCloseShutter = NULL;
- PXRayTubeHVOn pXRayTubeHVOn = NULL;
- PXRaySetActiveTube pXRaySetActiveTube = NULL;
- PXRayGetActiveTube pXRayGetActiveTube = NULL;
- PSetImageExportParameter pSetImageExportParameter = NULL;
- PHyMapStop pHyMapStop = NULL;
- PHyMapClearDatabase pHyMapClearDatabase = NULL;
- PHyMapGetState pHyMapGetState = NULL;
- PHyMapGetStateEx pHyMapGetStateEx = NULL;
- PHyMapGetXYSpectrum pHyMapGetXYSpectrum = NULL;
- PHyMapGetLineSpectra pHyMapGetLineSpectra = NULL;
- PHyMapGetCompressedLineSpectra pHyMapGetCompressedLineSpectra = NULL;
- PHyMapQuantifySpectra pHyMapQuantifySpectra = NULL;
- PHyMapSaveToFile pHyMapSaveToFile = NULL;
- PHyMapLoadFromFile pHyMapLoadFromFile = NULL;
- PHyMapGetMaxPixelSpectrum pHyMapGetMaxPixelSpectrum = NULL;
- PHyMapAutoIdent pHyMapAutoIdent = NULL;
- PHyMapGetImage pHyMapGetImage = NULL;
- PHyMapGetElementData pHyMapGetElementData = NULL;
- PHyMapGetElementImage pHyMapGetElementImage = NULL;
- PHyMapGetMixedMapImage pHyMapGetMixedMapImage = NULL;
- PHyMapSaveImage pHyMapSaveImage = NULL;
- PHyMapSaveElementImage pHyMapSaveElementImage = NULL;
- PHyMapSaveMixedMapImage pHyMapSaveMixedMapImage = NULL;
- bool LoadCommonFunctions(LPCTSTR LibFile)
- {
- hDllBaseAddress = LoadLibrary(LibFile);
- if (!hDllBaseAddress)
- {
- DWORD lastError = GetLastError();
- TCHAR buf[200];
- int j = _stprintf_s(buf, 200, _T("CommonFunctions.cpp: Failed to load DLL %s \n"), LibFile);
- j += _stprintf_s(buf + j, 200 - j, _T("CommonFunctions.cpp: ErrorCode: %d \n"), lastError);
- OutputDebugString(buf);
- return false;
- }
- pSetLanguage = (PSetLanguage)GetProcAddress(hDllBaseAddress, "SetLanguage");
- if (!pSetLanguage) OutputDebugString(_T("Failed to Load DLL function SetLanguage\n"));
- pQueryServers = (PQueryServers)GetProcAddress(hDllBaseAddress, "QueryServers");
- if (!pQueryServers) OutputDebugString(_T("Failed to load DLL function QueryServers\n"));
- pQueryUser = (PQueryUser)GetProcAddress(hDllBaseAddress, "QueryUser");
- if (!pQueryUser) OutputDebugString(_T("Failed to load DLL function QueryUser\n"));
- pOpenClient = (POpenClient)GetProcAddress(hDllBaseAddress, "OpenClient");
- if (!pOpenClient) OutputDebugString(_T("Failed to load DLL function OpenClient\n"));
- pOpenClientEx = (POpenClientEx)GetProcAddress(hDllBaseAddress, "OpenClientEx");
- if (!pOpenClientEx) OutputDebugString(_T("Failed to load DLL function OpenClientEx\n"));
- pOpenClientTCP = (POpenClientTCP)GetProcAddress(hDllBaseAddress, "OpenClientTCP");
- if (!pOpenClientTCP) OutputDebugString(_T("Failed to load DLL function OpenClientTCP\n"));
- pQueryInfo = (PQueryInfo)GetProcAddress(hDllBaseAddress, "QueryInfo");
- if (!pQueryInfo) OutputDebugString(_T("Failed to load DLL function QueryInfo\n"));
- pCloseConnection = (PCloseConnection)GetProcAddress(hDllBaseAddress, "CloseConnection");
- if (!pCloseConnection) OutputDebugString(_T("Failed to load DLL function CloseConnection\n"));
- pCloseClient = (PCloseClient)GetProcAddress(hDllBaseAddress, "CloseClient");
- if (!pCloseClient) OutputDebugString(_T("Failed to load DLL function CloseClient\n"));
- pGetDebugErrorString = (PGetDebugErrorString)GetProcAddress(hDllBaseAddress, "GetDebugErrorString");
- if (!pGetDebugErrorString) OutputDebugString(_T("Failed to load DLL function GetDebugErrorString\n"));
- pWriteDebugErrorStringToLog = (PWriteDebugErrorStringToLog)GetProcAddress(hDllBaseAddress, "WriteDebugErrorStringToLog");
- if (!pWriteDebugErrorStringToLog) OutputDebugString(_T("Failed to load DLL function WriteDebugErrorStringToLog\n"));
- pCheckConnection = (PCheckConnection)GetProcAddress(hDllBaseAddress, "CheckConnection");
- if (!pCheckConnection) OutputDebugString(_T("Failed to load DLL function CheckConnection\n"));
- pCombineSpectrometer = (PCombineSpectrometer)GetProcAddress(hDllBaseAddress, "CombineSpectrometer");
- if (!pCombineSpectrometer) OutputDebugString(_T("Failed to load DLL function CombineSpectrometer\n"));
- pGetSpectrometerStatus = (PGetSpectrometerStatus)GetProcAddress(hDllBaseAddress, "GetSpectrometerStatus");
- if (!pGetSpectrometerStatus) OutputDebugString(_T("Failed to load DLL function GetSpectrometerStatus\n"));
- pSetDetectorCoolingMode = (PSetDetectorCoolingMode)GetProcAddress(hDllBaseAddress, "SetDetectorCoolingMode");
- if (!pSetDetectorCoolingMode) OutputDebugString(_T("Failed to load DLL function SetDetectorCoolingMode\n"));
- pResetSpectrometerInterlock = (PResetSpectrometerInterlock)GetProcAddress(hDllBaseAddress, "ResetSpectrometerInterlock");
- if (!pResetSpectrometerInterlock) OutputDebugString(_T("Failed to load DLL function ResetSpectrometerInterlock\n"));
- pStartSpectrumMeasurement = (PStartSpectrumMeasurement)GetProcAddress(hDllBaseAddress, "StartSpectrumMeasurement");
- if (!pStartSpectrumMeasurement) OutputDebugString(_T("Failed to load DLL function StartSpectrumMeasurement\n"));
- pStartSpectrumLifeTimeMeasurement = (PStartSpectrumLifeTimeMeasurement)GetProcAddress(hDllBaseAddress, "StartSpectrumLifeTimeMeasurement");
- if (!pStartSpectrumLifeTimeMeasurement) OutputDebugString(_T("Failed to load DLL function StartSpectrumLifeTimeMeasurement\n"));
- pStartSpectrumCounterMeasurement = (PStartSpectrumCounterMeasurement)GetProcAddress(hDllBaseAddress, "StartSpectrumCounterMeasurement");
- if (!pStartSpectrumCounterMeasurement) OutputDebugString(_T("Failed to load DLL function StartSpectrumCounterMeasurement\n"));
- pStopSpectrumMeasurement = (PStopSpectrumMeasurement)GetProcAddress(hDllBaseAddress, "StopSpectrumMeasurement");
- if (!pStopSpectrumMeasurement) OutputDebugString(_T("Failed to load DLL function StopSpectrumMeasurement\n"));
- pGetSpectrumMeasureState = (PGetSpectrumMeasureState)GetProcAddress(hDllBaseAddress, "GetSpectrumMeasureState");
- if (!pGetSpectrumMeasureState) OutputDebugString(_T("Failed to load DLL function GetSpectrumMeasureState\n"));
- pGetSpectrumMeasureStateEx = (PGetSpectrumMeasureStateEx)GetProcAddress(hDllBaseAddress, "GetSpectrumMeasureStateEx");
- if (!pGetSpectrumMeasureStateEx) OutputDebugString(_T("Failed to load DLL function GetSpectrumMeasureStateEx\n"));
- pReadSpectrum = (PReadSpectrum)GetProcAddress(hDllBaseAddress, "ReadSpectrum");
- if (!pReadSpectrum) OutputDebugString(_T("Failed to load DLL function ReadSpectrum\n"));
- pGetSpectrometerConfiguration = (PGetSpectrometerConfiguration)GetProcAddress(hDllBaseAddress, "GetSpectrometerConfiguration");
- if (!pGetSpectrometerConfiguration) OutputDebugString(_T("Failed to load DLL function GetSpectrometerConfiguration\n"));
- pGetSpectrometerConfigurationEx = (PGetSpectrometerConfigurationEx)GetProcAddress(hDllBaseAddress, "GetSpectrometerConfigurationEx");
- if (!pGetSpectrometerConfigurationEx) OutputDebugString(_T("Failed to load DLL function GetSpectrometerConfigurationEx\n"));
- pSetSpectrometerConfiguration = (PSetSpectrometerConfiguration)GetProcAddress(hDllBaseAddress, "SetSpectrometerConfiguration");
- if (!pSetSpectrometerConfiguration) OutputDebugString(_T("Failed to load DLL function SetSpectrometerConfiguration\n"));
- pSetActiveDetectors = (PSetActiveDetectors)GetProcAddress(hDllBaseAddress, "SetActiveDetectors");
- if (!pSetActiveDetectors) OutputDebugString(_T("Failed to load DLL function SetActiveDetectors\n"));
- pGetActiveDetectors = (PGetActiveDetectors)GetProcAddress(hDllBaseAddress, "GetActiveDetectors");
- if (!pGetActiveDetectors)OutputDebugString(_T("Failed to load DLL function GetActiveDetectors\n"));
- pGetAvailableDetectors = (PGetAvailableDetectors)GetProcAddress(hDllBaseAddress, "GetAvailableDetectors");
- if (!pGetAvailableDetectors) OutputDebugString(_T("Failed to load DLL function GetAvailableDetectors\n"));
- pGetAvailableWDSDetectors = (PGetAvailableWDSDetectors)GetProcAddress(hDllBaseAddress, "GetAvailableWDSDetectors");
- if (!pGetAvailableWDSDetectors) OutputDebugString(_T("Failed to load DLL function GetAvailableWDSDetectors\n"));
- pGetHardwareConfiguration = (PGetHardwareConfiguration)GetProcAddress(hDllBaseAddress, "GetHardwareConfiguration");
- if (!pGetHardwareConfiguration) OutputDebugString(_T("Failed to load DLL function GetHardwareConfiguration\n"));
- pCalibrateSpectrometer = (PCalibrateSpectrometer)GetProcAddress(hDllBaseAddress, "CalibrateSpectrometer");
- if (!pCalibrateSpectrometer) OutputDebugString(_T("Failed to load DLL function CalibrateSpectrometer\n"));
- pGetSpectrometerParam = (PGetSpectrometerParam)GetProcAddress(hDllBaseAddress, "GetSpectrometerParam");
- if (!pGetSpectrometerParam) OutputDebugString(_T("Failed to load DLL function GetSpectrometerParam\n"));
- pGetSpectrometerCount = (PGetSpectrometerCount)GetProcAddress(hDllBaseAddress, "GetSpectrometerCount");
- if (!pGetSpectrometerCount) OutputDebugString(_T("Failed to load DLL function GetSpectrometerCount\n"));
- pGetSpectrometerRanges = (PGetSpectrometerRanges)GetProcAddress(hDllBaseAddress, "GetSpectrometerRanges");
- if (!pGetSpectrometerRanges) OutputDebugString(_T("Failed to load DLL function GetSpectrometerRanges\n"));
- pGetSpectrometerParams = (PGetSpectrometerParams)GetProcAddress(hDllBaseAddress, "GetSpectrometerParams");
- if (!pGetSpectrometerParams) OutputDebugString(_T("Failed to load DLL function GetSpectrometerParams\n"));
- pGetSpectrum = (PGetSpectrum)GetProcAddress(hDllBaseAddress, "GetSpectrum");
- if (!pGetSpectrum) OutputDebugString(_T("Failed to load DLL function GetSpectrum\n"));
- pQuantifySpectrum = (PQuantifySpectrum)GetProcAddress(hDllBaseAddress, "QuantifySpectrum");
- if (!pQuantifySpectrum) OutputDebugString(_T("Failed to load DLL function QuantifySpectrum\n"));
- pSendRCLCommand = (PSendRCLCommand)GetProcAddress(hDllBaseAddress, "SendRCLCommand");
- if (!pSendRCLCommand) OutputDebugString(_T("Failed to load DLL funtion SendRCLCommand\n"));
- pSendRCLCommandOnly = (PSendRCLCommandOnly)GetProcAddress(hDllBaseAddress, "SendRCLCommandOnly");
- if (!pSendRCLCommandOnly) OutputDebugString(_T("Failed to load DLL function SendRCLCommandOnly\n"));
- pReceiveRCLAnswer = (PReceiveRCLAnswer)GetProcAddress(hDllBaseAddress, "ReceiveRCLAnswer");
- if (!pReceiveRCLAnswer) OutputDebugString(_T("Failed to load DLL function ReceiveRCLAnswer\n"));
- pLockSpectrometer = (PLockSpectrometer)GetProcAddress(hDllBaseAddress, "LockSpectrometer");
- if (!pLockSpectrometer) OutputDebugString(_T("Failed to load DLL function LockSpectrometer\n"));
- pUnlockSpectrometer = (PUnlockSpectrometer)GetProcAddress(hDllBaseAddress, "UnlockSpectrometer");
- if (!pUnlockSpectrometer) OutputDebugString(_T("Failed to load DLL function UnlockSpectrometer\n"));
- pLoadSpectrum = (PLoadSpectrum)GetProcAddress(hDllBaseAddress, "LoadSpectrum");
- if (!pLoadSpectrum) OutputDebugString(_T("Failed to load DLL function LoadSpectrum\n"));
- pPutSpectrum = (PPutSpectrum)GetProcAddress(hDllBaseAddress, "PutSpectrum");
- if (!pPutSpectrum) OutputDebugString(_T("Failed to load DLL function PutSpectrum\n"));
- pSaveSpectrum = (PSaveSpectrum)GetProcAddress(hDllBaseAddress, "SaveSpectrum");
- if (!pSaveSpectrum) OutputDebugString(_T("Failed to load DLL function SaveSpectrum\n"));
- pCreateSpectrum = (PCreateSpectrum)GetProcAddress(hDllBaseAddress, "CreateSpectrum");
- if (!pCreateSpectrum) OutputDebugString(_T("Failed to load DLL function CreateSpectrum\n"));
- pGetCorrectedSpectrum = (PGetCorrectedSpectrum)GetProcAddress(hDllBaseAddress, "GetCorrectedSpectrum");
- if (!pGetCorrectedSpectrum) OutputDebugString(_T("Failed to load DLL function GetCorrectedSpectrum\n"));
- pShowSpectrum = (PShowSpectrum)GetProcAddress(hDllBaseAddress, "ShowSpectrum");
- if (!pShowSpectrum) OutputDebugString(_T("Failed to load DLL function ShowSpectrum\n"));
- pDeleteSpectrum = (PDeleteSpectrum)GetProcAddress(hDllBaseAddress, "DeleteSpectrum");
- if (!pDeleteSpectrum) OutputDebugString(_T("Failed to load DLL function DeleteSpectrum\n"));
- pGetSpectrumGraphic = (PGetSpectrumGraphic)GetProcAddress(hDllBaseAddress, "GetSpectrumGraphic");
- if (!pGetSpectrumGraphic) OutputDebugString(_T("Failed to load DLL function GetSpectrumGraphic\n"));
- pGetHardwareProfiles = (PGetHardwareProfiles)GetProcAddress(hDllBaseAddress, "GetHardwareProfiles");
- if (!pGetHardwareProfiles) OutputDebugString(_T("Failed to load DLL function GetHardwareProfiles\n"));
- pSetHardwareProfile = (PSetHardwareProfile)GetProcAddress(hDllBaseAddress, "SetHardwareProfile");
- if (!pSetHardwareProfile) OutputDebugString(_T("Failed to load DLL function SetHardwareProfile\n"));
- pGetQuantificationMethods = (PGetQuantificationMethods)GetProcAddress(hDllBaseAddress, "GetQuantificationMethods");
- if (!pGetQuantificationMethods) OutputDebugString(_T("Failed to load DLL function GetQuantificationMethods\n"));
- pGetQuantificationMethodElements = (PGetQuantificationMethodElements)GetProcAddress(hDllBaseAddress, "GetQuantificationMethodElements");
- if (!pGetQuantificationMethodElements) OutputDebugString(_T("Failed to load DLL function GetQuantificationMethodElements\n"));
- pEditQuantificationMethod = (PEditQuantificationMethod)GetProcAddress(hDllBaseAddress, "EditQuantificationMethod");
- if (!pEditQuantificationMethod) OutputDebugString(_T("Failed to load DLL function EditQuantificationMethod\n"));
- pCopyQuantificationMethod = (PCopyQuantificationMethod)GetProcAddress(hDllBaseAddress, "CopyQuantificationMethod");
- if (!pCopyQuantificationMethod) OutputDebugString(_T("Failed to load DLL function CopyQuantificationMethod\n"));
- pGetRegionForElement = (PGetRegionForElement)GetProcAddress(hDllBaseAddress, "GetRegionForElement");
- if (!pGetRegionForElement) OutputDebugString(_T("Failed to load DLL function GetRegionForElement\n"));
- pXRayTubeSetConfiguration = (PXRayTubeSetConfiguration)GetProcAddress(hDllBaseAddress, "XRayTubeSetConfiguration");
- if (!pXRayTubeSetConfiguration) OutputDebugString(_T("Failed to load DLL function XRayTubeSetConfiguration\n"));
- pXRayTubeGetState = (PXRayTubeGetState)GetProcAddress(hDllBaseAddress, "XRayTubeGetState");
- if (!pXRayTubeGetState) OutputDebugString(_T("Failed to load DLL function XRayTubeGetState\n"));
- pXRayTubeOpenShutter = (PXRayTubeOpenShutter)GetProcAddress(hDllBaseAddress, "XRayTubeOpenShutter");
- if (!pXRayTubeOpenShutter) OutputDebugString(_T("Failed to load DLL function XRayTubeOpenShutter\n"));
- pXRayTubeCloseShutter = (PXRayTubeCloseShutter)GetProcAddress(hDllBaseAddress, "XRayTubeCloseShutter");
- if (!pXRayTubeCloseShutter) OutputDebugString(_T("Failed to load DLL function XRayTubeCloseShutter\n"));
- pXRayTubeHVOn = (PXRayTubeHVOn)GetProcAddress(hDllBaseAddress, "XRayTubeHVOn");
- if (!pXRayTubeHVOn) OutputDebugString(_T("Failed to load DLL function XRayTubeHVOn\n"));
-
- pXRaySetActiveTube = (PXRaySetActiveTube)GetProcAddress(hDllBaseAddress, "XRaySetActiveTube");
- if (!pXRaySetActiveTube) OutputDebugString(_T("Failed to load DLL function XRaySetActiveTube\n"));
-
- pXRayGetActiveTube = (PXRayGetActiveTube)GetProcAddress(hDllBaseAddress, "XRayGetActiveTube");
- if (!pXRayGetActiveTube) OutputDebugString(_T("Failed to load DLL function XRayGetActiveTube\n"));
- pSetImageExportParameter = (PSetImageExportParameter)GetProcAddress(hDllBaseAddress, "SetImageExportParameter");
- if (!pSetImageExportParameter) OutputDebugString(_T("Failed to load DLL function SetImageExportParameter\n"));
- pHyMapStop = (PHyMapStop)GetProcAddress(hDllBaseAddress, "HyMapStop");
- if (!pHyMapStop) OutputDebugString(_T("Failed to load DLL function HyMapStop\n"));
- pHyMapClearDatabase = (PHyMapClearDatabase)GetProcAddress(hDllBaseAddress, "HyMapClearDatabase");
- if (!pHyMapClearDatabase) OutputDebugString(_T("Failed to load DLL function HyMapClearDatabase\n"));
- pHyMapGetState = (PHyMapGetState)GetProcAddress(hDllBaseAddress, "HyMapGetState");
- if (!pHyMapGetState) OutputDebugString(_T("Failed to load DLL function HyMapGetState\n"));
- pHyMapGetStateEx = (PHyMapGetStateEx)GetProcAddress(hDllBaseAddress, "HyMapGetStateEx");
- if (!pHyMapGetStateEx) OutputDebugString(_T("Failed to load DLL function HyMapGetStateEx\n"));
- pHyMapGetXYSpectrum = (PHyMapGetXYSpectrum)GetProcAddress(hDllBaseAddress, "HyMapGetXYSpectrum");
- if (!pHyMapGetXYSpectrum) OutputDebugString(_T("Failed to load DLL function HyMapGetXYSpectrum\n"));
- pHyMapGetLineSpectra = (PHyMapGetLineSpectra)GetProcAddress(hDllBaseAddress, "HyMapGetLineSpectra");
- if (!pHyMapGetLineSpectra) OutputDebugString(_T("Failed to load DLL function HyMapGetLineSpectra\n"));
-
- pHyMapGetCompressedLineSpectra = (PHyMapGetCompressedLineSpectra)GetProcAddress(hDllBaseAddress, "HyMapGetCompressedLineSpectra");
- if (!pHyMapGetCompressedLineSpectra) OutputDebugString(_T("Failed to load DLL function HyMapGetCompressedLineSpectra\n"));
- pHyMapQuantifySpectra = (PHyMapQuantifySpectra)GetProcAddress(hDllBaseAddress, "HyMapQuantifySpectra");
- if (!pHyMapQuantifySpectra) OutputDebugString(_T("Failed to load DLL function HyMapQuantifySpectra\n"));
- pHyMapSaveToFile = (PHyMapSaveToFile)GetProcAddress(hDllBaseAddress, "HyMapSaveToFile");
- if (!pHyMapSaveToFile) OutputDebugString(_T("Failed to load DLL function HyMapSaveToFile\n"));
- pHyMapLoadFromFile = (PHyMapLoadFromFile)GetProcAddress(hDllBaseAddress, "HyMapLoadFromFile");
- if (!pHyMapLoadFromFile) OutputDebugString(_T("Failed to load DLL function HyMapLoadFromFile\n"));
- pHyMapGetMaxPixelSpectrum = (PHyMapGetMaxPixelSpectrum)GetProcAddress(hDllBaseAddress, "HyMapGetMaxPixelSpectrum");
- if (!pHyMapGetMaxPixelSpectrum) OutputDebugString(_T("Failed to load DLL function HyMapGetMaxPixelSpectrum\n"));
- pHyMapAutoIdent = (PHyMapAutoIdent)GetProcAddress(hDllBaseAddress, "HyMapAutoIdent");
- if (!pHyMapAutoIdent) OutputDebugString(_T("Failed to load DLL function HyMapAutoIdent\n"));
- pHyMapGetImage = (PHyMapGetImage)GetProcAddress(hDllBaseAddress, "HyMapGetImage");
- if (!pHyMapGetImage) OutputDebugString(_T("Failed to load DLL function HyMapGetImage\n"));
- pHyMapGetElementData = (PHyMapGetElementData)GetProcAddress(hDllBaseAddress, "HyMapGetElementData");
- if (!pHyMapGetElementData) OutputDebugString(_T("Failed to load DLL function HyMapGetElementData\n"));
- pHyMapGetElementImage = (PHyMapGetElementImage)GetProcAddress(hDllBaseAddress, "HyMapGetElementImage");
- if (!pHyMapGetElementImage) OutputDebugString(_T("Failed to load DLL function HyMapGetElementImage\n"));
- pHyMapGetMixedMapImage = (PHyMapGetMixedMapImage)GetProcAddress(hDllBaseAddress, "HyMapGetMixedMapImage");
- if (!pHyMapGetMixedMapImage) OutputDebugString(_T("Failed to load DLL function HyMapGetMixedMapImage\n"));
- pHyMapSaveImage = (PHyMapSaveImage)GetProcAddress(hDllBaseAddress, "HyMapSaveImage");
- if (!pHyMapSaveImage) OutputDebugString(_T("Failed to load DLL function HyMapSaveImage\n"));
- pHyMapSaveElementImage = (PHyMapSaveElementImage)GetProcAddress(hDllBaseAddress, "HyMapSaveElementImage");
- if (!pHyMapSaveElementImage) OutputDebugString(_T("Failed to load DLL function HyMapSaveElementImage\n"));
- pHyMapSaveMixedMapImage = (PHyMapSaveMixedMapImage)GetProcAddress(hDllBaseAddress, "HyMapSaveMixedMapImage");
- if (!pHyMapSaveMixedMapImage) OutputDebugString(_T("Failed to load DLL function HyMapSaveMixedMapImage\n"));
- return true;
- }
- // Converts Int-Value to String-Value
- std::string IntToString(int number)
- {
- std::ostringstream oss;
- oss << number;
- return oss.str();
- }
- // Converts Double-Value to String-Value
- std::string DoubleToString(double number)
- {
- std::ostringstream oss;
- oss.precision(4);
- oss << number;
- return oss.str();
- }
- int32_t SetLanguage(char* Language)
- {
- if (pSetLanguage)
- return pSetLanguage(Language);
- else return -1;
- }
- // Query all known servers for which can be used by client program
- int32_t QueryServers(char* pServerList, int32_t BufSize)
- {
- if (pQueryServers)
- return pQueryServers(pServerList, BufSize);
- else return -1;
- }
- // Query all running client programs for connected servers
- int32_t QueryUser(char* pServer, char* pClientBuf, int32_t BufSize)
- {
- if (pQueryUser)
- return pQueryUser(pServer, pClientBuf, BufSize);
- else return -1;
- }
- // Start Quantax program and login automatically
- // Password : Password of user with UserName
- // GUI : Whether to start the user interface or not
- // Result : Function call sucessful or not ( 0 = success, otherwise error )
- int32_t OpenClient(char* pServer, char* pUser, char* pPassword, bool StartNew, bool GUI, uint32_t& CID)
- {
- if (pOpenClient)
- return pOpenClient(pServer, pUser, pPassword, StartNew, GUI, CID);
- else return -1;
- }
- int32_t OpenClientEx(char* pServer, char* pUser, char* pPassword, const TOpenClientOptions& Options, uint32_t& CID)
- {
- if (pOpenClientEx)
- return pOpenClientEx(pServer, pUser, pPassword, Options, CID);
- else return -1;
- }
- int32_t OpenClientTCP(char* pServer, char* pUser, char* pPassword, char* pHost, uint16_t Port, const TOpenClientOptions Options, uint32_t& CID)
- {
- if (pOpenClientTCP)
- return pOpenClientTCP(pServer, pUser, pPassword, pHost, Port, Options, CID);
- else return -1;
- }
- // query some information about a specific connection
- int32_t QueryInfo(uint32_t CID, char* pInfo, int32_t BufSize)
- {
- if (pQueryInfo)
- return pQueryInfo(CID, pInfo, BufSize);
- else return -1;
- }
- // Close current connection
- // Result : Function call sucessful or not ( 0 = success, otherwise error )
- int32_t CloseConnection(uint32_t CID)
- {
- if (pCloseConnection)
- return pCloseConnection(CID);
- else return -1;
- }
- // Stop Quantax
- // Result : Function call sucessful or not ( 0 = success, otherwise error )
- int32_t CloseClient(uint32_t CID)
- {
- if (pCloseClient)
- return pCloseClient(CID);
- else return -1;
- }
- // returns description string for error values
- int32_t GetDebugErrorString(uint32_t CID, int32_t aError, char* pErrorStr, int32_t& BufSize)
- {
- if (pGetDebugErrorString)
- return pGetDebugErrorString(CID, aError, pErrorStr, BufSize);
- else return -1;
- }
- // writes description string for error values to log
- int32_t WriteDebugErrorStringToLog(uint32_t CID, int32_t aError)
- {
- if (pWriteDebugErrorStringToLog)
- return pWriteDebugErrorStringToLog(CID, aError);
- else return -1;
- }
- // Is a specific client connection ok?
- int32_t CheckConnection(uint32_t CID)
- {
- if (pCheckConnection)
- return pCheckConnection(CID);
- else return -1;
- }
- // Devices : bit combination of spectrometers to combine
- // Result : Function call sucessful or not ( 0 = success, otherwise error )
- int32_t CombineSpectrometer(uint32_t CID, int32_t Devices)
- {
- if (pCombineSpectrometer)
- return pCombineSpectrometer(CID, Devices);
- else return -1;
- }
- int32_t GetSpectrometerStatus(uint32_t CID, int32_t SPU, TRTSpectrometerStatus& Status)
- {
- if (pGetSpectrometerStatus)
- return pGetSpectrometerStatus(CID, SPU, Status);
- else return -1;
- }
- int32_t SetDetectorCoolingMode(uint32_t CID, int32_t SPU, int32_t Det, int32_t aCoolingMode)
- {
- if (pSetDetectorCoolingMode)
- return pSetDetectorCoolingMode(CID, SPU, Det, aCoolingMode);
- else return -1;
- }
- int32_t ResetSpectrometerInterlock(uint32_t CID, int32_t SPU)
- {
- if (pResetSpectrometerInterlock)
- return pResetSpectrometerInterlock(CID, SPU);
- else return -1;
- }
- // Device : Number of spectrometer ( 1 in most cases )
- // RealTime : Measure time in ms ( 0 means endless measurement )
- // Result : Function call sucessful or not ( 0 = success, otherwise error )
- int32_t StartSpectrumMeasurement(uint32_t CID, int32_t Device, uint32_t RealTime)
- {
- if (pStartSpectrumMeasurement)
- return pStartSpectrumMeasurement(CID, Device, RealTime);
- else return -1;
- }
- // Device : Number of spectrometer ( 1 in most cases )
- // LifeTime : Life time in ms ( > 0 )
- // Result : Function call sucessful or not ( 0 = success, otherwise error )
- int32_t StartSpectrumLifeTimeMeasurement(uint32_t CID, int32_t Device, uint32_t LifeTime)
- {
- if (pStartSpectrumLifeTimeMeasurement)
- return pStartSpectrumLifeTimeMeasurement(CID, Device, LifeTime);
- else return -1;
- }
- // Device : Number of spectrometer ( 1 in most cases )
- // StartEnergy,
- // EndEnergy : Spectrum region borders for counter measurement (in keV)
- // Counts : Counter value for automatic measurement stop
- // Result : Function call sucessful or not ( 0 = success, otherwise error )
- int32_t StartSpectrumCounterMeasurement(uint32_t CID, int32_t SPU, double StartEnergy, double EndEnergy, uint32_t Counts)
- {
- if (pStartSpectrumCounterMeasurement)
- return pStartSpectrumCounterMeasurement(CID, SPU, StartEnergy, EndEnergy, Counts);
- else return -1;
- }
- // Device : Number of spectrometer ( 1 in most cases )
- // Result : Function call sucessful or not ( 0 = success, otherwise error )
- int32_t StopSpectrumMeasurement(uint32_t CID, int32_t Device)
- {
- if (pStopSpectrumMeasurement)
- return pStopSpectrumMeasurement(CID, Device);
- else return -1;
- }
- // Read some values about current aquisition
- // Device : Number of spectrometer ( 1 in most cases )
- // Running : Aquisition active or not
- // State : State of aquisition in % ( 100 % means ready )
- // PulseRate
- // Result : Function call sucessful or not ( 0 = success, otherwise error )
- int32_t GetSpectrumMeasureState(uint32_t CID, int32_t Device, bool& Running, double& State, double& PulseRate)
- {
- if (pGetSpectrumMeasureState)
- return pGetSpectrumMeasureState(CID, Device, Running, State, PulseRate);
- else return -1;
- }
- // Device : Number of spectrometer ( 1 in most cases )
- // Running : Aquisition active or not
- // State : State of aquisition in % ( 100 % means ready )
- // PulseRate : current input pulse rate in cps
- // RealTime : current measure time in ms
- // Result : Function call sucessful or not ( 0 = success, otherwise error )
- int32_t GetSpectrumMeasureStateEx(uint32_t CID, int32_t Device, bool& Running, double& State, double& PulseRate, int32_t& RealTime)
- {
- if (pGetSpectrumMeasureStateEx)
- return pGetSpectrumMeasureStateEx(CID, Device, Running, State, PulseRate, RealTime);
- else return -1;
- }
- // Read current spectrum from spectrometer to buffer
- // Device : Number of spectrometer ( 1 in most cases )
- // Result : Function call sucessful or not ( 0 = success, otherwise error )
- int32_t ReadSpectrum(uint32_t CID, int32_t Device)
- {
- if (pReadSpectrum)
- return pReadSpectrum(CID, Device);
- else return -1;
- }
- int32_t GetSpectrometerConfiguration(uint32_t CID, int32_t SPU, uint32_t& MaxEnergy, uint32_t& PulseThroughput)
- {
- if (pGetSpectrometerConfiguration)
- return pGetSpectrometerConfiguration(CID, SPU, MaxEnergy, PulseThroughput);
- else return -1;
- }
- // Read current spectrometer configuration for a given detector
- int32_t GetSpectrometerConfigurationEx(uint32_t CID, int32_t SPU, int32_t Det, uint32_t& MaxEnergyIndex, uint32_t& PulseThroughputIndex)
- {
- if (pGetSpectrometerConfigurationEx)
- return pGetSpectrometerConfigurationEx(CID, SPU, Det, MaxEnergyIndex, PulseThroughputIndex);
- else return -1;
- }
- int32_t SetSpectrometerConfiguration(uint32_t CID, int32_t SPU, int32_t Det, const uint32_t MaxEnergyIndex, const uint32_t PulseThroughputIndex)
- {
- if (pSetSpectrometerConfiguration)
- return pSetSpectrometerConfiguration(CID, SPU, Det, MaxEnergyIndex, PulseThroughputIndex);
- else return -1;
- }
- // Detectors : Active Detectors as bitmask (1 shl 0, etc.)
- int32_t SetActiveDetectors(uint32_t CID, int32_t SPU, const uint32_t Detectors)
- {
- if (pSetActiveDetectors)
- return pSetActiveDetectors(CID, SPU, Detectors);
- else return -1;
- }
- // Detectors : Active Detectors as bitmask (1 shl 0, etc.)
- int32_t GetActiveDetectors(uint32_t CID, int32_t SPU, uint32_t& Detectors)
- {
- if (pGetActiveDetectors)
- return GetActiveDetectors(CID, SPU, Detectors);
- else return -1;
- }
- // Detectors : Available Detectors as bitmask (1 shl 0, etc.)
- int32_t GetAvailableDetectors(uint32_t CID, int32_t SPU, uint32_t& Detectors)
- {
- if (pGetAvailableDetectors)
- return pGetAvailableDetectors(CID, SPU, Detectors);
- else return -1;
- }
- // Detectors : Available WDSDetectors as bitmask (1 shl 0, etc.)
- int32_t GetAvailableWDSDetectors(uint32_t CID, int32_t SPU, uint32_t& Detectors)
- {
- if (pGetAvailableWDSDetectors)
- return pGetAvailableWDSDetectors(CID, SPU, Detectors);
- else return -1;
- }
- int32_t GetHardwareConfiguration(uint32_t CID, TRTHardwareConfiguration& aHardwareConfiguration)
- {
- if (pGetHardwareConfiguration)
- return pGetHardwareConfiguration(CID, aHardwareConfiguration);
- else return -1;
- }
- // Device : Number of spectrometer ( 1 in most cases )
- // Result : Function call sucessful or not ( 0 = success, otherwise error )
- int32_t CalibrateSpectrometer(uint32_t CID, int32_t Device, bool ShowProgress, PRTCalibSettings Settings, PRTCalibResults Results)
- {
- if (pCalibrateSpectrometer)
- return pCalibrateSpectrometer(CID, Device, ShowProgress, Settings, Results);
- else return -1;
- }
- // Device : Number of spectrometer ( 1 in most cases )
- // ParamName : Name of the parameter to read
- // Current implemented names: 'MaxEnergy', 'PulseThroughput', 'DetectorTemperature' as 'Integer' or 'Double'
- // ParamType : Type of the parameter to read (Byte,Boolean,Word,Integer,Double,Memory)
- // Buffer : Pointer to variable of that type
- // BufSize : if ParamType is Memory than BufSize if size of the memory block described by 'Buffer'
- // Result : Function call sucessful or not ( 0 = success, otherwise error )
- int32_t GetSpectrometerParam(uint32_t CID, int32_t Device, char* ParamName, char* ParamType, void* Buffer, int32_t BufSize)
- {
- if (pGetSpectrometerParam)
- return pGetSpectrometerParam(CID, Device, ParamName, ParamType, Buffer, BufSize);
- else return -1;
- }
- // Reads the amount of available spectrometers
- int32_t GetSpectrometerCount(uint32_t CID, int32_t& Value)
- {
- if (pGetSpectrometerCount)
- return pGetSpectrometerCount(CID, Value);
- else return -1;
- }
- // Gets SpectrometerRanges (Pulserate and EnergyRange)
- // MaxEnergy
- // PulseThroughPut
- // EnergyIndexCount
- // PulseIndexCount
- int32_t GetSpectrometerRanges(uint32_t CID, int32_t SPU, int32_t Det, TRTDetectorRanges& aDetectorSettings)
- {
- if (pGetSpectrometerRanges)
- return pGetSpectrometerRanges(CID, SPU, Det, aDetectorSettings);
- else return -1;
- }
- // Read full parameter block of current spectrometer params (needed to create full Bruker spectrum)
- int32_t GetSpectrometerParams(uint32_t CID, int32_t SPU, void* Buffer, int32_t& BufSize)
- {
- if (pGetSpectrometerParams)
- return pGetSpectrometerParams(CID, SPU, Buffer, BufSize);
- else return -1;
- }
- // Buffer : Buffer index ( 0 for loaded spectrum buffer, > 0 for spectrometer buffers )
- // Result : Function call sucessful or not ( 0 = success, otherwise error )
- int32_t GetSpectrum(uint32_t CID, int32_t Buffer, PRTSpectrumHeaderRec pSpectrumBuf, int32_t BufSize)
- {
- if (pGetSpectrum)
- return pGetSpectrum(CID, Buffer, pSpectrumBuf, BufSize);
- else return -1;
- }
- // Device : Number of spectrometer ( 1 in most cases )
- // Result : Function call sucessful or not ( 0 = success, otherwise error )
- int32_t QuantifySpectrum(uint32_t CID, int32_t Buffer, char* pMethodName, char* pParams, char* pResultBuf, int32_t ResultBufSize)
- {
- if (pQuantifySpectrum)
- return pQuantifySpectrum(CID, Buffer, pMethodName, pParams, pResultBuf, ResultBufSize);
- else return -1;
- }
- // Sends a RCL 2.2 command to spectrometer and returns the answer( see RCL 2.2 description of commands )
- // Device : Number of spectrometer ( 1 in most cases )
- // Result : Function call sucessful or not ( 0 = success, otherwise error )
- int32_t SendRCLCommand(uint32_t CID, int32_t Device, char* pCommand, char* pAnswer, int32_t AnswerBufSize)
- {
- if (pSendRCLCommand)
- return pSendRCLCommand(CID, Device, pCommand, pAnswer, AnswerBufSize);
- else return -1;
- }
- // Sends a RCL 2.2 command to spectrometer, does not wait for answer ( see RCL 2.2 description of commands )
- int32_t SendRCLCommandOnly(uint32_t CID, int32_t Device, char* Command)
- {
- if (pSendRCLCommandOnly)
- return pSendRCLCommandOnly(CID, Device, Command);
- else return -1;
- }
- // Receives the answer of the above function
- int32_t ReceiveRCLAnswer(uint32_t CID, int32_t Device, char* Answer, int32_t AnswerBufSize)
- {
- if (pReceiveRCLAnswer)
- return pReceiveRCLAnswer(CID, Device, Answer, AnswerBufSize);
- else return -1;
- }
- // Interupts QM100's communication to specified device until 'UnlockSpectrometer' is called
- int32_t LockSpectrometer(uint32_t CID, int32_t Device)
- {
- if (pLockSpectrometer)
- return pLockSpectrometer(CID, Device);
- else return -1;
- }
- int32_t UnlockSpectrometer(uint32_t CID, int32_t Device)
- {
- if (pUnlockSpectrometer)
- return pUnlockSpectrometer(CID, Device);
- else return -1;
- }
- // Load spectrum from file to buffer
- // pFilename : Complete filename for spectrum ( normally with *.spx extension )
- // Result : Function call sucessful or not ( 0 = success, otherwise error )
- int32_t LoadSpectrum(uint32_t CID, char* pFileName)
- {
- if (pLoadSpectrum)
- return pLoadSpectrum(CID, pFileName);
- else return -1;
- }
- // Send spectrum back to 'loaded' buffer
- // Spectrum : Bruker spectrum buffer
- // BufferSize : size of spectrum buffer
- // Result : Function call sucessful or not ( 0 = success, otherwise error )
- // Remarks : if one wants to use that function one has to build a complete Bruker spectrum with
- // functions 'GetSpectrum', 'GetSpectrometerParams' and 'CreateSpectrum'
- int32_t PutSpectrum(uint32_t CID, void* Spectrum, int32_t BufSize)
- {
- if (pPutSpectrum)
- return pPutSpectrum(CID, Spectrum, BufSize);
- else return -1;
- }
- // Save spectrum buffer to file
- // pFilename : Complete filename for spectrum ( normally with *.spx extension )
- // Result : Function call sucessful or not ( 0 = success, otherwise error )
- int32_t SaveSpectrum(uint32_t CID, int32_t Buffer, char* pFileName)
- {
- if (pSaveSpectrum)
- return pSaveSpectrum(CID, Buffer, pFileName);
- else return -1;
- }
- // Create a complete Bruker spectrum from
- int32_t CreateSpectrum(char* SpectrometerParams, PRTSpectrumHeaderRec SpectrumData, char* ResultData, int32_t& ResultSize)
- {
- if (pCreateSpectrum)
- return pCreateSpectrum(SpectrometerParams, SpectrumData, ResultData, ResultSize);
- else return -1;
- }
- int32_t GetCorrectedSpectrum(char* SpectrometerParams, PRTSpectrumHeaderRec Spectrum, double* ResultData)
- {
- if (pGetCorrectedSpectrum)
- return pGetCorrectedSpectrum(SpectrometerParams, Spectrum, ResultData);
- else return -1;
- }
- int32_t ShowSpectrum(uint32_t CID, int32_t Buffer, char* Name)
- {
- if (pShowSpectrum)
- return pShowSpectrum(CID, Buffer, Name);
- else return -1;
- }
- int32_t DeleteSpectrum(uint32_t CID, char* aName)
- {
- if (pDeleteSpectrum)
- return pDeleteSpectrum(CID, aName);
- else return -1;
- }
- // Buffer : Buffer index ( 0 for loaded spectrum buffer, > 0 for spectrometer buffers )
- // Width,
- // Height : Graphic dimension
- // Format : bmp, png, jpeg, tif
- // ResultBuf : should be able to save the whole image
- // ResultBufSize : input is maximum, output is really used
- int32_t GetSpectrumGraphic(uint32_t CID, int32_t Buffer, int32_t Width, int32_t Height, char* Format, void* ResultBuf, uint32_t& ResultBufSize)
- {
- if (pGetSpectrumGraphic)
- return pGetSpectrumGraphic(CID, Buffer, Width, Height, Format, ResultBuf, ResultBufSize);
- else return -1;
- }
- // Get a list of avaliable hardware profiles from client
- int32_t GetHardwareProfiles(uint32_t CID, char* pProfiles, int32_t BufSize)
- {
- if (pGetHardwareProfiles)
- return pGetHardwareProfiles(CID, pProfiles, BufSize);
- else return -1;
- }
- // Set a specific hardware profile
- int32_t SetHardwareProfile(uint32_t CID, char* pProfile)
- {
- if (pSetHardwareProfile)
- return pSetHardwareProfile(CID, pProfile);
- else return -1;
- }
- // Get a list of avaliable quantification methods
- int32_t GetQuantificationMethods(uint32_t CID, bool AutomaticOnly, char* pMethods, int32_t BufSize)
- {
- if (pGetQuantificationMethods)
- return pGetQuantificationMethods(CID, AutomaticOnly, pMethods, BufSize);
- else return -1;
- }
- // Get a list of predefined elements from a given quant method
- int32_t GetQuantificationMethodElements(uint32_t CID, char* MethodName, char* ElementBuffer, int32_t BufSize)
- {
- if (pGetQuantificationMethodElements)
- return pGetQuantificationMethodElements(CID, MethodName, ElementBuffer, BufSize);
- else return -1;
- }
- // Call method editor for a given quant method
- int32_t EditQuantificationMethod(uint32_t CID, char* MethodName)
- {
- if (pEditQuantificationMethod)
- return pEditQuantificationMethod(CID, MethodName);
- else return -1;
- }
- // Loads a method and saves it again. purpose: rename, conversion from mtd into mtdx
- int32_t CopyQuantificationMethod(uint32_t CID, char* MethodName, char* TargetName, bool ToProfile)
- {
- if (pCopyQuantificationMethod)
- return pCopyQuantificationMethod(CID, MethodName, TargetName, ToProfile);
- else return -1;
- }
- // Get a channel region for desired element and X ray line
- int32_t GetRegionForElement(uint32_t CID, int32_t Buffer, char* Params, char* ResultBuf, int32_t ResultBufSize)
- {
- if (pGetRegionForElement)
- return pGetRegionForElement(CID, Buffer, Params, ResultBuf, ResultBufSize);
- else return -1;
- }
- // HighVoltage : tube voltate [Volt]
- // Current : tube current [µA]
- // FilterIndex : index of selected filter
- int32_t XRayTubeSetConfiguration(uint32_t CID, int32_t Tube, uint32_t HighVoltage, uint32_t Current, uint32_t FilterIndex)
- {
- if (pXRayTubeSetConfiguration)
- return pXRayTubeSetConfiguration(CID, Tube, HighVoltage, Current, FilterIndex);
- else return -1;
- }
- // HighVoltage : tube voltate [Volt]
- // Current : tube current [µA]
- // FilterIndex : index of selected filter
- int32_t XRayTubeGetState(uint32_t CID, int32_t Tube, uint32_t& HighVoltage, uint32_t& Current, uint32_t& FilterIndex, bool& ShutterOpen)
- {
- if (pXRayTubeGetState)
- return pXRayTubeGetState(CID, Tube, HighVoltage, Current, FilterIndex, ShutterOpen);
- else return -1;
- }
- int32_t XRayTubeOpenShutter(uint32_t CID, int32_t Tube)
- {
- if (pXRayTubeOpenShutter)
- return pXRayTubeOpenShutter(CID, Tube);
- else return -1;
- }
- int32_t XRayTubeCloseShutter(uint32_t CID, int32_t Tube)
- {
- if (pXRayTubeCloseShutter)
- return pXRayTubeCloseShutter(CID, Tube);
- else return -1;
- }
- int32_t XRaySetActiveTube(uint32_t CID, int32_t Tube)
- {
- if (pXRaySetActiveTube)
- return pXRaySetActiveTube(CID, Tube);
- else return -1;
- }
- int32_t XRayGetActiveTube(uint32_t CID, int32_t& Tube)
- {
- if (pXRayGetActiveTube)
- return pXRayGetActiveTube(CID, Tube);
- else return -1;
- }
- int32_t XRayTubeHVOn(uint32_t CID, int32_t Tube, int32_t DestHV, int32_t DestCurrent, bool HVOn)
- {
- if (pXRayTubeHVOn)
- return pXRayTubeHVOn(CID, Tube, DestHV, DestCurrent, HVOn);
- else return -1;
- }
- int32_t SetImageExportParameter(uint32_t CID, int32_t ExportImageWidth, bool ExportWithOverlay)
- {
- if (pSetImageExportParameter)
- return pSetImageExportParameter(CID, ExportImageWidth, ExportWithOverlay);
- else return -1;
- }
- int32_t HyMapStop(uint32_t CID, bool WaitForFrameEnd)
- {
- if (pHyMapStop)
- return pHyMapStop(CID, WaitForFrameEnd);
- else return -1;
- }
- int32_t HyMapClearDatabase(uint32_t CID)
- {
- if (pHyMapClearDatabase)
- return pHyMapClearDatabase(CID);
- else return -1;
- }
- int32_t HyMapGetState(uint32_t CID, bool& Running, double& MeasureState)
- {
- if (pHyMapGetState)
- return pHyMapGetState(CID, Running, MeasureState);
- else return -1;
- }
- int32_t HyMapGetStateEx(uint32_t CID, bool& Running, double& MeasureState, int32_t& CurrentLine)
- {
- if (pHyMapGetStateEx)
- return pHyMapGetStateEx(CID, Running, MeasureState, CurrentLine);
- else return -1;
- }
- int32_t HyMapGetXYSpectrum(uint32_t CID, int32_t X, int32_t Y, bool Corrected, PRTSpectrumHeaderRec SpectrumBuffer, int32_t BufferSize)
- {
- if (pHyMapGetXYSpectrum)
- return pHyMapGetXYSpectrum(CID, X, Y, Corrected, SpectrumBuffer, BufferSize);
- else return -1;
- }
- // SpectrumBuffer : pointer to array of pointers for spectra, must have space for 'Count' pointers, each with allocated space for a full spectrum
- int32_t HyMapGetLineSpectra(uint32_t CID, int32_t X, int32_t Y, int32_t Count, bool Corrected, PPointerArray SpectrumBuffer, int32_t BufferSize)
- {
- if (pHyMapGetLineSpectra)
- return pHyMapGetLineSpectra(CID, X, Y, Count, Corrected, SpectrumBuffer, BufferSize);
- else return -1;
- }
- // SpectrumBuffer : pointer to array of pointers for spectra, must have space for 'Count' pointers, each with allocated space for a full spectrum
- int32_t HyMapGetCompressedLineSpectra(uint32_t CID, int32_t X, int32_t Y, int32_t Count, bool Corrected, PPointerArray SpectrumBuffer, int32_t BufferSize)
- {
- if (pHyMapGetCompressedLineSpectra)
- return pHyMapGetCompressedLineSpectra(CID, X, Y, Count, Corrected, SpectrumBuffer, BufferSize);
- else return -1;
- }
- int32_t HyMapQuantifySpectra(uint32_t CID, PPointArray Points, int32_t PointCount, int32_t Binning, char* MethodName, char* Params, char* ResultBuf, int32_t ResultBufSize)
- {
- if (pHyMapQuantifySpectra)
- return pHyMapQuantifySpectra(CID, Points, PointCount, Binning, MethodName, Params, ResultBuf, ResultBufSize);
- else return -1;
- }
- // aFileName : file name
- int32_t HyMapSaveToFile(uint32_t CID, char* aFileName)
- {
- if (pHyMapSaveToFile)
- return pHyMapSaveToFile(CID, aFileName);
- else return -1;
- }
- // aFileName : file name
- int32_t HyMapLoadFromFile(unsigned _int32 CID, char* aFileName, int32_t& Width, int32_t& Height, int32_t& DetCount, int32_t& ImgCount)
- {
- if (pHyMapLoadFromFile)
- return pHyMapLoadFromFile(CID, aFileName, Width, Height, DetCount, ImgCount);
- else return -1;
- }
- // SpectrumBuffer : pointer to memory, must have space for one full spectrum
- // BufferSize : size of the above buffer
- int32_t HyMapGetMaxPixelSpectrum(uint32_t CID, PRTSpectrumHeaderRec SpectrumBuffer, int32_t BufferSize)
- {
- if (pHyMapGetMaxPixelSpectrum)
- return pHyMapGetMaxPixelSpectrum(CID, SpectrumBuffer, BufferSize);
- else return -1;
- }
- // pMethodName : name of method to be used
- // pElementBuffer : buffer to get a list of atomic numbers as result of element identification
- // ElementBufSize : size of element buffer
- int32_t HyMapAutoIdent(uint32_t CID, char* pMethodName, char* pElementBuffer, int32_t ElementBufSize)
- {
- if (pHyMapAutoIdent)
- return pHyMapAutoIdent(CID, pMethodName, pElementBuffer, ElementBufSize);
- else return -1;
- }
- // Format : bmp, png, jpeg, tif
- // ImgChannel : the plane to be shown
- // Buffer : should be able to save the whole image
- // Buffersize : input is maximum, output is really used
- int32_t HyMapGetImage(uint32_t CID, char* Format, int32_t ImgChannel, void* Buffer, uint32_t& BufferSize)
- {
- if (pHyMapGetImage)
- return pHyMapGetImage(CID, Format, ImgChannel, Buffer, BufferSize);
- else return -1;
- }
- // ElementIndex : the plane to be shown
- // Buffer : should be able to save the whole image
- // Buffersize : input is maximum, output is really used
- int32_t HyMapGetElementData(uint32_t CID, int32_t ElementIndex, void* Buffer, uint32_t& BufferSize)
- {
- if (pHyMapGetElementData)
- return pHyMapGetElementData(CID, ElementIndex, Buffer, BufferSize);
- else return -1;
- }
- // Format : bmp, png, jpeg, tif
- // ElementIndex : the plane to be shown
- // Buffer : should be able to save the whole image
- // Buffersize : input is maximum, output is really used
- int32_t HyMapGetElementImage(uint32_t CID, char* Format, int32_t ElementIndex, void* Buffer, uint32_t& BufferSize)
- {
- if (pHyMapGetElementImage)
- return pHyMapGetElementImage(CID, Format, ElementIndex, Buffer, BufferSize);
- else return -1;
- }
- // Format : bmp, png, jpeg, tif
- // Buffer : should be able to save the whole image
- // Buffersize : input is maximum, output is really used
- int32_t HyMapGetMixedMapImage(uint32_t CID, char* Format, void* Buffer, uint32_t& BufferSize)
- {
- if (pHyMapGetMixedMapImage)
- return pHyMapGetMixedMapImage(CID, Format, Buffer, BufferSize);
- else return -1;
- }
- // ImgChannel : the plane to be shown
- // aFileName : file name
- int32_t HyMapSaveImage(uint32_t CID, int32_t ImgChannel, char* aFileName)
- {
- if (pHyMapSaveImage)
- return pHyMapSaveImage(CID, ImgChannel, aFileName);
- else return -1;
- }
- // ElementIndex : the plane to be shown
- // aFileName : file name
- int32_t HyMapSaveElementImage(uint32_t CID, int32_t ElementIndex, char* aFileName)
- {
- if (pHyMapSaveElementImage)
- return pHyMapSaveElementImage(CID, ElementIndex, aFileName);
- else return -1;
- }
- // aFileName : file name
- int32_t HyMapSaveMixedMapImage(uint32_t CID, char* aFileName)
- {
- if (pHyMapSaveMixedMapImage)
- return pHyMapSaveMixedMapImage(CID, aFileName);
- else return -1;
- }
- }
|