7 #include "isisinstrumentcontrol.h"
17 static const IID*
const arr[] =
22 for (
int i=0; i <
sizeof(arr) /
sizeof(arr[0]); i++)
24 if (InlineIsEqualGUID(*arr[i],riid))
34 HRESULT
reportError(T* obj,
const std::string& errmsg)
42 AtlReportError(obj->GetObjectCLSID(), errmsg.c_str());
65 result = func(the_icp, boost::ref(status));
67 catch(
const std::exception& ex)
73 exc_mess =
"Unknown Win32 exception";
77 if (exc_mess.size() > 0)
88 return callICP<T>(messages, icp_result, func);
91 static int getXML(
const BSTR xml_in, std::string& xml_out)
94 l = SysStringLen(xml_in);
95 n = WideCharToMultiByte(CP_ACP, 0, xml_in, l, 0, 0, NULL, NULL);
96 char* buffer =
new char[n+1];
97 WideCharToMultiByte(CP_ACP, 0, xml_in, l, buffer, n, NULL, NULL);
101 if (buffer[i] ==
'\0')
114 int n =
sizeof(buffer) - 1;
115 wcstombs(buffer, bstr, n);
123 int dims_array[10], ndims, i, j, k;
124 dims_array[0] = dims_array[1] = 0;
125 BSTR* bstr_array = NULL;
129 string_table.resize(dims_array[0]);
130 for(i=0; i<dims_array[0]; i++)
132 string_table[i].resize(dims_array[1]);
135 for(j=0; j<dims_array[1]; j++)
137 for(i=0; i<dims_array[0]; i++)
150 if (cluster_xml == NULL || *cluster_xml == NULL)
167 wchar_t* wbuffer = NULL;
171 wbuffer =
new wchar_t[l + 1];
172 mbstowcs(wbuffer, str, l+1);
173 bstr = SysAllocString(wbuffer);
178 bstr = SysAllocString(L
"");
187 wchar_t* wbuffer = NULL;
191 wbuffer =
new wchar_t[l + 1];
192 mbstowcs(wbuffer, str, l+1);
193 SysReAllocString(bstr, wbuffer);
198 SysReAllocString(bstr, L
"");
207 std::ostringstream info_stream, all_stream;
208 status.
reportAll(all_stream,
false,
false);
209 std::string all_stream_str(all_stream.str());
210 if (force_success_result)
212 if (all_stream_str.length() > 0)
220 if (all_stream_str.length() > 0)
226 std::string info_string(info_stream.str());
227 if (messages != NULL)
229 *messages =
makeBSTR(info_string.c_str());
237 std::ostringstream error_stream;
239 std::string error_string(error_stream.str());
240 return AtlReportError(GetObjectCLSID(), error_string.c_str(), __uuidof(Idae));
284 STDMETHODIMP
Cdae::getSpectrum(LONG spectrum_number, LONG period, VARIANT* time_channels, VARIANT* signal, LONG as_histogram, LONG as_distribution, LONG* sum, BSTR* messages)
289 VariantInit(time_channels);
291 double *time_array = 0, *signal_array = 0, *error_array=0;
306 dims_array[0] = ntc+1;
311 if ( (time_array == 0) || (signal_array == 0) )
317 error_array =
new double[ntc];
318 the_icp->
getSpectrum(spectrum_number, period-1, time_array, signal_array, error_array,
319 (as_histogram != 0 ?
true :
false), (as_distribution != 0 ?
true :
false), *sum, status);
320 delete[] error_array;
341 STDMETHODIMP
Cdae::getSpectrumIntegral(LONG spectrum_number, LONG period, FLOAT time_low, FLOAT time_high, LONG* counts, BSTR* messages)
354 the_icp->
getSpectrumIntegral(spectrum_number, period-1, time_low, time_high, *counts, max_val, status);
360 HRESULT
Cdae::getSpectraIntegralHelper(spec_int_func_t func, VARIANT spectrum_numbers, LONG period, VARIANT time_low, VARIANT time_high, VARIANT* counts, BSTR* messages)
377 long* max_vals =
new long[dims_array[0]];
384 (the_icp->*func)(dims_array[0], spec, period-1, tlow, thigh, cnts, max_vals, status);
394 STDMETHODIMP
Cdae::getSpectraIntegral(VARIANT spectrum_numbers, LONG period, VARIANT time_low, VARIANT time_high, VARIANT* counts, BSTR* messages)
399 STDMETHODIMP
Cdae::getSpectraIntegral2(LONG spec_start, LONG nspectra, LONG period, FLOAT time_low, FLOAT time_high, VARIANT* counts, BSTR* messages)
413 dims_array[0] = nspectra;
433 STDMETHODIMP
Cdae::getsect(LONG start, LONG length, VARIANT* values, BSTR* messages)
447 dims_array[0] = length;
457 STDMETHODIMP
Cdae::rio(LONG address, LONG* value, BSTR* messages)
471 the_icp->
RIO(address, word, status);
493 wcstombs(item_name, name,
sizeof(item_name));
494 for(i=0; i<strlen(item_name); i++)
496 item_name[i] = toupper(item_name[i]);
507 const char* name_temp;
511 int i, n, ndims, dims_array[10];
512 if (strchr(item_name,
',') != NULL)
515 for(i=0; i<strlen(item_name); i++)
517 if (item_name[i] ==
',')
524 item_temp = strdup(item_name);
525 name_temp = strtok(item_temp,
",");
527 while(name_temp != NULL)
530 name_temp = strtok(NULL,
",");
537 if (n < dims_array[0])
539 for(i=n; i<dims_array[0]; i++)
541 VariantInit(varray + i);
551 the_icp->
getIntItem(item_name, args, nargs, larray, status);
558 the_icp->
getRealItem(item_name, args, nargs, darray, status);
565 dims_array[0] = nargs;
576 dims_array[0] = nargs;
593 const char* name_temp;
597 int i, n, ndims, dims_array[10];
598 if (strchr(item_name,
',') != NULL)
601 for(i=0; i<strlen(item_name); i++)
603 if (item_name[i] ==
',')
610 item_temp = strdup(item_name);
611 name_temp = strtok(item_temp,
",");
613 while(name_temp != NULL)
616 name_temp = strtok(NULL,
",");
623 if (n < dims_array[0])
625 for(i=n; i<dims_array[0]; i++)
627 VariantInit(varray + i);
658 CComBSTR b(cvalue.c_str());
683 STDMETHODIMP
Cdae::getSpectraSum(LONG period, LONG first_spec, LONG num_spec, LONG spec_type, DOUBLE time_low, DOUBLE time_high, VARIANT* sums, VARIANT* max_vals, VARIANT* spec_nums, BSTR* messages)
688 VariantInit(max_vals);
689 VariantInit(spec_nums);
699 long *cnts, *maxs, *nums;
701 int nspec = num_spec;
709 int spec = first_spec;
714 cnts[j] = maxs[j] = 0;
720 the_icp->
getSpectrumIntegral(spec, period-1, time_low, time_high, cnts[j], maxs[j], status);
721 if ( (spec_type == 0) ||
722 ((spec_type == 1) && (cnts[j] == 0)) ||
723 ((spec_type == 2) && (cnts[j] > 0))
774 std::ostringstream os;
783 STDMETHODIMP
Cdae::VMEWriteValue(ULONG card_id, ULONG card_address, ULONG word_size, ULONG value, ULONG mode, BSTR* messages)
792 bool sixteen_bit = (word_size == 0);
796 the_icp->
VMEWriteValue(card_id, card_address, sixteen_bit, value, mode, status);
801 STDMETHODIMP
Cdae::VMEReadValue(ULONG card_id, ULONG card_address, ULONG word_size, ULONG* value, BSTR* messages)
810 bool sixteen_bit = (word_size == 0);
814 the_icp->
VMEReadValue(card_id, card_address, sixteen_bit, value, status);
854 STDMETHODIMP
Cdae::VMEReadArray(ULONG card_id, ULONG card_address, VARIANT* values, ULONG num_values, BSTR* messages)
869 dims_array[0] = num_values;
902 std::string str_values;
909 bool sixteen_bit = (word_size == 0);
914 *values =
makeBSTR(str_values.c_str());
934 if (options_xml == NULL || *options_xml == NULL)
960 wcstombs(item_name, name,
sizeof(item_name));
961 for(i=0; i<strlen(item_name); i++)
963 item_name[i] = toupper(item_name[i]);
1001 wcstombs(item_name, name,
sizeof(item_name));
1002 if (!stricmp(item_name,
"RUN_NUMBER"))
1006 if (!stricmp(item_name,
"RUN_STATUS"))
1017 char notify_param[256];
1018 wcstombs(notify_param, param,
sizeof(notify_param));
1054 if (the_icp == NULL)
1079 int64_t counts64 = 0;
1081 if ( counts64 < std::numeric_limits<LONG>::max() )
1083 *counts =
static_cast<LONG
>(counts64);
1087 *counts = std::numeric_limits<LONG>::max();
1107 *daq_period = dp + 1;
1114 wcstombs(fname, filename,
sizeof(fname));
1127 std::string xml_s_in, xml_s_out;
1128 getXML(xml_in, xml_s_in);
1129 HRESULT hr = callICP<int>(messages, boost::bind(func, _1, boost::cref(xml_s_in), boost::ref(xml_s_out), _2));
1134 *xml_out =
makeBSTR(xml_s_out.c_str());
1143 return callICP<int>(messages, boost::bind(func, _1, boost::cref(xml_s), _2));
1157 STDMETHODIMP
Cdae::getTCB(BSTR tcb_xml_in, BSTR* tcb_xml_out, BSTR* messages)
1176 if (the_icp == NULL)
1198 if (the_icp == NULL)
1217 std::string veto_text1, veto_text2;
1218 char time_stamp[128];
1219 *veto_status = NULL;
1226 strftime(time_stamp,
sizeof(time_stamp),
"Last Updated: %H:%M:%S", localtime(&timer));
1227 *veto_status =
makeBSTR((veto_text1 +
"\n" + veto_text2 +
"\n" + time_stamp).c_str());
1240 std::string veto_name;
1249 if (the_icp == NULL)
1268 if (the_icp == NULL)
1314 VariantInit(messages);
1316 if (the_icp == NULL)
1320 int dims_array[1] = { 0 };
1321 if (g_status.
size() == 0)
1327 dims_array[0] = g_status.
size();
1329 BSTR* messages_bstr = NULL;
1332 bool stat_ok = g_status.
OK();
1367 int dims_array[1] = { nper };
1388 int dims_array[1] = { nper };
1435 if (the_icp == NULL)
1457 bool is_complete =
false;
1459 *complete = (is_complete ? 1 : 0);
1478 *status_xml_out = CComBSTR(status_xml_in).Detach();
HRESULT storeCRPT(BSTR *messages)
int VMEReadValue(unsigned long card_id, unsigned long card_address, bool sixteen_bit, unsigned long *value, DAEstatus &status)
#define NULL_TERMINATE(__array)
null terminate a char[n] static array
int setSampleParameters(const string_table_t &table, DAEstatus &status)
HRESULT changePeriodWhileRunning(LONG period, LONG pause_first, BSTR *messages)
HRESULT sumAllSpectra(LONG *counts, LONG *bin0_counts, BSTR *messages)
HRESULT changePeriod(LONG period_number, BSTR *messages)
HRESULT getGoodUAmpHPeriod(BSTR *messages, DOUBLE *value)
HRESULT changeMonitoringSettings(BSTR monitor_xml, BSTR *messages)
int refreshCachedValues(DAEstatus &status)
int allocateArrayVariant(VARIANT *v, VARTYPE v_type, int *dims_array, int ndims)
report_struct(BSTR *messages, int _n)
HRESULT checkTestPattern(ULONG pattern, BSTR *messages)
int getMEvents(double &mevents, DAEstatus &status)
int getNumberOfSpectra(DAEstatus &status)
HRESULT getGoodFramesPeriod(BSTR *messages, LONG *value)
int getHardwarePeriodsXML(const std::string &periods_xml_in, std::string &periods_xml_out, DAEstatus &status)
HRESULT startSEWait(BSTR *messages)
float getGoodUAmpH(DAEstatus &status)
int getIntArrayItemSize(const char *item_name, int *dims_array, int &ndims, DAEstatus &status)
int getRealItem(const char *item_name, double &dblVal, DAEstatus &status)
int getValueMain(ISISinstrumentControl *the_icp, const char *item_name, VARIANT *result, DAEstatus &status)
HRESULT getTotalCounts(BSTR *messages, LONG *counts)
int addVa(int facility, int severity, int errtype, const char *format,...)
static DAEstatus g_status
int RIO(isis32_t bus_addr, isisU16_t &word, DAEstatus &status)
int getNumberOfPeriods(DAEstatus &status)
static Poco::SingletonHolder< InstrumentControlHolder > g_icp_singleton
HRESULT changeUpdateSettings(BSTR update_xml, BSTR *messages)
void registerICPCallbacks()
HRESULT setOptions(BSTR options_xml, BSTR *messages)
std::ostream & printStatus(std::ostream &os, DAEstatus &dstatus)
HRESULT endRun(BSTR *messages)
HRESULT setBeamlineParameters(VARIANT table, BSTR *messages)
HRESULT getMEventsPeriod(LONG period, BSTR *messages, DOUBLE *mevents)
int report(int severity, int direction, bool reset_overall_severity=true, bool remove_messages=true)
HRESULT VMEWriteArray(ULONG card_id, ULONG card_address, VARIANT values, BSTR *messages)
int getRealArrayItem(const char *item_name, double *darray, DAEstatus &status)
int storeCRPT(DAEstatus &status)
int updateUserXML(const std::string &user_xml, DAEstatus &status)
HRESULT getArrayValue(BSTR name, VARIANT arg, BSTR *messages, VARIANT *result)
HRESULT isFinalSequenceComplete(BSTR *messages, LONG *complete)
int endSEWait(DAEstatus &dstatus)
int beginRunEx(bool start_paused, bool delayed_start, long period, DAEstatus &status)
int setRunStatus(long number, DAEstatus &status)
int updateMonitoringXML(const std::string &monitor_xml, DAEstatus &status)
HRESULT getCRPTSpectraIntegral(VARIANT spectrum_numbers, LONG period, VARIANT time_low, VARIANT time_high, VARIANT *counts, BSTR *messages)
HRESULT getValue(BSTR name, BSTR *messages, VARIANT *result)
HRESULT getGoodUAmpH(BSTR *messages, DOUBLE *value)
int getCurrentPeriodGoodFrames(DAEstatus &status)
int whichVeto(std::string &veto_text, DAEstatus &status)
HRESULT getSpectraSum(LONG period, LONG first_spec, LONG num_spec, LONG spec_type, DOUBLE time_low, DOUBLE time_high, VARIANT *sums, VARIANT *max_vals, VARIANT *spec_nums, BSTR *messages)
HRESULT getNumberOfPeriods(BSTR *messages, LONG *nperiod)
int sumAllSpectra(long &counts, long &bin0_counts, DAEstatus &status)
HRESULT dumpDebugInfo(BSTR *messages)
int add(DAEstatus &dstatus, bool clear)
int getCurrentPeriodNumber(int &period, int &daq_period, DAEstatus &status)
int changePeriod(int period, DAEstatus &status)
int setBeamlineParameters(const string_table_t &table, DAEstatus &status)
int fillWithTestPattern(unsigned long pattern, DAEstatus &status)
std::vector< std::vector< std::string > > string_table_t
HRESULT abortRun(BSTR *messages)
int getOptions(std::string &options_xml, DAEstatus &status)
int getDAEsettingsXML(const std::string &dae_xml_in, std::string &dae_xml_out, DAEstatus &status)
HRESULT changeHardwarePeriods(BSTR periods_xml, BSTR *messages)
int getGoodFrames(DAEstatus &status)
bool isFinalSequenceComplete(DAEstatus &status)
HRESULT requestEndRunAfterNextSequenceCompletes(BSTR *messages)
HRESULT quit(BSTR *messages)
HRESULT getVetoStatus(BSTR *veto_status, BSTR *messages)
HRESULT makeResult(DAEstatus &status, BSTR *messages, bool force_success_result=false)
HRESULT getMonitoringSettings(BSTR monitor_xml_in, BSTR *monitor_xml_out, BSTR *messages)
int setRunNumber(long number, DAEstatus &status)
int notifyICP(long event_id, const char *param, DAEstatus &status)
HRESULT VMEWriteValue(ULONG card_id, ULONG card_address, ULONG word_size, ULONG value, ULONG mode, BSTR *messages)
int getSpectrumIntegral(long spec_no, long period, float t_low, float t_high, long &integral, long &max_val, DAEstatus &status)
HRESULT VMEReadArray(ULONG card_id, ULONG card_address, VARIANT *values, ULONG num_values, BSTR *messages)
HRESULT VMEReadValuesToString(ULONG card_id, ULONG card_address, ULONG word_size, ULONG num_values, BSTR *values, BSTR *messages)
HRESULT getSpectrum(LONG spectrum_number, LONG period, VARIANT *time_channels, VARIANT *signal, LONG as_histogram, LONG as_distribution, LONG *sum, BSTR *messages)
int reallocBSTR(BSTR *bstr, const char *str)
int getFramesAllPeriods(long *good_frames, long *raw_frames, int n, DAEstatus &status)
int updateCRPTSpectra(int period, long spec_start, int nspectra, DAEstatus &status)
int VMEReadValuesToString(unsigned long card_id, unsigned long card_address, bool sixteen_bit, unsigned long num_values, std::string &values, DAEstatus &status)
HRESULT setVeto(BSTR name, LONG enable, BSTR *messages)
int setReportCopyFunction(DAEreport_func_t *report_func, void *arg)
int VMEWriteValue(unsigned long card_id, unsigned long card_address, bool sixteen_bit, unsigned long value, unsigned long mode, DAEstatus &status)
HRESULT setSampleParameters(VARIANT table, BSTR *messages)
int getCRPTSpectrumIntegral(long spec_no, long period, float t_low, float t_high, long &integral, long &max_val, DAEstatus &status)
void unregisterStructuredExceptionHandler(_se_translator_function old_func)
int exitProgram(const std::string &message, bool prompt)
HRESULT updateStatusXML2(BSTR status_xml_in, BSTR *status_xml_out, BSTR *messages)
int saveRun(DAEstatus &status)
int VMEReadArray(unsigned long card_id, unsigned long card_address, isisU32_t *values, unsigned long num_values, DAEstatus &status)
int beginRun(DAEstatus &status)
int reportAll(bool reset_overall_severity=true, bool remove_messages=true)
_se_translator_function registerStructuredExceptionHandler()
this needs to be called per thread
HRESULT notifyICP(LONG event_id, BSTR param, BSTR *messages)
int updateCRPTWithDAE(CRPTProxy &crpt, bool pause_collection, DAEstatus &status)
int getSpectrumNumbersForTimeRegime(long tr, long &spec_min, long &spec_max, DAEstatus &status)
static int getXML(const BSTR xml_in, std::string &xml_out)
HRESULT areYouThere(void)
int getNumberOfTimeChannels(int spectrum, DAEstatus &status)
static int allReportFunc(const DAEstatus_message &mess, void *arg)
int getVetoStatus(std::string &veto_text, DAEstatus &status)
static CRITICAL_SECTION * m_critical
int pauseRun(DAEstatus &status)
HRESULT getSpectraIntegral2(LONG spec_start, LONG nspectra, LONG period, FLOAT time_low, FLOAT time_high, VARIANT *counts, BSTR *messages)
HRESULT getStatusMessages(LONG stream, VARIANT *messages)
HRESULT getGoodFramesTotal(BSTR *messages, LONG *value)
HRESULT getTCB(BSTR tcb_xml_in, BSTR *tcb_xml_out, BSTR *messages)
int getTCBXML(const std::string &tcb_xml_in, std::string &tcb_xml_out, DAEstatus &status)
HRESULT updateStatusXML(BSTR *cluster_xml, BSTR *messages)
HRESULT refreshCachedValues(BSTR *messages)
HRESULT getNPRatio(FLOAT *current, FLOAT *average, BSTR *messages)
HRESULT getRunNumber(BSTR *messages, LONG *run_number)
HRESULT VMEReadValue(ULONG card_id, ULONG card_address, ULONG word_size, ULONG *value, BSTR *messages)
int getRawFrames(DAEstatus &status)
int loadDAEWithData(const std::string &file_name, long options, DAEstatus &status)
HRESULT getSpectraIntegral(VARIANT spectrum_numbers, LONG period, VARIANT time_low, VARIANT time_high, VARIANT *counts, BSTR *messages)
HRESULT updateCRPT(BSTR *messages)
int updateDAEsettingsXML(const std::string &status_xml, DAEstatus &status)
HRESULT changeSample(BSTR sample_xml, BSTR *messages)
int updateSampleXML(const std::string &sample_xml, DAEstatus &status)
HRESULT endSEWait(BSTR *messages)
int startSEWait(DAEstatus &dstatus)
int getIntItem(const char *item_name, long &lVal, DAEstatus &status)
HRESULT changeDAEsettings(BSTR dae_xml, BSTR *messages)
HRESULT getUAmpHAllPeriods(VARIANT *good_uamph, VARIANT *raw_uamph, BSTR *messages)
HRESULT setUserParameters(LONG rbno, VARIANT table, BSTR *messages)
int changeNumberOfSoftwarePeriods(long nperiod, DAEstatus &status)
HRESULT callICP(BSTR *messages, T &result, boost::function< T(ISISinstrumentControl *, DAEstatus &)> func)
int requestEndRunAfterNextSequenceCompletes(DAEstatus &status)
HRESULT getUpdateSettings(BSTR update_xml_in, BSTR *update_xml_out, BSTR *messages)
void unregisterICPCallbacks()
int snapshotCRPT(const char *filename, bool do_update, bool do_pause, DAEstatus &status)
static int variantToStringTable(VARIANT *v, string_table_t &string_table)
HRESULT sumAllHistogramMemory(LONG *counts, BSTR *messages)
HRESULT updateCRPTSpectra(LONG period, LONG spec_start, LONG nspec, BSTR *messages)
HRESULT getSpectrumIntegral(LONG spectrum_number, LONG period, FLOAT time_low, FLOAT time_high, LONG *counts, BSTR *messages)
HRESULT fillWithTestPattern(ULONG pattern, BSTR *messages)
HRESULT loadDAEWithData(BSTR file_name, LONG options, BSTR *messages)
static void getBSTRValue(const BSTR bstr, std::string &str)
int endRun(DAEstatus &status)
int getUAmpHAllPeriods(float *good_uamph, float *raw_uamph, int n, DAEstatus &status)
HRESULT getDAEsettings(BSTR dae_xml_in, BSTR *dae_xml_out, BSTR *messages)
HRESULT getSpectraIntegralHelper(spec_int_func_t func, VARIANT spectrum_numbers, LONG period, VARIANT time_low, VARIANT time_high, VARIANT *counts, BSTR *messages)
HRESULT updateSettings(BSTR xml_in, BSTR *messages, xml_set_func_t func)
HRESULT InterfaceSupportsErrorInfo(REFIID riid)
float getCurrentPeriodGoodUAmpH(DAEstatus &status)
static int accessArrayVariant(VARIANT *v, void **values, VARTYPE vt)
HRESULT rio(LONG address, LONG *value, BSTR *messages)
HRESULT setICPValueLong(BSTR name, LONG value, BSTR *messages)
int getMEventsPeriod(double &mevents, int period, DAEstatus &status)
int VMEWriteArray(unsigned long card_id, unsigned long card_address, isisU32_t *values, unsigned long num_values, DAEstatus &status)
HRESULT getHardwarePeriods(BSTR periods_xml_in, BSTR *periods_xml_out, BSTR *messages)
HRESULT getOptions(BSTR *options_xml, BSTR *messages)
HRESULT resumeRun(BSTR *messages)
static int status_reporter(const DAEstatus_message &mess, void *arg)
HRESULT saveRun(BSTR *messages)
HRESULT getMEvents(BSTR *messages, DOUBLE *mevents)
int changePeriodWhileRunning(int period, bool pause_first, DAEstatus &status)
int updateHardwarePeriodsXML(const std::string &periods_xml, DAEstatus &status)
HRESULT getRawFramesTotal(BSTR *messages, LONG *value)
HRESULT changeNumberOfSoftwarePeriods(LONG nperiod, BSTR *messages)
int changeUpdateSettingsXML(const std::string &update_xml, DAEstatus &status)
HRESULT getSettings(BSTR xml_in, BSTR *xml_out, BSTR *messages, xml_get_func_t func)
HRESULT getsect(LONG start, LONG length, VARIANT *values, BSTR *messages)
int getNPRatio(float *current, float *average, DAEstatus &status)
int arrayVariantLength(VARIANT *v)
int addInfo(int facility, const std::string &text)
int abortRun(DAEstatus &status)
static BSTR makeBSTR(const char *str)
HRESULT getFramesAllPeriods(VARIANT *good_frames, VARIANT *raw_frames, BSTR *messages)
HRESULT setBlocksTable(VARIANT table, BSTR *messages)
int setOptions(const std::string &options_xml, DAEstatus &status)
HRESULT beginRun(BSTR *messages)
int setBlockTable(const string_table_t &table, DAEstatus &status)
int getRealArrayItemSize(const char *item_name, int *dims_array, int &ndims, DAEstatus &status)
HRESULT pauseRun(BSTR *messages)
int setUserParameters(long rbno, const string_table_t &table, DAEstatus &status)
int checkTestPattern(unsigned long pattern, DAEstatus &status)
HRESULT snapshotCRPT(BSTR filename, LONG do_update, LONG do_pause, BSTR *messages)
int arrayVariantDimensions(VARIANT *v, int dims_array[], int &ndims)
HRESULT beginRunEx(LONG options, LONG period, BSTR *messages)
HRESULT changeUser(BSTR user_xml, BSTR *messages)
int sumAllHistogramMemory(long &counts, DAEstatus &status)
int updateTCBXML(const std::string &status_xml, DAEstatus &status)
int getSpectrum(long spectrum_number, long period, double *time_array, double *signal_array, double *error_array, bool as_histogram, bool as_distribution, long &sum, DAEstatus &status)
HRESULT getSpectrumNumbersForTR(LONG time_regime, LONG *spec_min, LONG *spec_max, BSTR *messages)
int getUpdateSettingsXML(const std::string &update_xml_in, std::string &update_xml_out, DAEstatus &status)
int getArrayValueMain(ISISinstrumentControl *the_icp, const char *item_name, long args[], int nargs, VARIANT *result, DAEstatus &status)
int setVeto(const std::string &name, long enable, DAEstatus &status)
int unaccessArrayVariant(VARIANT *v)
int getCharItem(const char *item_name, std::string &cvalue, DAEstatus &status)
HRESULT reportError(T *obj, const std::string &errmsg)
HRESULT changeTCB(BSTR tcb_xml, BSTR *messages)
HRESULT getRunState(BSTR *messages, LONG *state)
HRESULT getCurrentPeriodNumber(LONG *period, LONG *daq_period, BSTR *messages)
int getMonitoringXML(const std::string &monitor_xml_in, std::string &monitor_xml_out, DAEstatus &status)
int updateStatusXML(std::string &status_xml, DAEstatus &status)
int getTotalCounts(int64_t &counts, DAEstatus &status)
int getIntArrayItem(const char *item_name, long *larray, DAEstatus &status)
int resumeRun(DAEstatus &status)