PageRenderTime 56ms CodeModel.GetById 20ms RepoModel.GetById 1ms app.codeStats 0ms

/AcquisitionInterface/bin/Release/API-1.0.xml

https://bitbucket.org/maccosslab/acquisitionwithqeapi
XML | 2666 lines | 2612 code | 54 blank | 0 comment | 0 complexity | a8c9e0b0ae87ae6418833e672630a8b6 MD5 | raw file

Large files files are truncated, but you can click here to view the full file

  1. <?xml version="1.0"?>
  2. <doc>
  3. <assembly>
  4. <name>API-1.0</name>
  5. </assembly>
  6. <members>
  7. <member name="T:Thermo.Interfaces.InstrumentAccess_V1.AnalogTraceContainer.AnalogTracePointEventArgs">
  8. <summary>
  9. This implementation of EventArgs carries an <see cref="T:Thermo.Interfaces.InstrumentAccess_V1.AnalogTraceContainer.IAnalogTracePoint"/>.
  10. </summary>
  11. <remarks>
  12. See <see cref="T:Thermo.Interfaces.InstrumentAccess_V1.AnalogTraceContainer.IAnalogTraceContainer"/> for an example how this class can be used.
  13. <para>
  14. An instance of this class will be created by <see cref="E:Thermo.Interfaces.InstrumentAccess_V1.AnalogTraceContainer.IAnalogTraceContainer.AnalogTracePointArrived"/>.
  15. </para>
  16. </remarks>
  17. </member>
  18. <member name="M:Thermo.Interfaces.InstrumentAccess_V1.AnalogTraceContainer.AnalogTracePointEventArgs.#ctor">
  19. <summary>
  20. Create a new <see cref="T:Thermo.Interfaces.InstrumentAccess_V1.AnalogTraceContainer.AnalogTracePointEventArgs"/>.
  21. </summary>
  22. </member>
  23. <member name="P:Thermo.Interfaces.InstrumentAccess_V1.AnalogTraceContainer.AnalogTracePointEventArgs.TracePoint">
  24. <summary>
  25. Get access to the analog trace point that has just arrived from the instrument.
  26. It has replaced already the LastValue in the <see cref="T:Thermo.Interfaces.InstrumentAccess_V1.AnalogTraceContainer.IAnalogTraceContainer"/>.
  27. </summary>
  28. </member>
  29. <member name="T:Thermo.Interfaces.InstrumentAccess_V1.Control.IParameterDescription">
  30. <summary>
  31. This interface has information about a possible Set argument for an <see cref="T:Thermo.Interfaces.InstrumentAccess_V1.Control.InstrumentValues.IValue"/> or
  32. a property in a Scan parameter set.
  33. </summary>
  34. <remarks>
  35. An instance of this class will be created by <see cref="P:Thermo.Interfaces.InstrumentAccess_V1.Control.InstrumentValues.IValue.SetParameterDescription"/> or by
  36. <see cref="P:Thermo.Interfaces.InstrumentAccess_V1.Control.Scans.IScans.PossibleParameters"/> or by
  37. IExactiveValue.Commands.
  38. </remarks>
  39. </member>
  40. <member name="P:Thermo.Interfaces.InstrumentAccess_V1.Control.IParameterDescription.Name">
  41. <summary>
  42. This is the name of the command/property this parameter description belongs to.
  43. </summary>
  44. </member>
  45. <member name="P:Thermo.Interfaces.InstrumentAccess_V1.Control.IParameterDescription.Selection">
  46. <summary>
  47. The selection is a little bit complicated. It can have these values:
  48. <list type="table">
  49. <listheader><description>value/example</description><description>description</description></listheader>
  50. <item><description>empty</description><description>This empty string is allowed and doesn't allow the user any selection</description></item>
  51. <item><description>string</description><description>This special value (verbatim "string") allows the user to enter an arbitrary string</description></item>
  52. <item><description>num1-num2</description><description>Integer selection between num1 and num2 inclusively</description></item>
  53. <item><description>num1.frac-num2.frac</description><description>Floating point selection between num1.frac and num2.frac inclusively, frac may be "0"</description></item>
  54. <item><description>selection1,selection2,...</description><description>lets the user select one of the shown values</description></item>
  55. </list>
  56. </summary>
  57. </member>
  58. <member name="P:Thermo.Interfaces.InstrumentAccess_V1.Control.IParameterDescription.DefaultValue">
  59. <summary>
  60. This value will be the default value for the argument or
  61. the empty string if it is unknown.
  62. </summary>
  63. </member>
  64. <member name="P:Thermo.Interfaces.InstrumentAccess_V1.Control.IParameterDescription.Help">
  65. <summary>
  66. This returns the empty string or some help about the command/property.
  67. </summary>
  68. </member>
  69. <member name="T:Thermo.Interfaces.InstrumentAccess_V1.AnalogTraceContainer.IAnalogTraceContainer">
  70. <summary>
  71. All analog trace points of the instrument can be accessed by using this
  72. interface.
  73. <para>
  74. The last-seen value is accessible all the time but may change frequently.
  75. It is also possible to get notice of a new value as soon as it is accessible.
  76. </para>
  77. </summary>
  78. <remarks>
  79. An instance of this class will be created by <see cref="M:Thermo.Interfaces.InstrumentAccess_V1.IInstrumentAccess.GetAnalogTraceContainer(System.Int32)"/>.
  80. </remarks>
  81. <example>
  82. In the following example it is assumed that the instrument has two analog
  83. input devices as most Orbitrap systems and many other MS instruments have:
  84. <code>
  85. using System;
  86. using System.Collections.Generic;
  87. using System.Linq;
  88. using System.Text;
  89. using Thermo.Interfaces.ExactiveAccess_V1;
  90. using Thermo.Interfaces.InstrumentAccess_V1;
  91. using Thermo.Interfaces.InstrumentAccess_V1.AnalogTraceContainer;
  92. namespace UserAccess
  93. {
  94. /// <summary>
  95. /// This class displays the output of the analog channels when they arrive.
  96. /// </summary>
  97. internal class AnalogOutput
  98. {
  99. /// &lt;summary&gt;
  100. /// Create a new &lt;see cref="AnalogOutput"/&gt; and make sure two analog channels are observed.
  101. /// &lt;/summary&gt;
  102. /// &lt;param name="instrument"&gt;the instrument instance&lt;/param&gt;
  103. internal AnalogOutput(IInstrumentAccess instrument)
  104. {
  105. Analog1 = instrument.GetAnalogTraceContainer(0);
  106. Analog1.AnalogTracePointArrived += new EventHandler{AnalogTracePointEventArgs}(Instrument_AnalogTracePointArrived);
  107. Analog2 = instrument.GetAnalogTraceContainer(1);
  108. Analog2.AnalogTracePointArrived += new EventHandler{AnalogTracePointEventArgs}(Instrument_AnalogTracePointArrived);
  109. }
  110. /// &lt;summary&gt;
  111. /// Cleanup this instance.
  112. /// &lt;/summary&gt;
  113. internal void CloseDown()
  114. {
  115. // Be tolerant to thread-switches
  116. IAnalogTraceContainer analogContainer;
  117. analogContainer = Analog1;
  118. Analog1 = null;
  119. if (analogContainer != null)
  120. {
  121. analogContainer.AnalogTracePointArrived -= new EventHandler{AnalogTracePointEventArgs}(Instrument_AnalogTracePointArrived);
  122. }
  123. analogContainer = Analog2;
  124. Analog2 = null;
  125. if (analogContainer != null)
  126. {
  127. analogContainer.AnalogTracePointArrived -= new EventHandler{AnalogTracePointEventArgs}(Instrument_AnalogTracePointArrived);
  128. }
  129. }
  130. /// &lt;summary&gt;
  131. /// Access to the first analog container.
  132. /// &lt;/summary&gt;
  133. private IAnalogTraceContainer Analog1 { get; set; }
  134. /// &lt;summary&gt;
  135. /// Access to the second analog container.
  136. /// &lt;/summary&gt;
  137. private IAnalogTraceContainer Analog2 { get; set; }
  138. /// &lt;summary&gt;
  139. /// When an analog event arrives we dump the content.
  140. /// &lt;/summary&gt;
  141. /// &lt;param name="sender"&gt;used to identify the channel&lt;/param&gt;
  142. /// &lt;param name="e"&gt;content will be dumped&lt;/param&gt;
  143. private void Instrument_AnalogTracePointArrived(object sender, AnalogTracePointEventArgs e)
  144. {
  145. IAnalogTraceContainer analogTrace = sender as IAnalogTraceContainer;
  146. if (analogTrace != null)
  147. {
  148. Console.WriteLine("{0}: [{1} - {2}]: {3} at {4} s", analogTrace.DetectorClass, analogTrace.Minimum, analogTrace.Maximum, e.TracePoint.Value, e.TracePoint.Occurrence.TotalSeconds);
  149. }
  150. }
  151. }
  152. }
  153. </code>
  154. </example>
  155. </member>
  156. <member name="P:Thermo.Interfaces.InstrumentAccess_V1.AnalogTraceContainer.IAnalogTraceContainer.DetectorClass">
  157. <summary>
  158. Get access to the detector class.
  159. <para>
  160. Example: The detector name may be "PDA", but "Analog Input Channel 1"
  161. or something similar is also possible.
  162. </para>
  163. </summary>
  164. </member>
  165. <member name="P:Thermo.Interfaces.InstrumentAccess_V1.AnalogTraceContainer.IAnalogTraceContainer.Minimum">
  166. <summary>
  167. Get access to the lowest possible value of the detector or analog input.
  168. </summary>
  169. </member>
  170. <member name="P:Thermo.Interfaces.InstrumentAccess_V1.AnalogTraceContainer.IAnalogTraceContainer.Maximum">
  171. <summary>
  172. Get access to the highest possible value of the detector or analog input.
  173. </summary>
  174. </member>
  175. <member name="P:Thermo.Interfaces.InstrumentAccess_V1.AnalogTraceContainer.IAnalogTraceContainer.UpdateFrequencyHz">
  176. <summary>
  177. Get access to acquisition frequency of the values. null is returned if the
  178. system has no specific frequency. The value is returned in 1/s (Hertz).
  179. </summary>
  180. </member>
  181. <member name="P:Thermo.Interfaces.InstrumentAccess_V1.AnalogTraceContainer.IAnalogTraceContainer.LastValue">
  182. <summary>
  183. Get access to the last value seen in the system.
  184. The value can be null initially.
  185. </summary>
  186. </member>
  187. <member name="E:Thermo.Interfaces.InstrumentAccess_V1.AnalogTraceContainer.IAnalogTraceContainer.AnalogTracePointArrived">
  188. <summary>
  189. This event will be fired when a new analog value has been emitted by the
  190. instrument. There may be no specific update frequency.
  191. </summary>
  192. </member>
  193. <member name="T:Thermo.Interfaces.InstrumentAccess_V1.MsScanContainer.IMsScanContainer">
  194. <summary>
  195. All MS scans of the instrument can be accessed by using this
  196. interface.
  197. <para>
  198. The last-seen scan is accessible all the time but may change frequently.
  199. It is also possible to get notice of a new scan as soon as it is accessible.
  200. </para>
  201. </summary>
  202. <remarks>
  203. An instance of this class will be created by <see cref="M:Thermo.Interfaces.InstrumentAccess_V1.IInstrumentAccess.GetMsScanContainer(System.Int32)"/>.
  204. </remarks>
  205. <example>
  206. In the following example it is assumed that the instrument has at least one
  207. MS device. Most functions and classes of this namesspace are used.
  208. <code>
  209. using System;
  210. using System.Collections.Generic;
  211. using System.Linq;
  212. using System.Text;
  213. using Thermo.Interfaces.InstrumentAccess_V1;
  214. using Thermo.Interfaces.InstrumentAccess_V1.MsScanContainer;
  215. namespace UserAccess
  216. {
  217. /// &lt;summary&gt;
  218. /// This class presents the output of the scans being acquired by the instrument.
  219. /// &lt;/summary&gt;
  220. internal class ScansOutput
  221. {
  222. /// &lt;summary&gt;
  223. /// Crate a new &lt;see cref="ScansOutput"/&gt;
  224. /// &lt;/summary&gt;
  225. /// &lt;param name="instrument"&gt;the instrument instance&lt;/param&gt;
  226. internal ScansOutput(IInstrumentAccess instrument)
  227. {
  228. ScanContainer = instrument.GetMsScanContainer(0);
  229. Console.WriteLine("Detector class: " + ScanContainer.DetectorClass);
  230. ScanContainer.AcquisitionStreamOpening += new EventHandler&lt;MsAcquisitionOpeningEventArgs&gt;(ScanContainer_AcquisitionStarted);
  231. ScanContainer.AcquisitionStreamClosing += new EventHandler(ScanContainer_AcquisitionEnded);
  232. ScanContainer.MsScanArrived += new EventHandler&lt;MsScanEventArgs&gt;(ScanContainer_ScanArrived);
  233. }
  234. /// &lt;summary&gt;
  235. /// Show the last acquired scan if that exists and cleanup.
  236. /// &lt;/summary&gt;
  237. internal void CloseDown()
  238. {
  239. // Be tolerant to thread-switches
  240. IMsScanContainer scanContainer = ScanContainer;
  241. ScanContainer = null;
  242. if (scanContainer != null)
  243. {
  244. scanContainer.MsScanArrived -= new EventHandler&lt;MsScanEventArgs&gt;(ScanContainer_ScanArrived);
  245. scanContainer.AcquisitionStreamClosing -= new EventHandler(ScanContainer_AcquisitionEnded);
  246. scanContainer.AcquisitionStreamOpening -= new EventHandler&lt;MsAcquisitionOpeningEventArgs&gt;(ScanContainer_AcquisitionStarted);
  247. using (IMsScan scan = scanContainer.GetLastMsScan())
  248. {
  249. DumpScan("GetLastScan()", scan);
  250. }
  251. }
  252. }
  253. /// &lt;summary&gt;
  254. /// Access to the scan container hosted by this instance.
  255. /// &lt;/summary&gt;
  256. private IMsScanContainer ScanContainer { get; set; }
  257. /// &lt;summary&gt;
  258. /// When a new acquisition starts we dump that information.
  259. /// &lt;/summary&gt;
  260. /// &lt;param name="sender"&gt;doesn't matter&lt;/param&gt;
  261. /// &lt;param name="e"&gt;doesn't matter&lt;/param&gt;
  262. private void ScanContainer_AcquisitionStarted(object sender, EventArgs e)
  263. {
  264. Console.WriteLine("START OF ACQUISITION");
  265. }
  266. /// &lt;summary&gt;
  267. /// When an acquisitions ends we dump that information.
  268. /// &lt;/summary&gt;
  269. /// &lt;param name="sender"&gt;doesn't matter&lt;/param&gt;
  270. /// &lt;param name="e"&gt;doesn't matter&lt;/param&gt;
  271. private void ScanContainer_AcquisitionEnded(object sender, EventArgs e)
  272. {
  273. Console.WriteLine("END OF ACQUISITION");
  274. }
  275. /// &lt;summary&gt;
  276. /// When a new scan arrives we dump that information in verbose mode.
  277. /// &lt;/summary&gt;
  278. /// &lt;param name="sender"&gt;doesn't matter&lt;/param&gt;
  279. /// &lt;param name="e"&gt;used to access the scan information&lt;/param&gt;
  280. private void ScanContainer_ScanArrived(object sender, MsScanEventArgs e)
  281. {
  282. Console.WriteLine("Scan arrived");
  283. // As an example we access all centroids
  284. using (IMsScan scan = e.GetScan())
  285. {
  286. DumpScan("Scan arrived", scan);
  287. }
  288. }
  289. /// &lt;summary&gt;
  290. /// Dump a scan and prepend it with an intro string.
  291. /// &lt;/summary&gt;
  292. /// &lt;param name="intro"&gt;string to prepend&lt;/param&gt;
  293. /// &lt;param name="scan"&gt;thing to dump&lt;/param&gt;
  294. private void DumpScan(string intro, IMsScan scan)
  295. {
  296. StringBuilder sb = new StringBuilder();
  297. sb.AppendFormat(Instrument.Now.ToString(Program.TimeFormat));
  298. sb.Append(": ");
  299. sb.Append(intro);
  300. sb.Append(", ");
  301. if (scan == null)
  302. {
  303. sb.Append("(empty scan)");
  304. Console.WriteLine(sb.ToString());
  305. return;
  306. }
  307. else
  308. {
  309. sb.Append("detector=");
  310. sb.Append(scan.DetectorName);
  311. string id;
  312. if (scan.SpecificInformation.TryGetValue("Access Id:", out id))
  313. {
  314. sb.Append(", id=");
  315. sb.Append(id);
  316. }
  317. Console.WriteLine(sb.ToString());
  318. }
  319. // This is rather noisy, dump all variables:
  320. DumpVars(scan);
  321. Console.Write(" Noise: ");
  322. foreach (INoiseNode noise in scan.NoiseBand)
  323. {
  324. Console.Write("[{0}, {1}], ", noise.Mz, noise.Intensity);
  325. }
  326. Console.WriteLine();
  327. // Not so useful:
  328. Console.WriteLine("{0} centroids, {1} profile peaks", scan.CentroidCount ?? 0, scan.ProfileCount ?? 0);
  329. // Iterate over all centroids and access dump all profile elements for each.
  330. foreach (ICentroid centroid in scan.Centroids)
  331. {
  332. Console.WriteLine(" {0,10:F5}, I={1:E5}, C={2}, E={3,-5} F={4,-5} M={5,-5} R={6,-5}",
  333. centroid.Mz, centroid.Intensity, centroid.Charge ?? -1, centroid.IsExceptional, centroid.IsFragmented, centroid.IsMerged, centroid.IsReferenced);
  334. Console.Write(" Profile:");
  335. try
  336. {
  337. foreach (IMassIntensity profilePeak in centroid.Profile)
  338. {
  339. Console.Write(" [{0,10:F5},{1:E5}] ", profilePeak.Mz, profilePeak.Intensity);
  340. }
  341. }
  342. catch
  343. {
  344. }
  345. Console.WriteLine();
  346. }
  347. }
  348. /// &lt;summary&gt;
  349. /// Dump all variables belonging to a scan
  350. /// &lt;/summary&gt;
  351. /// &lt;param name="scan"&gt;the scan for which to dump all variables&lt;/param&gt;
  352. private void DumpVars(IMsScan scan)
  353. {
  354. Console.WriteLine(" COMMON");
  355. DumpVars(scan.CommonInformation);
  356. Console.WriteLine(" SPECIFIC");
  357. DumpVars(scan.SpecificInformation);
  358. }
  359. /// &lt;summary&gt;
  360. /// Dump all scan variables belonging to a specific container in a scan.
  361. /// &lt;/summary&gt;
  362. /// &lt;param name="container"&gt;container to dump all contained variables for&lt;/param&gt;
  363. private void DumpVars(IInfoContainer container)
  364. {
  365. foreach (string s in container.Names)
  366. {
  367. DumpVar(container, s);
  368. }
  369. }
  370. /// &lt;summary&gt;
  371. /// Dump the content of a single variable to the console after testing the consistency.
  372. /// &lt;/summary&gt;
  373. /// &lt;param name="container"&gt;container that variable belongs to&lt;/param&gt;
  374. /// &lt;param name="name"&gt;name of the variable&lt;/param&gt;
  375. /// &lt;param name="sb"&gt;buffer to be reused for speed&lt;/param&gt;
  376. private void DumpVar(IInfoContainer container, string name)
  377. {
  378. object o = null;
  379. string s = null;
  380. MsScanInformationSource i = MsScanInformationSource.Unknown;
  381. if (container.TryGetValue(name, out s, ref i))
  382. {
  383. // i should have a reasonable value now
  384. if (container.TryGetRawValue(name, out o, ref i))
  385. {
  386. Console.WriteLine(" {0}: type={1}, text='{2}', raw='{3}'",
  387. name, i, s, o);
  388. }
  389. }
  390. }
  391. }
  392. }
  393. </code>
  394. </example>
  395. </member>
  396. <member name="M:Thermo.Interfaces.InstrumentAccess_V1.MsScanContainer.IMsScanContainer.GetLastMsScan">
  397. <summary>
  398. Get access to the last scan seen in the system.
  399. The value can be null initially.
  400. <para>
  401. Note that accessing this property forces the consumer to dispose
  402. the item as soon as possible in order to free its shared memory resources.
  403. </para>
  404. </summary>
  405. <returns>The method returns the latest scan the framework is aware off. It may be null.</returns>
  406. </member>
  407. <member name="P:Thermo.Interfaces.InstrumentAccess_V1.MsScanContainer.IMsScanContainer.DetectorClass">
  408. <summary>
  409. Get access to the detector class. The class should include describe
  410. the instrument detector set precisely, although the individual
  411. detector type of a scan uses only a part of the instrument set.
  412. <para>
  413. Example: The instrument name may be "Thermo Orbitrap Velos Pro", the
  414. detector class may be "Hybrid LinearIonTrap Orbitrap" and the
  415. scan detector name may be "LinearIonTrap".
  416. </para>
  417. </summary>
  418. </member>
  419. <member name="E:Thermo.Interfaces.InstrumentAccess_V1.MsScanContainer.IMsScanContainer.MsScanArrived">
  420. <summary>
  421. This event will be fired when a new scan has been emitted by the
  422. instrument.
  423. <para>
  424. Any listener to this event must handle the event as fast as possible.
  425. It is good practice by analyzing tool to enqueue the scan into
  426. queue and process that queue in another thread.
  427. </para>
  428. </summary>
  429. </member>
  430. <member name="E:Thermo.Interfaces.InstrumentAccess_V1.MsScanContainer.IMsScanContainer.AcquisitionStreamOpening">
  431. <summary>
  432. This event will be fired when a new acquisition is started and the system
  433. is about to open rawfiles, etc.
  434. <para>
  435. Scans may be created without an explicite acquisition if the instrument is
  436. 'just' set to running. An acquisition is not necessarily bound to a
  437. rawfile, but it is in most cases.
  438. </para>
  439. <para>
  440. The specific information of a scan will reflect the information whether
  441. a scan belongs to an acquisition or not.
  442. </para>
  443. </summary>
  444. </member>
  445. <member name="E:Thermo.Interfaces.InstrumentAccess_V1.MsScanContainer.IMsScanContainer.AcquisitionStreamClosing">
  446. <summary>
  447. This event will be fired when the current acquisition ended.
  448. <para>
  449. Scans may be created without an explicite acquisition, so further scans may
  450. arrive after an acquisition stopped. It may even be possible that few scans
  451. belonging to the last acquisition may arrive and that an opened rawfile
  452. will gather them because of a flushing data queue on the transport layer.
  453. </para>
  454. <para>
  455. The specific information of a scan will reflect the information whether
  456. a scan belongs to an acquisition or not.
  457. </para>
  458. </summary>
  459. </member>
  460. <member name="T:Thermo.Interfaces.InstrumentAccess_V1.Control.Scans.IScanDefinition">
  461. <summary>
  462. This interface covers the functionality to define a custom or repeating scan.
  463. </summary>
  464. <remarks>
  465. This is a base interface of <see cref="T:Thermo.Interfaces.InstrumentAccess_V1.Control.Scans.ICustomScan"/> and <see cref="T:Thermo.Interfaces.InstrumentAccess_V1.Control.Scans.IRepeatingScan"/>.
  466. </remarks>
  467. </member>
  468. <member name="P:Thermo.Interfaces.InstrumentAccess_V1.Control.Scans.IScanDefinition.Values">
  469. <summary>
  470. Get access to the value set. Any value nor defined will be replaced by the
  471. value defined in the default scan.
  472. <para>
  473. Illegal values will be ignored, values out of range will not be accepted.
  474. </para>
  475. <para>
  476. The set of possible values can be queried by accessing PossibleParameters
  477. in <see cref="T:Thermo.Interfaces.InstrumentAccess_V1.Control.Scans.IScans"/>. The key must be an <see cref="T:Thermo.Interfaces.InstrumentAccess_V1.Control.IParameterDescription"/> Name,
  478. the value must match the Selection definition.
  479. </para>
  480. </summary>
  481. </member>
  482. <member name="P:Thermo.Interfaces.InstrumentAccess_V1.Control.Scans.IScanDefinition.RunningNumber">
  483. <summary>
  484. This number will be passed along with the scan job and can be used
  485. to identify it later when the acquired scan results arrive.
  486. 0 is a reserved value. The default value is 1.
  487. </summary>
  488. </member>
  489. <member name="T:Thermo.Interfaces.InstrumentAccess_V1.Control.Methods.NamespaceDoc">
  490. <summary>
  491. This namespace covers the functionality that a user may have to manipulate methods of an instrument.
  492. These manipulations can be applied to the running acquisition.
  493. <para>
  494. Most functionality in this namespace is accessible offline.
  495. </para>
  496. <para>
  497. Obtain <see cref="T:Thermo.Interfaces.InstrumentAccess_V1.Control.IControl"/>.<see cref="P:Thermo.Interfaces.InstrumentAccess_V1.Control.IControl.Methods"/>
  498. to create the desired base class.
  499. </para>
  500. </summary>
  501. </member>
  502. <member name="T:Thermo.Interfaces.InstrumentAccess_V1.Control.Acquisition.StateChangedEventArgs">
  503. <summary>
  504. This implementation of EventArgs carries an <see cref="T:Thermo.Interfaces.InstrumentAccess_V1.Control.Acquisition.IState"/>.
  505. </summary>
  506. <remarks>
  507. See <see cref="T:Thermo.Interfaces.InstrumentAccess_V1.Control.Acquisition.IAcquisition"/> for an example how this class can be used.
  508. <para>
  509. An instance of this class will be created by <see cref="E:Thermo.Interfaces.InstrumentAccess_V1.Control.Acquisition.IAcquisition.StateChanged"/>.
  510. </para>
  511. </remarks>
  512. </member>
  513. <member name="M:Thermo.Interfaces.InstrumentAccess_V1.Control.Acquisition.StateChangedEventArgs.#ctor">
  514. <summary>
  515. Create a new <see cref="T:Thermo.Interfaces.InstrumentAccess_V1.Control.Acquisition.StateChangedEventArgs"/>.
  516. </summary>
  517. </member>
  518. <member name="P:Thermo.Interfaces.InstrumentAccess_V1.Control.Acquisition.StateChangedEventArgs.State">
  519. <summary>
  520. Get access to the current state of the instrument.
  521. It has replaced already the State in the <see cref="T:Thermo.Interfaces.InstrumentAccess_V1.Control.Acquisition.IAcquisition"/>.
  522. </summary>
  523. </member>
  524. <member name="T:Thermo.Interfaces.InstrumentAccess_V1.Control.Acquisition.Modes.IOnMode">
  525. <summary>
  526. This mode lets an instrument enter the On state or change the behaviour in the On state.
  527. The request may be rejected if the instrument is in a state that should not be disturbed. See <see cref="T:Thermo.Interfaces.InstrumentAccess_V1.Control.Acquisition.Modes.IForcedStandbyMode"/>.
  528. </summary>
  529. <remarks>
  530. See <see cref="T:Thermo.Interfaces.InstrumentAccess_V1.Control.Acquisition.IAcquisition"/> for an example how this interface can be used.
  531. <para>
  532. An instance of this class will be created by <see cref="M:Thermo.Interfaces.InstrumentAccess_V1.Control.Acquisition.IAcquisition.CreateOnMode"/>.
  533. </para>
  534. </remarks>
  535. </member>
  536. <member name="T:Thermo.Interfaces.InstrumentAccess_V1.Control.Acquisition.Modes.IMode">
  537. <summary>
  538. A mode is a more or less complex information that selects a new operation mode of an instrument.
  539. </summary>
  540. </member>
  541. <member name="M:Thermo.Interfaces.InstrumentAccess_V1.Control.Acquisition.Modes.IMode.ToString">
  542. <summary>
  543. This is an informational description of the new mode.
  544. </summary>
  545. <returns>The returned string gives a short description of the mode.</returns>
  546. </member>
  547. <member name="P:Thermo.Interfaces.InstrumentAccess_V1.Control.Acquisition.Modes.IMode.AdditionalValues">
  548. <summary>
  549. Get access to a collection of additional values. This will not be used in most cases.
  550. </summary>
  551. </member>
  552. <member name="T:Thermo.Interfaces.InstrumentAccess_V1.Control.Acquisition.Modes.IForcedOffMode">
  553. <summary>
  554. This mode lets an instrument enter the Off state. The request will be honoured even if the
  555. instrument is within an acquisition or another state where it is usually better to continue.
  556. See <see cref="T:Thermo.Interfaces.InstrumentAccess_V1.Control.Acquisition.Modes.IForcedOffMode"/>.
  557. </summary>
  558. <remarks>
  559. See <see cref="T:Thermo.Interfaces.InstrumentAccess_V1.Control.Acquisition.IAcquisition"/> for an example how this interface can be used.
  560. <para>
  561. An instance of this class will be created by <see cref="M:Thermo.Interfaces.InstrumentAccess_V1.Control.Acquisition.IAcquisition.CreateForcedOffMode"/>.
  562. </para>
  563. </remarks>
  564. </member>
  565. <member name="T:Thermo.Interfaces.InstrumentAccess_V1.Control.Acquisition.ChangeResult">
  566. <summary>
  567. Defines the result of a requested instrument mode change.
  568. </summary>
  569. <remarks>
  570. See <see cref="T:Thermo.Interfaces.InstrumentAccess_V1.Control.Acquisition.IAcquisition"/> for an example how this enumeration can be used.
  571. </remarks>
  572. </member>
  573. <member name="F:Thermo.Interfaces.InstrumentAccess_V1.Control.Acquisition.ChangeResult.Submitted">
  574. <summary>
  575. This state change request has been submitted to the instrument. The instrument itself may dishonour this request
  576. if the needed condition to apply the state change request have changed between the submitting and the arrival
  577. in the instrument.
  578. </summary>
  579. </member>
  580. <member name="F:Thermo.Interfaces.InstrumentAccess_V1.Control.Acquisition.ChangeResult.InstrumentDisconnected">
  581. <summary>
  582. The instrument is disconnected.
  583. </summary>
  584. </member>
  585. <member name="F:Thermo.Interfaces.InstrumentAccess_V1.Control.Acquisition.ChangeResult.IllegalValues">
  586. <summary>
  587. The state change request has illegal values.
  588. </summary>
  589. </member>
  590. <member name="F:Thermo.Interfaces.InstrumentAccess_V1.Control.Acquisition.ChangeResult.UnknownRequestType">
  591. <summary>
  592. The state change request is of an unknown type. Use <see cref="T:Thermo.Interfaces.InstrumentAccess_V1.Control.Acquisition.IAcquisition"/> to generate a valid type.
  593. </summary>
  594. </member>
  595. <member name="F:Thermo.Interfaces.InstrumentAccess_V1.Control.Acquisition.ChangeResult.ForeignControl">
  596. <summary>
  597. The instrument is under exclusive use of a different component or software package.
  598. </summary>
  599. </member>
  600. <member name="F:Thermo.Interfaces.InstrumentAccess_V1.Control.Acquisition.ChangeResult.IllegalOperationState">
  601. <summary>
  602. The instrument is not in the proper condition to accept the state change request.
  603. </summary>
  604. </member>
  605. <member name="T:Thermo.Interfaces.InstrumentAccess_V1.IError">
  606. <summary>
  607. An IError describes an error coming from the instrument during an acquisition.
  608. This interface will not be used for status reports or messages of the
  609. transport layer.
  610. </summary>
  611. <remarks>
  612. See <see cref="T:Thermo.Interfaces.InstrumentAccess_V1.ErrorsArrivedEventArgs"/> for an example how this interface can be used.
  613. <para>
  614. An instance of this class will be created by <see cref="P:Thermo.Interfaces.InstrumentAccess_V1.ErrorsArrivedEventArgs.Errors"/>.
  615. </para>
  616. </remarks>
  617. </member>
  618. <member name="P:Thermo.Interfaces.InstrumentAccess_V1.IError.Content">
  619. <summary>
  620. The textual content of the error.
  621. </summary>
  622. </member>
  623. <member name="P:Thermo.Interfaces.InstrumentAccess_V1.IError.Occurrence">
  624. <summary>
  625. The time difference between acquisition start and this error occurred.
  626. </summary>
  627. </member>
  628. <member name="T:Thermo.Interfaces.InstrumentAccess_V1.Control.Scans.ICustomScan">
  629. <summary>
  630. This scan definition can be placed in the instrument's
  631. job queue with individual properties. A custom scan will
  632. be executed only once.
  633. </summary>
  634. <remarks>
  635. See <see cref="T:Thermo.Interfaces.InstrumentAccess_V1.Control.Scans.IScans"/> for an example how this interface can be used.
  636. <para>
  637. An instance of this class will be created by <see cref="M:Thermo.Interfaces.InstrumentAccess_V1.Control.Scans.IScans.CreateCustomScan"/>.
  638. </para>
  639. </remarks>
  640. </member>
  641. <member name="P:Thermo.Interfaces.InstrumentAccess_V1.Control.Scans.ICustomScan.SingleProcessingDelay">
  642. <summary>
  643. The instrument will not execute any further custom scan
  644. if this property is positive until the delay has expired
  645. or a new custom scan has been defined.
  646. <para>
  647. The unit of this property is seconds and possible values are
  648. between 0 and 600 inclusively. The default value is 0.
  649. </para>
  650. </summary>
  651. </member>
  652. <member name="T:Thermo.Interfaces.InstrumentAccess_V1.Control.Scans.IScans">
  653. <summary>
  654. This interface allows the control over the next scan to be performed by the
  655. instrument with or without a method.
  656. <para>
  657. Either this interface or the <see cref="T:Thermo.Interfaces.InstrumentAccess_V1.Control.Methods.IMethods"/> interface should be used.
  658. </para>
  659. </summary>
  660. <remarks>
  661. An instance of this class will be created by <see cref="M:Thermo.Interfaces.InstrumentAccess_V1.Control.IControl.GetScans(System.Boolean)"/>.
  662. <para>
  663. Using this interface allows one to insert some scans in the normal flow of
  664. operation. It has several three layers of execution.
  665. </para>
  666. <para>
  667. The lowest layer is defined by the instrument. It performs those steps that
  668. are defined elsewhere, this can be either method execution, tuning or other things.
  669. </para>
  670. <para>
  671. The next layer that has a higher priority is the repeated scans layer which are
  672. defined here. If they are set they will be executed instead of the previous layer.
  673. A further Set call replaces the previous repition. A Cancel call will stop
  674. the repetition and operation falls back one layer. A custom scan can still be
  675. defined, though. The repition can be switched on and off on demand as often
  676. as desired.
  677. </para>
  678. <para>
  679. The most prioritized layer is that of custom scans. They will be executed before
  680. any furcher scan defined in the other layers. However, a Set operation may result
  681. in undefined behaviour (but no system fault happens) if the previous scan has not been
  682. started yet. It is best to avoid this situation. The custom scan will be scheduled and
  683. the AcceptsNextScan event will be fired at the next possible point in time. If a
  684. custom scan has a delay time set the instrument will wait this additional time
  685. until it falls back to a lower layer; either the repetition scans if they are
  686. defined or the normal operation mode.
  687. </para>
  688. </remarks>
  689. <example>
  690. The following code illustrates the use of most functionality in this namespace.
  691. A running acquisition (Press "On" in Tune) will be modified so that the polarity
  692. will be toggled between each scan.
  693. <code>
  694. using System;
  695. using System.Collections.Generic;
  696. using System.Linq;
  697. using System.Text;
  698. using System.Threading;
  699. using System.Globalization;
  700. using Thermo.Interfaces.InstrumentAccess_V1;
  701. using Thermo.Interfaces.InstrumentAccess_V1.Control;
  702. using Thermo.Interfaces.InstrumentAccess_V1.Control.Scans;
  703. namespace UserAccess
  704. {
  705. /// &lt;summary&gt;
  706. /// This class demonstrates the use of the &lt;see cref="IScans"/&gt; interface.
  707. /// &lt;/summary&gt;
  708. internal class ScansTest : IDisposable
  709. {
  710. private IScans m_scans;
  711. private bool m_startCustomScan = true;
  712. private object m_lock = new object();
  713. private int m_disposed;
  714. private long m_runningNumber = 12345; // start with an offset to make sure it's "us"
  715. private int m_polarity = 0;
  716. /// &lt;summary&gt;
  717. /// Create a new &lt;see cref="ScansTest"/&gt; and start the performance test immediately.
  718. /// &lt;/summary&gt;
  719. /// &lt;param name="instrument"&gt;the instrument instance&lt;/param&gt;
  720. /// &lt;param name="arguments"&gt;program arguments&lt;/param&gt;
  721. internal ScansTest(IInstrumentAccess instrument)
  722. {
  723. m_scans = instrument.Control.GetScans(false);
  724. m_scans.CanAcceptNextCustomScan += new EventHandler(Scans_CanAcceptNextCustomScan);
  725. m_scans.PossibleParametersChanged += new EventHandler(Scans_PossibleParametersChanged);
  726. DumpPossibleParameters();
  727. bool startNewScan = false;
  728. lock (m_lock)
  729. {
  730. if (m_scans.PossibleParameters.Length &gt; 0)
  731. {
  732. startNewScan = m_startCustomScan;
  733. m_startCustomScan = false;
  734. }
  735. }
  736. if (startNewScan)
  737. {
  738. StartNewScan();
  739. }
  740. }
  741. /// &lt;summary&gt;
  742. /// The final destructor releases allocated system resources.
  743. /// &lt;/summary&gt;
  744. ~ScansTest()
  745. {
  746. // Let the GC dispose managed members itself.
  747. Dispose(false);
  748. }
  749. /// &lt;summary&gt;
  750. /// Clean up any resources being used.
  751. /// &lt;/summary&gt;
  752. /// &lt;param name="disposeEvenManagedStuff"&gt;true to dispose managed and unmanaged resources; false to dispose unmanaged resources&lt;/param&gt;
  753. protected void Dispose(bool disposeEvenManagedStuff)
  754. {
  755. // prevent double disposing
  756. if (Interlocked.Exchange(ref m_disposed, 1) != 0)
  757. {
  758. return;
  759. }
  760. if (disposeEvenManagedStuff)
  761. {
  762. if (m_scans != null)
  763. {
  764. m_scans.CanAcceptNextCustomScan -= new EventHandler(Scans_CanAcceptNextCustomScan);
  765. m_scans.PossibleParametersChanged -= new EventHandler(Scans_PossibleParametersChanged);
  766. m_scans.Dispose();
  767. m_scans = null;
  768. }
  769. }
  770. }
  771. /// &lt;summary&gt;
  772. /// Clean up any resources being used.
  773. /// &lt;/summary&gt;
  774. virtual public void Dispose()
  775. {
  776. // Dispose managed and unmanaged resources and tell GC we don't need the destructor getting called.
  777. Dispose(true);
  778. GC.SuppressFinalize(this);
  779. }
  780. /// &lt;summary&gt;
  781. /// Get access to the flag whether this object is disposed.
  782. /// &lt;/summary&gt;
  783. internal bool Disposed { get { return m_disposed != 0; } }
  784. /// &lt;summary&gt;
  785. /// Dump the list of possible commands.
  786. /// &lt;/summary&gt;
  787. private bool DumpPossibleParameters()
  788. {
  789. IParameterDescription[] parameters = m_scans.PossibleParameters;
  790. if (parameters.Length == 0)
  791. {
  792. Console.WriteLine("No possible IScans parameters known.");
  793. return false;
  794. }
  795. Console.WriteLine("IScans parameters:");
  796. foreach (IParameterDescription parameter in parameters)
  797. {
  798. StringBuilder sb = new StringBuilder();
  799. sb.AppendFormat(" '{0}' ", parameter.Name);
  800. if (parameter.Selection == "")
  801. {
  802. sb.AppendFormat("doesn't accept an argument, help: {0}", parameter.Help);
  803. }
  804. else
  805. {
  806. sb.AppendFormat("accepts '{0}', default='{1}', help: {2}", parameter.Selection, parameter.DefaultValue, parameter.Help);
  807. }
  808. Console.WriteLine(sb.ToString());
  809. }
  810. return true;
  811. }
  812. /// &lt;summary&gt;
  813. /// Start a new custom scan.
  814. /// &lt;/summary&gt;
  815. private void StartNewScan()
  816. {
  817. ICustomScan cs = m_scans.CreateCustomScan();
  818. cs.RunningNumber = m_runningNumber++;
  819. // Allow an extra delay of 500 ms, we will answer as fast as possible, so this is a maximum value.
  820. cs.SingleProcessingDelay = 0.50D;
  821. // Toggle the polarity:
  822. m_polarity = (m_polarity == 0) ? 1 : 0;
  823. cs.Values["pol"] = m_polarity.ToString(NumberFormatInfo.InvariantInfo);
  824. try
  825. {
  826. DateTime now = Instrument.Now;
  827. if (!m_scans.SetCustomScan(cs))
  828. {
  829. Console.WriteLine("NEW CUSTOM SCAN HAS NOT BEEN PLACED, CONNECTION TO SERVICE BROKEN.");
  830. }
  831. Console.WriteLine(now.ToString(Program.TimeFormat) + ": Placed a new custom scan(" + cs.RunningNumber + ")");
  832. }
  833. catch (Exception e)
  834. {
  835. Console.WriteLine("PLACING A NEW SCAN: " + e.Message);
  836. }
  837. }
  838. /// &lt;summary&gt;
  839. /// Called when the current custom scan has been processed and the next custom scan can be accepted.
  840. /// We start a new scan.
  841. /// &lt;/summary&gt;
  842. /// &lt;param name="sender"&gt;doesn't matter&lt;/param&gt;
  843. /// &lt;param name="e"&gt;doesn't matter&lt;/param&gt;
  844. private void Scans_CanAcceptNextCustomScan(object sender, EventArgs e)
  845. {
  846. Console.WriteLine(Instrument.Now.ToString(Program.TimeFormat) + ": CanAcceptNextCustomScan");
  847. if ((m_scans != null) &amp;&amp; (m_scans.PossibleParameters.Length &gt; 0))
  848. {
  849. // Assume we are able to place a new scan.
  850. StartNewScan();
  851. }
  852. }
  853. /// &lt;summary&gt;
  854. /// Called when the list of possible commands have changed we dump them.
  855. /// Additionally we start a new scan.
  856. /// &lt;/summary&gt;
  857. /// &lt;param name="sender"&gt;doesn't matter&lt;/param&gt;
  858. /// &lt;param name="e"&gt;doesn't matter&lt;/param&gt;
  859. private void Scans_PossibleParametersChanged(object sender, EventArgs e)
  860. {
  861. if (!DumpPossibleParameters())
  862. {
  863. return;
  864. }
  865. bool startNewScan = false;
  866. lock (m_lock)
  867. {
  868. if (m_scans.PossibleParameters.Length &gt; 0)
  869. {
  870. startNewScan = m_startCustomScan;
  871. m_startCustomScan = false;
  872. }
  873. }
  874. if (startNewScan)
  875. {
  876. StartNewScan();
  877. }
  878. }
  879. }
  880. }
  881. </code>
  882. </example>
  883. </member>
  884. <member name="M:Thermo.Interfaces.InstrumentAccess_V1.Control.Scans.IScans.SetRepetitionScan(Thermo.Interfaces.InstrumentAccess_V1.Control.Scans.IRepeatingScan)">
  885. <summary>
  886. Define or replace the repetition scan to be performed.
  887. <para>
  888. The scan may be partially defined in which case the properties of the previously
  889. executed scan will be used. At least one property needs to be specified.
  890. </para>
  891. </summary>
  892. <param name="scan">object containing new default scan definitions</param>
  893. <returns>true if the command has been sent to the instrument, false otherwise</returns>
  894. </member>
  895. <member name="M:Thermo.Interfaces.InstrumentAccess_V1.Control.Scans.IScans.CancelRepetition">
  896. <summary>
  897. Cancels any repetition of scans that have been defined by <see cref="M:Thermo.Interfaces.InstrumentAccess_V1.Control.Scans.IScans.SetRepetitionScan(Thermo.Interfaces.InstrumentAccess_V1.Control.Scans.IRepeatingScan)"/>.
  898. </summary>
  899. <returns>true if the command has been sent to the instrument, false otherwise</returns>
  900. </member>
  901. <member name="M:Thermo.Interfaces.InstrumentAccess_V1.Control.Scans.IScans.SetCustomScan(Thermo.Interfaces.InstrumentAccess_V1.Control.Scans.ICustomScan)">
  902. <summary>
  903. Define a scan to be performed next. The current standard operation (method, prepetition scan, etc)
  904. will continue after this scan and maybe following custom scans have been acquired.
  905. <para>
  906. The operation on the instrument is undefined if several custom scans are set without having the
  907. instrument dealt with the previous custom scans. However, the instrument will not stop
  908. to run, choke or show any other fatal error.
  909. </para>
  910. <para>
  911. The event <see cref="E:Thermo.Interfaces.InstrumentAccess_V1.Control.Scans.IScans.CanAcceptNextCustomScan"/> is fired once after the instrument has processed a
  912. custom scan. The further custom scan can be set then or within the delay time that
  913. might have

Large files files are truncated, but you can click here to view the full file