3.8 KiB
source_files, generated_at, model, schema_version, sha256
| source_files | generated_at | model | schema_version | sha256 | |||
|---|---|---|---|---|---|---|---|
|
2026-04-17T15:40:08.306334+00:00 | zai-org/GLM-5-FP8 | 1 | 478b82ea7c566003 |
Documentation: DTS.DASLib.Service Namespace
1. Purpose
This module provides service-layer functionality for DTS SLICE data acquisition hardware. It contains a generic XML-serializable dictionary implementation (SerializableDictionary<TKey, TValue>) for persisting key-value data, a partial Slice<T> class implementing device information querying via the IInformationActions interface, and localized resource strings for error messaging and status reporting. The module serves as an intermediary between hardware communication layers and application-level configuration, calibration, and data collection operations.
2. Public Interface
SerializableDictionary<TKey, TValue>
Signature: public class SerializableDictionary<TKey, TValue> : Dictionary<TKey, TValue>, IXmlSerializable
A generic dictionary class that implements IXmlSerializable to enable XML serialization of key-value pairs. Standard Dictionary<TKey, TValue> does not support XML serialization directly.
| Method | Signature | Description |
|---|---|---|
GetSchema |
public System.Xml.Schema.XmlSchema GetSchema() |
Returns null. Required by IXmlSerializable interface. |
ReadXml |
public void ReadXml(System.Xml.XmlReader reader) |
Deserializes dictionary contents from XML. Expects elements structured as <SerializedDictionary><Item><Key>...</Key><Value>...</Value></Item>...</SerializedDictionary>. Handles empty elements and end-of-stream conditions. |
WriteXml |
public void WriteXml(System.Xml.XmlWriter writer) |
Serializes dictionary contents to XML. Writes a complete XML document with root element <SerializedDictionary> containing <Item> children, each with <Key> and <Value> sub-elements. |
Slice (Partial Class - Information Region)
Signature: public partial class Slice<T> : Communication<T>, IDASCommunication, IConfigurationActions, ICalibrateActions, ITriggerCheckActions, IRealTimeActions, IArmActions, IDownloadActions, IInformationActions where T : IConnection, new()
A partial class providing SLICE device communication and control. The Information region implements device querying functionality.
| Method | Signature | Description |
|---|---|---|
Query (explicit interface) |
void IInformationActions.Query(ServiceCallback callback, object userData) |
Launches an asynchronous worker to query device information. Creates a SliceServiceAsyncInfo wrapper and delegates to AsyncQueryInformation. |
AsyncQueryInformation |
private void AsyncQueryInformation(object asyncInfo) |
Executes synchronous stack query via QueryStackContents, builds InfoResult with module metadata (serial numbers, gains, sample rates, channel counts), and stores result in DASInfo property. Handles CanceledException and general exceptions via the async info wrapper. |
DASFactoryQueryInformation |
private void DASFactoryQueryInformation() |
Note: Appears to be a duplicate/alternate implementation using StackContentsQuery instead of QueryStackContents. Contains a bug (references undefined info variable). Purpose unclear from source alone. |
Resources (Internal Class)
Signature: internal class Resources
Auto-generated strongly-typed resource accessor for localized strings in the DTS.DASLib.Service namespace.
| Property | Type | Description |
|---|---|---|
ResourceManager |
global::System.Resources.ResourceManager |
Cached ResourceManager instance for the assembly. |
| `Culture |