ICP  1
session.cpp
Go to the documentation of this file.
1 // session.cpp : Implementation of Csession
2 
3 #include "stdafx.h"
4 #include "session.h"
5 #include "block.h"
6 #include "atlsafe.h"
7 
8 #include "instapi_utils.h"
9 
10 #import "..\\tlb\\Seci.tlb" named_guids
11 
12 // Csession
13 
14 STDMETHODIMP Csession::InterfaceSupportsErrorInfo(REFIID riid)
15 {
16  static const IID* const arr[] =
17  {
18  &IID_Isession
19  };
20 
21  for (int i=0; i < sizeof(arr) / sizeof(arr[0]); i++)
22  {
23  if (InlineIsEqualGUID(*arr[i],riid))
24  return S_OK;
25  }
26  return S_FALSE;
27 }
28 
29 
30 STDMETHODIMP Csession::get_role(BSTR* pVal)
31 {
32  return callInstAPILib(this, boost::bind(&InstAPILib::getRole, _1, m_session_id, pVal));
33 }
34 
35 
36 STDMETHODIMP Csession::put_role(BSTR newVal)
37 {
38  return callInstAPILib(this, boost::bind(&InstAPILib::setRole, _1, m_session_id, newVal));
39 }
40 
41 
42 STDMETHODIMP Csession::getMessages(LONG start_index, BSTR min_severity, VARIANT* times, VARIANT* severities, VARIANT* messages, LONG* end_index)
43 {
44  return callInstAPILib(this, boost::bind(&InstAPILib::getMessages, _1, m_session_id, start_index, min_severity, times, severities, messages, end_index));
45 }
46 
47 
48 STDMETHODIMP Csession::putMessage(BSTR time, BSTR severity, BSTR message)
49 {
50  return callInstAPILib(this, boost::bind(&InstAPILib::putMessage, _1, m_session_id, time, severity, message));
51 }
52 
53 STDMETHODIMP Csession::getBlock(BSTR block_name, Iblock** block)
54 {
55  std::string errmsg;
56  try
57  {
58  InstAPILib* the_api = inst_api.get();
59  CComPtr<Cblock::Iblock> the_block;
60  the_block.CoCreateInstance(CLSID_block, 0, CLSCTX_ALL);
61  the_block->put_name(block_name);
62 // the_block->m_session_id = m_session_id;
63  *block = the_block.Detach();
64  }
65  catch(const std::exception& ex)
66  {
67  errmsg = ex.what();
68  }
69  return reportError(this, errmsg);
70 }
71 
72 STDMETHODIMP Csession::getBlockNames(VARIANT* block_names)
73 {
74  return callInstAPILib(this, boost::bind(&InstAPILib::getBlockNames, _1, m_session_id, block_names));
75 }
76 
78 {
79  return callInstAPILib(this, boost::bind(&InstAPILib::clearSeciGraphs, _1, m_session_id));
80 }
81 
82 STDMETHODIMP Csession::getLabviewVar(BSTR vi_name, BSTR control_name, VARIANT* value)
83 {
84  return callInstAPILib(this, boost::bind(&InstAPILib::getLabviewValue, _1, m_session_id, vi_name, control_name, value));
85 }
86 
87 STDMETHODIMP Csession::setLabviewVar(BSTR vi_name, BSTR control_name, VARIANT new_value)
88 {
89  return callInstAPILib(this, boost::bind(&InstAPILib::setLabviewValue, _1, m_session_id, vi_name, control_name, new_value));
90 }
91 
92 STDMETHODIMP Csession::setLabviewVarExt(BSTR vi_name, BSTR control_name, VARIANT new_value, VARIANT* results)
93 {
94  return callInstAPILib(this, boost::bind(&InstAPILib::setLabviewValueExt, _1, m_session_id, vi_name, control_name, new_value, results));
95 }
96 
97 STDMETHODIMP Csession::callLabview(BSTR vi_name, VARIANT names, VARIANT values, VARIANT_BOOL reentrant, VARIANT* results)
98 {
99  return callInstAPILib(this, boost::bind(&InstAPILib::callLabview, _1, m_session_id, vi_name, names, values, reentrant, results));
100 }
101 
102 STDMETHODIMP Csession::toggleViVisibility(BSTR vi_name, VARIANT_BOOL show)
103 {
104  return callInstAPILib(this, boost::bind(&InstAPILib::toggleViVisibility, _1, m_session_id, vi_name, show));
105 }
106 
107 STDMETHODIMP Csession::getViState(BSTR vi_name, VARIANT* value)
108 {
109  return callInstAPILib(this, boost::bind(&InstAPILib::getViState, _1, m_session_id, vi_name, value));
110 }
111 
112 STDMETHODIMP Csession::startVi(BSTR vi_name)
113 {
114  return callInstAPILib(this, boost::bind(&InstAPILib::startVi, _1, m_session_id, vi_name));
115 }
116 
117 STDMETHODIMP Csession::stopVi(BSTR vi_name)
118 {
119  return callInstAPILib(this, boost::bind(&InstAPILib::stopVi, _1, m_session_id, vi_name));
120 }
121 
122 STDMETHODIMP Csession::closeViFrontPanel(BSTR vi_name)
123 {
124  return callInstAPILib(this, boost::bind(&InstAPILib::closeViFrontPanel, _1, m_session_id, vi_name));
125 }
126 
127 STDMETHODIMP Csession::get_session_id(ULONG* pVal)
128 {
129  *pVal = m_session_id;
130  return S_OK;
131 }
132 
133 STDMETHODIMP Csession::put_session_id(ULONG newVal)
134 {
135  m_session_id = newVal;
136  return S_OK;
137 }
138 
139 STDMETHODIMP Csession::beginRun(LONG period, VARIANT_BOOL wait, VARIANT_BOOL quiet, VARIANT_BOOL paused, BSTR* messages)
140 {
141  return callInstAPILib(this, boost::bind(&InstAPILib::beginRun, _1, m_session_id, period, wait, quiet, paused, messages));
142 }
143 
144 STDMETHODIMP Csession::abortRun(BSTR* messages)
145 {
146  return callInstAPILib(this, boost::bind(&InstAPILib::abortRun, _1, m_session_id, messages));
147 }
148 
149 STDMETHODIMP Csession::endRun(BSTR* messages)
150 {
151  return callInstAPILib(this, boost::bind(&InstAPILib::endRun, _1, m_session_id, messages));
152 }
153 
154 STDMETHODIMP Csession::getRunState(BSTR* messages, LONG* status)
155 {
156  return callInstAPILib(this, boost::bind(&InstAPILib::getRunState, _1, m_session_id, messages, status));
157 }
158 
159 STDMETHODIMP Csession::pauseRun(BSTR* messages)
160 {
161  return callInstAPILib(this, boost::bind(&InstAPILib::pauseRun, _1, m_session_id, messages));
162 }
163 
164 STDMETHODIMP Csession::resumeRun(BSTR* messages)
165 {
166  return callInstAPILib(this, boost::bind(&InstAPILib::resumeRun, _1, m_session_id, messages));
167 }
168 
169 STDMETHODIMP Csession::recoverRun(BSTR* messages)
170 {
171  return callInstAPILib(this, boost::bind(&InstAPILib::recoverRun, _1, m_session_id, messages));
172 }
173 
174 STDMETHODIMP Csession::saveRun(BSTR* messages)
175 {
176  return callInstAPILib(this, boost::bind(&InstAPILib::saveRun, _1, m_session_id, messages));
177 }
178 
179 STDMETHODIMP Csession::updateCRPT(BSTR* messages)
180 {
181  return callInstAPILib(this, boost::bind(&InstAPILib::updateCRPT, _1, m_session_id, messages));
182 }
183 
184 STDMETHODIMP Csession::storeCRPT(BSTR* messages)
185 {
186  return callInstAPILib(this, boost::bind(&InstAPILib::storeCRPT, _1, m_session_id, messages));
187 }
188 
189 STDMETHODIMP Csession::getGoodFrames(VARIANT_BOOL curr_period, BSTR* messages, LONG* frames)
190 {
191  return callInstAPILib(this, boost::bind(&InstAPILib::getGoodFrames, _1, m_session_id, curr_period, messages, frames));
192 }
193 
194 STDMETHODIMP Csession::getUamps(VARIANT_BOOL curr_period, BSTR* messages, DOUBLE* uamps)
195 {
196  return callInstAPILib(this, boost::bind(&InstAPILib::getUamps, _1, m_session_id, curr_period, messages, uamps));
197 }
198 
199 STDMETHODIMP Csession::getMEvents(BSTR* messages, DOUBLE* mev)
200 {
201  return callInstAPILib(this, boost::bind(&InstAPILib::getMEvents, _1, m_session_id, messages, mev));
202 }
203 
204 STDMETHODIMP Csession::getCurrentPeriod(LONG* daq_period, BSTR* messages, LONG *period)
205 {
206  return callInstAPILib(this, boost::bind(&InstAPILib::getCurrentPeriod, _1, m_session_id, messages, period, daq_period));
207 }
208 
209 STDMETHODIMP Csession::getRunNumber(BSTR* messages, LONG* run_no)
210 {
211  return callInstAPILib(this, boost::bind(&InstAPILib::getRunNumber, _1, m_session_id, messages, run_no));
212 }
213 
214 STDMETHODIMP Csession::getTotalCounts(BSTR* messages, LONG* counts)
215 {
216  return callInstAPILib(this, boost::bind(&InstAPILib::getTotalCounts, _1, m_session_id, messages, counts));
217 }
218 
219 STDMETHODIMP Csession::snapshotCRPT(BSTR filename, LONG do_update, LONG do_pause, BSTR* messages)
220 {
221  return callInstAPILib(this, boost::bind(&InstAPILib::snapshotCRPT, _1, m_session_id, filename, do_update, do_pause, messages));
222 }
223 
224 STDMETHODIMP Csession::sumAllHistogramMemory(BSTR* messages, LONG* counts)
225 {
226  return callInstAPILib(this, boost::bind(&InstAPILib::sumAllHistogramMemory, _1, m_session_id, messages, counts));
227 }
228 
229 STDMETHODIMP Csession::sumAllSpectra(LONG* bin_counts, BSTR* messages, LONG* counts)
230 {
231  return callInstAPILib(this, boost::bind(&InstAPILib::sumAllSpectra, _1, m_session_id, messages, counts, bin_counts));
232 }
233 
234 STDMETHODIMP Csession::setRBNumber(VARIANT rb_no)
235 {
236  return callInstAPILib(this, boost::bind(&InstAPILib::setRbNumber, _1, m_session_id, rb_no));
237 }
238 
239 STDMETHODIMP Csession::getRBNumber(VARIANT* rb_no)
240 {
241  return callInstAPILib(this, boost::bind(&InstAPILib::getRbNumber, _1, m_session_id, rb_no));
242 }
243 
244 STDMETHODIMP Csession::setPeriod(LONG period_number, BSTR* messages)
245 {
246  return callInstAPILib(this, boost::bind(&InstAPILib::setPeriod, _1, m_session_id, period_number, messages));
247 }
248 
249 STDMETHODIMP Csession::setTitle(VARIANT title)
250 {
251  return callInstAPILib(this, boost::bind(&InstAPILib::setTitle, _1, m_session_id, title));
252 }
253 
254 STDMETHODIMP Csession::getSpectrum(LONG spectrum_no, LONG period, VARIANT_BOOL as_dist, VARIANT* time_channels, VARIANT* signal, LONG* sum, BSTR* messages)
255 {
256  return callInstAPILib(this, boost::bind(&InstAPILib::getSpectrum, _1, m_session_id, spectrum_no, period, as_dist, time_channels, signal, sum, messages));
257 }
258 
259 STDMETHODIMP Csession::changeNumberOfSoftwarePeriods(LONG num_periods, BSTR* messages)
260 {
261  return callInstAPILib(this, boost::bind(&InstAPILib::changeNumberOfSoftwarePeriods, _1, m_session_id, num_periods, messages));
262 }
263 
264 STDMETHODIMP Csession::setBeamlineParameter(VARIANT name, VARIANT value, VARIANT units)
265 {
266  return callInstAPILib(this, boost::bind(&InstAPILib::setBeamlineParameter, _1, m_session_id, name, value, units));
267 }
268 
269 STDMETHODIMP Csession::deleteBeamlineParameter(VARIANT name)
270 {
271  return callInstAPILib(this, boost::bind(&InstAPILib::deleteBeamlineParameter, _1, m_session_id, name));
272 }
273 
275 {
277 }
278 
279 STDMETHODIMP Csession::getBeamlineParameterNames(VARIANT* names)
280 {
281  return callInstAPILib(this, boost::bind(&InstAPILib::getBeamlineParameterNames, _1, m_session_id, names));
282 }
283 
284 STDMETHODIMP Csession::getBeamlineParameter(BSTR name, BSTR* units, BSTR* type, BSTR* value)
285 {
286  return callInstAPILib(this, boost::bind(&InstAPILib::getBeamlineParameter, _1, m_session_id, name, value, units, type));
287 }
288 
289 STDMETHODIMP Csession::setSampleParameter(VARIANT name, VARIANT value, VARIANT units)
290 {
291  return callInstAPILib(this, boost::bind(&InstAPILib::setSampleParameter, _1, m_session_id, name, value, units));
292 }
293 
294 STDMETHODIMP Csession::deleteSampleParameter(VARIANT name)
295 {
296  return callInstAPILib(this, boost::bind(&InstAPILib::deleteSampleParameter, _1, m_session_id, name));
297 }
298 
300 {
301  return callInstAPILib(this, boost::bind(&InstAPILib::deleteAllSampleParameters, _1, m_session_id));
302 }
303 
304 STDMETHODIMP Csession::getSampleParameterNames(VARIANT* names)
305 {
306  return callInstAPILib(this, boost::bind(&InstAPILib::getSampleParameterNames, _1, m_session_id, names));
307 }
308 
309 STDMETHODIMP Csession::getSampleParameter(BSTR name, BSTR* units, BSTR* type, BSTR* value)
310 {
311  return callInstAPILib(this, boost::bind(&InstAPILib::getSampleParameter, _1, m_session_id, name, value, units, type));
312 }
313 
314 STDMETHODIMP Csession::vmeWriteValue(ULONG card_id, ULONG card_address, ULONG word_size, ULONG value, ULONG mode, BSTR* messages)
315 {
316  return callInstAPILib(this, boost::bind(&InstAPILib::vmeWriteValue, _1, m_session_id, card_id, card_address, word_size, value, mode, messages));
317 }
318 
319 STDMETHODIMP Csession::getSeciConfig(BSTR* name)
320 {
321  return callInstAPILib(this, boost::bind(&InstAPILib::getSeciConfig, _1, m_session_id, name));
322 }
323 
324 STDMETHODIMP Csession::clearDatabaseLogs(int run_number)
325 {
326  return callInstAPILib(this, boost::bind(&InstAPILib::clearDatabaseLogs, _1, m_session_id, run_number));
327 }
328 
329 STDMETHODIMP Csession::clearLogFiles(int run_number, BSTR path)
330 {
331  return callInstAPILib(this, boost::bind(&InstAPILib::clearLogFiles, _1, m_session_id, run_number, path));
332 }
333 
334 STDMETHODIMP Csession::getMeasurementLabel(BSTR id, BSTR* label)
335 {
336  return callInstAPILib(this, boost::bind(&InstAPILib::getMeasurementLabel, _1, m_session_id, id, label));
337 }
338 
339 STDMETHODIMP Csession::setMeasurementLabel(BSTR id, BSTR label)
340 {
341  return callInstAPILib(this, boost::bind(&InstAPILib::setMeasurementLabel, _1, m_session_id, id, label));
342 }
343 
344 STDMETHODIMP Csession::getMeasurementId(BSTR label, VARIANT_BOOL newId, BSTR* id)
345 {
346  return callInstAPILib(this, boost::bind(&InstAPILib::getMeasurementId, _1, m_session_id, label, newId, id));
347 }
348 
349 STDMETHODIMP Csession::getViNames(VARIANT* names)
350 {
351  return callInstAPILib(this, boost::bind(&InstAPILib::getViNames, _1, m_session_id, names));
352 }
353 
354 STDMETHODIMP Csession::logBlocksNow(BSTR source)
355 {
356  return callInstAPILib(this, boost::bind(&InstAPILib::logBlocksNow, _1, m_session_id, source));
357 }
358 
359 STDMETHODIMP Csession::changeSeciConfiguration(BSTR vi_name, VARIANT_BOOL* result)
360 {
361  return callInstAPILib(this, boost::bind(&InstAPILib::changeSeciConfiguration, _1, m_session_id, vi_name, result));
362 }
363 
364 STDMETHODIMP Csession::isSeciBusy(VARIANT_BOOL* result)
365 {
366  return callInstAPILib(this, boost::bind(&InstAPILib::isSeciBusy, _1, m_session_id, result));
367 }
368 
369 STDMETHODIMP Csession::getNumberOfPeriods(BSTR* messages, LONG* num_periods)
370 {
371  return callInstAPILib(this, boost::bind(&InstAPILib::getNumberOfPeriods, _1, m_session_id, messages, num_periods));
372 }
373 
374 //Poco::Logger& Csession::g_log = createLogger("instapi.csession"); // caused problems with static poco library
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)
Definition: session.cpp:264
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)
Definition: session.cpp:42
HRESULT getCurrentPeriod(LONG *daq_period, BSTR *messages, LONG *period)
Definition: session.cpp:204
HRESULT clearLogFiles(int run_number, BSTR path)
Definition: session.cpp:329
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)
Definition: session.cpp:304
HRESULT sumAllHistogramMemory(BSTR *messages, LONG *counts)
Definition: session.cpp:224
void getSeciConfig(ULONG session_id, BSTR *name)
HRESULT endRun(BSTR *messages)
Definition: session.cpp:149
HRESULT abortRun(BSTR *messages)
Definition: session.cpp:144
HRESULT put_session_id(ULONG newVal)
Definition: session.cpp:133
HRESULT clearDatabaseLogs(int run_number)
Definition: session.cpp:324
void snapshotCRPT(ULONG session_id, BSTR filename, LONG do_update, LONG do_pause, BSTR *messages)
HRESULT setMeasurementLabel(BSTR id, BSTR label)
Definition: session.cpp:339
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)
Definition: instapi_lib.cpp:36
HRESULT getSeciConfig(BSTR *name)
Definition: session.cpp:319
HRESULT getMeasurementLabel(BSTR id, BSTR *label)
Definition: session.cpp:334
void saveRun(ULONG session_id, BSTR *messages)
HRESULT putMessage(BSTR time, BSTR severity, BSTR message)
Definition: session.cpp:48
Poco::SingletonHolder< InstAPILib > inst_api
void recoverRun(ULONG session_id, BSTR *messages)
HRESULT updateCRPT(BSTR *messages)
Definition: session.cpp:179
HRESULT vmeWriteValue(ULONG card_id, ULONG card_address, ULONG word_size, ULONG value, ULONG mode, BSTR *messages)
Definition: session.cpp:314
HRESULT setRBNumber(VARIANT rb_no)
Definition: session.cpp:234
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)
Definition: session.cpp:189
HRESULT getRBNumber(VARIANT *rb_no)
Definition: session.cpp:239
HRESULT closeViFrontPanel(BSTR vi_name)
Definition: session.cpp:122
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)
Definition: session.cpp:92
HRESULT deleteAllBeamlineParameters()
Definition: session.cpp:274
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)
Definition: session.cpp:359
HRESULT getMeasurementId(BSTR label, VARIANT_BOOL newId, BSTR *id)
Definition: session.cpp:344
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
Definition: session.h:33
HRESULT getViState(BSTR vi_name, VARIANT *value)
Definition: session.cpp:107
HRESULT getRunNumber(BSTR *messages, LONG *run_no)
Definition: session.cpp:209
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)
Definition: session.cpp:87
HRESULT getBlockNames(VARIANT *block_names)
Definition: session.cpp:72
HRESULT getUamps(VARIANT_BOOL curr_period, BSTR *messages, DOUBLE *uamps)
Definition: session.cpp:194
HRESULT InterfaceSupportsErrorInfo(REFIID riid)
Definition: session.cpp:14
HRESULT callInstAPILib(T *obj, instapi_lib_call_t func)
Definition: instapi_utils.h:25
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)
Definition: session.cpp:309
HRESULT snapshotCRPT(BSTR filename, LONG do_update, LONG do_pause, BSTR *messages)
Definition: session.cpp:219
void closeViFrontPanel(ULONG session_id, BSTR vi_name)
HRESULT saveRun(BSTR *messages)
Definition: session.cpp:174
HRESULT setPeriod(LONG period_number, BSTR *messages)
Definition: session.cpp:244
void changeNumberOfSoftwarePeriods(ULONG session_id, LONG num_periods, BSTR *messages)
void getSampleParameterNames(ULONG session_id, VARIANT *names)
HRESULT pauseRun(BSTR *messages)
Definition: session.cpp:159
HRESULT getSpectrum(LONG spectrum_no, LONG period, VARIANT_BOOL as_dist, VARIANT *time_channels, VARIANT *signal, LONG *sum, BSTR *messages)
Definition: session.cpp:254
HRESULT logBlocksNow(BSTR source)
Definition: session.cpp:354
HRESULT getNumberOfPeriods(BSTR *messages, LONG *num_periods)
Definition: session.cpp:369
HRESULT toggleViVisibility(BSTR vi_name, VARIANT_BOOL show)
Definition: session.cpp:102
void deleteAllSampleParameters(ULONG session_id)
void getNumberOfPeriods(ULONG session_id, BSTR *messages, LONG *num_periods)
HRESULT getViNames(VARIANT *names)
Definition: session.cpp:349
HRESULT getLabviewVar(BSTR vi_name, BSTR control_name, VARIANT *value)
Definition: session.cpp:82
HRESULT getBlock(BSTR block_name, Iblock **block)
Definition: session.cpp:53
HRESULT callLabview(BSTR vi_name, VARIANT names, VARIANT values, VARIANT_BOOL reentrant, VARIANT *results)
Definition: session.cpp:97
void setSampleParameter(ULONG session_id, VARIANT name, VARIANT value, VARIANT units)
HRESULT getBeamlineParameterNames(VARIANT *names)
Definition: session.cpp:279
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)
Definition: session.cpp:289
HRESULT startVi(BSTR vi_name)
Definition: session.cpp:112
HRESULT resumeRun(BSTR *messages)
Definition: session.cpp:164
HRESULT get_session_id(ULONG *pVal)
Definition: session.cpp:127
HRESULT isSeciBusy(VARIANT_BOOL *result)
Definition: session.cpp:364
HRESULT clearSeciGraphs()
Definition: session.cpp:77
HRESULT deleteBeamlineParameter(VARIANT name)
Definition: session.cpp:269
void endRun(ULONG session_id, BSTR *messages)
HRESULT storeCRPT(BSTR *messages)
Definition: session.cpp:184
void setRbNumber(ULONG session_id, VARIANT rb_no)
void getUamps(ULONG session_id, VARIANT_BOOL curr_period, BSTR *messages, DOUBLE *uamps)
HRESULT deleteAllSampleParameters()
Definition: session.cpp:299
HRESULT setTitle(VARIANT title)
Definition: session.cpp:249
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)
Definition: session.cpp:284
HRESULT getRunState(BSTR *messages, LONG *status)
Definition: session.cpp:154
void resumeRun(ULONG session_id, BSTR *messages)
HRESULT sumAllSpectra(LONG *bin_counts, BSTR *messages, LONG *counts)
Definition: session.cpp:229
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)
Definition: session.cpp:30
HRESULT getTotalCounts(BSTR *messages, LONG *counts)
Definition: session.cpp:214
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)
Definition: session.cpp:199
HRESULT put_role(BSTR newVal)
Definition: session.cpp:36
HRESULT stopVi(BSTR vi_name)
Definition: session.cpp:117
HRESULT deleteSampleParameter(VARIANT name)
Definition: session.cpp:294
HRESULT changeNumberOfSoftwarePeriods(LONG num_periods, BSTR *messages)
Definition: session.cpp:259
HRESULT reportError(T *obj, const std::string &errmsg)
Definition: instapi_utils.h:9
void getRole(ULONG session_id, BSTR *role)
Definition: instapi_lib.cpp:32
HRESULT recoverRun(BSTR *messages)
Definition: session.cpp:169
void deleteSampleParameter(ULONG session_id, VARIANT name)
HRESULT beginRun(LONG period, VARIANT_BOOL wait, VARIANT_BOOL quiet, VARIANT_BOOL paused, BSTR *messages)
Definition: session.cpp:139
void getViNames(ULONG session_id, VARIANT *names)