10 #import "..\\tlb\\Seci.tlb" named_guids
16 static const IID*
const arr[] =
21 for (
int i=0; i <
sizeof(arr) /
sizeof(arr[0]); i++)
23 if (InlineIsEqualGUID(*arr[i],riid))
42 STDMETHODIMP
Csession::getMessages(LONG start_index, BSTR min_severity, VARIANT* times, VARIANT* severities, VARIANT* messages, LONG* end_index)
59 CComPtr<Cblock::Iblock> the_block;
60 the_block.CoCreateInstance(CLSID_block, 0, CLSCTX_ALL);
61 the_block->put_name(block_name);
63 *block = the_block.Detach();
65 catch(
const std::exception& ex)
97 STDMETHODIMP
Csession::callLabview(BSTR vi_name, VARIANT names, VARIANT values, VARIANT_BOOL reentrant, VARIANT* results)
139 STDMETHODIMP
Csession::beginRun(LONG period, VARIANT_BOOL wait, VARIANT_BOOL quiet, VARIANT_BOOL paused, BSTR* messages)
254 STDMETHODIMP
Csession::getSpectrum(LONG spectrum_no, LONG period, VARIANT_BOOL as_dist, VARIANT* time_channels, VARIANT* signal, LONG* sum, BSTR* messages)
256 return callInstAPILib(
this, boost::bind(&
InstAPILib::getSpectrum, _1,
m_session_id, spectrum_no, period, as_dist, time_channels, signal, sum, messages));
314 STDMETHODIMP
Csession::vmeWriteValue(ULONG card_id, ULONG card_address, ULONG word_size, ULONG value, ULONG mode, BSTR* messages)
void beginRun(ULONG session_id, LONG period, VARIANT_BOOL wait, VARIANT_BOOL quiet, VARIANT_BOOL paused, BSTR *messages)
void sumAllSpectra(ULONG session_id, BSTR *messages, LONG *counts, LONG *bin_counts)
void changeSeciConfiguration(ULONG session_id, BSTR name, VARIANT_BOOL *result)
HRESULT setBeamlineParameter(VARIANT name, VARIANT value, VARIANT units)
void clearDatabaseLogs(ULONG session_id, int run_num)
HRESULT getMessages(LONG start_index, BSTR min_severity, VARIANT *times, VARIANT *severities, VARIANT *messages, LONG *end_index)
HRESULT getCurrentPeriod(LONG *daq_period, BSTR *messages, LONG *period)
HRESULT clearLogFiles(int run_number, BSTR path)
void isSeciBusy(ULONG session_id, VARIANT_BOOL *result)
void getRunState(ULONG session_id, BSTR *messages, LONG *status)
void getMEvents(ULONG session_id, BSTR *messages, DOUBLE *mev)
HRESULT getSampleParameterNames(VARIANT *names)
HRESULT sumAllHistogramMemory(BSTR *messages, LONG *counts)
void getSeciConfig(ULONG session_id, BSTR *name)
HRESULT endRun(BSTR *messages)
HRESULT abortRun(BSTR *messages)
HRESULT put_session_id(ULONG newVal)
HRESULT clearDatabaseLogs(int run_number)
void snapshotCRPT(ULONG session_id, BSTR filename, LONG do_update, LONG do_pause, BSTR *messages)
HRESULT setMeasurementLabel(BSTR id, BSTR label)
void abortRun(ULONG session_id, BSTR *messages)
void startVi(ULONG session_id, BSTR vi_name)
void toggleViVisibility(ULONG session_id, BSTR vi_name, VARIANT_BOOL show)
void setRole(ULONG session_id, BSTR role)
HRESULT getSeciConfig(BSTR *name)
HRESULT getMeasurementLabel(BSTR id, BSTR *label)
void saveRun(ULONG session_id, BSTR *messages)
HRESULT putMessage(BSTR time, BSTR severity, BSTR message)
Poco::SingletonHolder< InstAPILib > inst_api
void recoverRun(ULONG session_id, BSTR *messages)
HRESULT updateCRPT(BSTR *messages)
HRESULT vmeWriteValue(ULONG card_id, ULONG card_address, ULONG word_size, ULONG value, ULONG mode, BSTR *messages)
HRESULT setRBNumber(VARIANT rb_no)
void setLabviewValueExt(ULONG session_id, BSTR vi_name, BSTR control_name, VARIANT value, VARIANT *results)
HRESULT getGoodFrames(VARIANT_BOOL curr_period, BSTR *messages, LONG *frames)
HRESULT getRBNumber(VARIANT *rb_no)
HRESULT closeViFrontPanel(BSTR vi_name)
void getGoodFrames(ULONG session_id, VARIANT_BOOL curr_period, BSTR *messages, LONG *frames)
void setMeasurementLabel(ULONG session_id, BSTR id, BSTR label)
void getBlockNames(ULONG session_id, VARIANT *block_names)
void logBlocksNow(ULONG session_id, BSTR source)
void getSpectrum(ULONG session_id, LONG spectrum_no, LONG period, VARIANT_BOOL as_dist, VARIANT *time_channels, VARIANT *signal, LONG *sum, BSTR *messages)
HRESULT setLabviewVarExt(BSTR vi_name, BSTR control_name, VARIANT new_value, VARIANT *results)
HRESULT deleteAllBeamlineParameters()
void pauseRun(ULONG session_id, BSTR *messages)
void vmeWriteValue(ULONG session_id, ULONG card_id, ULONG card_address, ULONG word_size, ULONG value, ULONG mode, BSTR *messages)
void setPeriod(ULONG session_id, LONG period_number, BSTR *messages)
HRESULT changeSeciConfiguration(BSTR vi_name, VARIANT_BOOL *result)
HRESULT getMeasurementId(BSTR label, VARIANT_BOOL newId, BSTR *id)
void getBeamlineParameterNames(ULONG session_id, VARIANT *names)
void getRunNumber(ULONG session_id, BSTR *messages, LONG *run_no)
void deleteAllBeamlineParameters(ULONG session_id)
unsigned long m_session_id
0 is an invalid session
HRESULT getViState(BSTR vi_name, VARIANT *value)
HRESULT getRunNumber(BSTR *messages, LONG *run_no)
void callLabview(ULONG session_id, BSTR vi_name, VARIANT names, VARIANT values, VARIANT_BOOL reentrant, VARIANT *results)
void clearSeciGraphs(ULONG session_id)
HRESULT setLabviewVar(BSTR vi_name, BSTR control_name, VARIANT new_value)
HRESULT getBlockNames(VARIANT *block_names)
HRESULT getUamps(VARIANT_BOOL curr_period, BSTR *messages, DOUBLE *uamps)
HRESULT InterfaceSupportsErrorInfo(REFIID riid)
HRESULT callInstAPILib(T *obj, instapi_lib_call_t func)
void getMeasurementLabel(ULONG session_id, BSTR id, BSTR *label)
void getMessages(ULONG session_id, LONG start_index, BSTR min_severity, VARIANT *times, VARIANT *severities, VARIANT *messages, LONG *end_index)
void updateCRPT(ULONG session_id, BSTR *messages)
HRESULT getSampleParameter(BSTR name, BSTR *units, BSTR *type, BSTR *value)
HRESULT snapshotCRPT(BSTR filename, LONG do_update, LONG do_pause, BSTR *messages)
void closeViFrontPanel(ULONG session_id, BSTR vi_name)
HRESULT saveRun(BSTR *messages)
HRESULT setPeriod(LONG period_number, BSTR *messages)
void changeNumberOfSoftwarePeriods(ULONG session_id, LONG num_periods, BSTR *messages)
void getSampleParameterNames(ULONG session_id, VARIANT *names)
HRESULT pauseRun(BSTR *messages)
HRESULT getSpectrum(LONG spectrum_no, LONG period, VARIANT_BOOL as_dist, VARIANT *time_channels, VARIANT *signal, LONG *sum, BSTR *messages)
HRESULT logBlocksNow(BSTR source)
HRESULT getNumberOfPeriods(BSTR *messages, LONG *num_periods)
HRESULT toggleViVisibility(BSTR vi_name, VARIANT_BOOL show)
void deleteAllSampleParameters(ULONG session_id)
void getNumberOfPeriods(ULONG session_id, BSTR *messages, LONG *num_periods)
HRESULT getViNames(VARIANT *names)
HRESULT getLabviewVar(BSTR vi_name, BSTR control_name, VARIANT *value)
HRESULT getBlock(BSTR block_name, Iblock **block)
HRESULT callLabview(BSTR vi_name, VARIANT names, VARIANT values, VARIANT_BOOL reentrant, VARIANT *results)
void setSampleParameter(ULONG session_id, VARIANT name, VARIANT value, VARIANT units)
HRESULT getBeamlineParameterNames(VARIANT *names)
void getCurrentPeriod(ULONG session_id, BSTR *messages, LONG *period, LONG *daq_period)
void setBeamlineParameter(ULONG session_id, VARIANT name, VARIANT value, VARIANT units)
void stopVi(ULONG session_id, BSTR vi_name)
HRESULT setSampleParameter(VARIANT name, VARIANT value, VARIANT units)
HRESULT startVi(BSTR vi_name)
HRESULT resumeRun(BSTR *messages)
HRESULT get_session_id(ULONG *pVal)
HRESULT isSeciBusy(VARIANT_BOOL *result)
HRESULT clearSeciGraphs()
HRESULT deleteBeamlineParameter(VARIANT name)
void endRun(ULONG session_id, BSTR *messages)
HRESULT storeCRPT(BSTR *messages)
void setRbNumber(ULONG session_id, VARIANT rb_no)
void getUamps(ULONG session_id, VARIANT_BOOL curr_period, BSTR *messages, DOUBLE *uamps)
HRESULT deleteAllSampleParameters()
HRESULT setTitle(VARIANT title)
void putMessage(ULONG session_id, BSTR time, BSTR severity, BSTR message)
void setTitle(ULONG session_id, VARIANT title)
void getViState(ULONG session_id, BSTR vi_name, VARIANT *value)
HRESULT getBeamlineParameter(BSTR name, BSTR *units, BSTR *type, BSTR *value)
HRESULT getRunState(BSTR *messages, LONG *status)
void resumeRun(ULONG session_id, BSTR *messages)
HRESULT sumAllSpectra(LONG *bin_counts, BSTR *messages, LONG *counts)
void getRbNumber(ULONG session_id, VARIANT *rb_no)
void getSampleParameter(ULONG session_id, BSTR name, BSTR *value, BSTR *units, BSTR *type)
void storeCRPT(ULONG session_id, BSTR *messages)
void getMeasurementId(ULONG session_id, BSTR label, VARIANT_BOOL newId, BSTR *id)
void getLabviewValue(ULONG session_id, BSTR vi_name, BSTR control_name, VARIANT *value)
void clearLogFiles(ULONG session_id, int run_num, BSTR path)
HRESULT get_role(BSTR *pVal)
HRESULT getTotalCounts(BSTR *messages, LONG *counts)
void getBeamlineParameter(ULONG session_id, BSTR name, BSTR *value, BSTR *units, BSTR *type)
void getTotalCounts(ULONG session_id, BSTR *messages, LONG *counts)
void sumAllHistogramMemory(ULONG session_id, BSTR *messages, LONG *counts)
void setLabviewValue(ULONG session_id, BSTR vi_name, BSTR control_name, VARIANT value)
void deleteBeamlineParameter(ULONG session_id, VARIANT name)
HRESULT getMEvents(BSTR *messages, DOUBLE *mev)
HRESULT put_role(BSTR newVal)
HRESULT stopVi(BSTR vi_name)
HRESULT deleteSampleParameter(VARIANT name)
HRESULT changeNumberOfSoftwarePeriods(LONG num_periods, BSTR *messages)
HRESULT reportError(T *obj, const std::string &errmsg)
void getRole(ULONG session_id, BSTR *role)
HRESULT recoverRun(BSTR *messages)
void deleteSampleParameter(ULONG session_id, VARIANT name)
HRESULT beginRun(LONG period, VARIANT_BOOL wait, VARIANT_BOOL quiet, VARIANT_BOOL paused, BSTR *messages)
void getViNames(ULONG session_id, VARIANT *names)