15 KiB
source_files, generated_at, model, schema_version, sha256
| source_files | generated_at | model | schema_version | sha256 | |||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
|
2026-04-16T11:36:27.833103+00:00 | zai-org/GLM-5-FP8 | 1 | d315c00965ab6aef |
DTS.Common.DataModel Module Documentation
1. Purpose
This module provides the core data model and application-wide state management for the DTS DataPRO system. It contains global application properties, configuration settings, data file management, channel representation logic for hardware abstraction, and the DAS (Data Acquisition System) factory wrapper for device discovery and communication. The module serves as the central hub connecting hardware abstraction, user context, ISO standards integration, and test data management.
2. Public Interface
ApplicationProperties (static class)
Global application state container.
| Property | Type | Description |
|---|---|---|
CurrentUser |
User |
Gets or sets the currently logged-in user. |
DASFactory |
DASFactory |
Gets or sets the DAS factory instance for device management. |
CurrentView |
User |
Gets or sets the current view context (distinct from CurrentUser). |
IsoDb |
ISO13499FileDb |
Gets or sets the ISO 13499 database reference. |
LicenseValidationResult |
ValidationResult |
Gets or sets the license validation state. |
CanCurrentUserCommitChannelCodes |
bool |
Gets or sets whether the current user has permission to commit channel codes. |
CollectDataProcess : BasePropertyChanged
Represents a data collection process with visual properties.
| Member | Signature | Description |
|---|---|---|
| Constructor | CollectDataProcess(string name, Color color) |
Initializes with name and background color. |
Name |
string |
Gets or sets the process name. |
BackgroundColor |
Color |
Gets or sets the background color. |
IsEnabled |
bool |
Gets or sets whether the process is enabled. |
SysBuiltObjectType
Container for Dynamic Groups of a given test object type (Vehicle 1, Vehicle 2, Sled, etc.).
| Member | Signature | Description |
|---|---|---|
| Constructor | SysBuiltObjectType(string testObjectType) |
Initializes with a test object type string. |
TestObject |
MMETestObjects |
Gets or sets the test object via ISO database lookup. Setter stores value.Test_Object internally. |
ISOTestObjectType |
string |
Gets TestObject.Text_L1. |
ToString() |
override string |
Returns TestObject.Text_L1. |
DataModelSettings (static class)
Application-wide configuration with default values.
Hardware/Signal Settings:
UseISOCodeForDiadem200:bool(default:false)SampleRateAAFilterRatio:byte(default:5)RealtimeSampleRateAAFilterRatio:byte(default:1)SLICETurnOffAAFRealtime:bool(default:true)ShowCompactHardware:bool(default:true)
Error Tolerance Settings:
AllowedVoltageInsertionErrorPercent:double(default:1)AllowedExcitationErrorPercent:double(default:2)AllowedShuntErrorPercent:double(default:5)ShuntToleranceHighOhmPercent:double(default:10)AllowedGainErrorPercent:double(default:2)AllowedGainErrorPercent_SLICE6andSLICE6A:double(default:5)AutoZeroPercentDeviationAllowed:double(default:5)ShuntToleranceHighOhmResistance:double(default:4000)
Timing/Network Settings:
CheckUnitsIntervalMillisecond:int(default:50)SemaphoreDelay:double(default:10)SemaphoreSpots:int(default:3)SLICEConcurrentSpots:int(default:999)SLICEConcurrentDelayMs:int(default:0)MulticastAutoDiscoveryReceiveTimeoutMS:int(default:1500)LocalKeepAliveRetryIntervalMS:uint(default:1000)LocalKeepAliveTimeOutMS:uint(default:5000)RemoteKeepAliveRetryIntervalSeconds:uint(default:5)RemoteKeepAliveSeconds:uint(default:60)ReceiveBufferSizeBytes:int(default:65536)SendBufferSizeBytes:int(default:65536)HeartbeatAsyncConnectTimeoutMS:int(default:10000)
File/Path Settings:
DownloadFolder:string(default:"..\\..\\Data")DefaultTDCSensorDatabaseFolder:string(default:"..\\SensorDatabase")DefaultTDCSensorDatabaseFile:string(default:"SensorDatabase.CSV")TDCSensorDatabaseImportEncoding:string(default:"Shift-JIS")
Other Settings:
SupportedSquibFireModes:string(default:"CAP,CONSTANT")RequireXCrashCompatibilityForISOExports:bool(default:true)DisplayDuplicateUDPStreamOutWarning:bool(default:true)UseTestChannelOrder:bool(default:false)ArmChecklistRequiredIfTOM:bool(default:true)TestsRequireLevelTriggers:bool(default:false)TDCSensorDatabaseExportUseCurrentLocale:bool(default:false)
DataFiles : BasePropertyChanged
Represents metadata for a test data file.
| Member | Signature | Description |
|---|---|---|
| Constructor | DataFiles(string expandCollapse, string testName, string id, string allOrROI, string lab, string customer, DateTime dateCreated, string description, string numberOfChannels, string testEngineer, bool isTSRAIR, string roiSuffix = "") |
Initializes all metadata fields. |
ExpandCollapse |
string |
UI state for expand/collapse. |
TestName |
string |
Name of the test. |
TestId |
string |
Unique test identifier. |
AllOrROI |
string |
Indicates "All" or "ROI" data type. |
Lab |
string |
Lab name. |
Customer |
string |
Customer name. |
DateCreated |
DateTime |
Creation timestamp. |
Description |
string |
Test description. |
NumberOfChannels |
string |
Channel count as string. |
TestEngineer |
string |
Test engineer name. |
ROISuffix |
string |
ROI suffix identifier. |
DTSFile |
string |
Location of DTS file (populated in export tab). |
IsTSRAIR |
bool |
Indicates TSR AIR test (default: false). |
TestSelected |
bool |
Selection state. |
LongString |
string |
Extended string representation. |
DataFilesList : BasePropertyChanged
Manages discovery and listing of test data files.
| Member | Signature | Description |
|---|---|---|
DataFileList |
static DataFilesList |
Singleton instance accessor. |
DataFiles |
DataFiles[] |
Gets or sets the list of data files. |
GetAllDataFiles() |
DataFiles[] |
Returns top-level test folders with file counts. |
GetAllFiles(string testName) |
DataFiles[] |
Returns all data files for a specific test name. |
Contract(DataFiles df) |
DataFiles[] |
Collapses expanded test entries in the list. |
DownloadFolder |
string |
Field storing the download folder path. |
ChannelRepresentation
Handles channel number conversion and display representation for various hardware types.
| Member | Signature | Description |
|---|---|---|
ChannelTypeEnum |
enum |
Values: SQUIB, TOMDigital, DigitalInput, Other. |
| Constructor | ChannelRepresentation(DASHardware h, DASChannel c, int startingChannelNumber) |
Creates representation from DAS hardware and channel. |
| Constructor | ChannelRepresentation(HardwareChannel c, int startingChannelNumber, IDASHardware[] hardwares = null) |
Creates representation from hardware channel. |
DASSerialNumber |
string |
Gets or sets the DAS serial number. |
SerialNumber |
string |
Gets or sets the module serial number. |
ChannelNumberString |
string |
Gets formatted channel display string (e.g., "CH01", "SQ02"). |
ChannelNumber |
int |
Gets the numeric channel number. |
DASFactory
Wrapper around DTS.DASLib.DASFactory.DASFactory for device discovery and management.
| Member | Signature | Description |
|---|---|---|
| Constructor | DASFactory() |
Initializes factory, semaphores, keep-alive settings, and event handlers. |
StartMulticastAutoDiscovery() |
void |
Starts auto-discovery process if not running. |
StopMulticastAutoDiscovery() |
void |
Stops auto-discovery process. |
GetDiscoveredDevices() |
IDiscoveredDevice[] |
Returns discovered devices. |
GetDASFactory() |
IDASFactory |
Returns the underlying DAS factory interface. |
TakeOwnership() |
void |
Takes ownership of devices. |
DetachAllDevices(bool detachUSB = false) |
void |
Detaches all devices; USB detaching is conditional. |
DisposeFactory() |
void |
Disposes the underlying factory. |
Refresh(bool wait) |
void |
Refreshes device list; optionally waits for completion. |
GetActiveDevices() |
List<IDASCommunication> |
Returns list of active DAS communications. |
GetReportedConnections() |
string[] |
Returns all reported connections from distributors. |
AutoDiscoverIfNecessary() |
void |
Runs auto-discovery for SLICE6/SLICE6Db downstream MAC addresses. |
AutoDiscoverMulticast() |
SortableBindingList<IDiscoveredDevice> |
Performs multicast auto-discovery. |
DiscoveryThread(...) |
void |
Background thread for continuous discovery with filtering. |
StartQATSListening() / StopQATSListening() |
void |
Controls QATS UDP listening. |
SendQATSRequest() |
void |
Sends UDP QATS request. |
GetQATS() |
IUDPQATSEntry[] |
Returns and clears waiting QATS entries. |
IsStreaming(IDASCommunication das) |
static bool |
Returns true if SLICE6 Air is streaming. |
IsInRealtime(IDASCommunication das) |
static bool |
Returns true if unit is in realtime or streaming. |
AnyInRealtime(List<IDASCommunication> das) |
static bool |
Returns true if any unit is in realtime or streaming. |
Properties:
TDASHostNames:string[]- TDAS host names with deduplication on set.SPFDHostNames:string[]- SPFD host names.SDBHostNames:string[]- Slice DB host names.MulticastAutoDiscoveryReceiveTimeoutMS:int- Timeout for multicast discovery.MulticastAutoDiscoveryAddress:string- Multicast address.MulticastAutoDiscoveryPort:int- Transmit port.MulticastAutoDiscoveryResponsePort:int- Receive port.S6ConnectNewTimeout:double- SLICE6 connection timeout.
Events:
OnDeviceArrived:DASFactoryEventHandler- Fired when a device arrives.OnFactoryChanged:DASFactoryEventHandler- Fired on device arrival, failure, or removal.DiscoveredDAS:DiscoveredDASEventHandler- Fired with discovered devices.
3. Invariants
-
ApplicationProperties Global State: All properties are static and globally accessible. Consumers must ensure
DASFactoryandIsoDbare initialized before use. -
DataFilesList Singleton: The
DataFileListproperty uses lazy initialization and always returns the same instance. -
DASFactory Refresh Concurrency: The
_bInRefreshflag guards against overlapping refresh calls. Only one refresh can execute at a time; overlapping calls are logged but do not execute. -
ChannelRepresentation Hardware Type Handling: The
ConvertChannelNumbersmethod must receive validHardwareTypesenum values. Unknown types fall through to a default case that uses the starting channel number directly. -
Data Folder Structure:
GetFoldersWithDataexpects folders containing both.dtsand.chnfiles to be considered valid data folders. -
SysBuiltObjectType ISO Lookup: The
TestObjectgetter callsApplicationProperties.IsoDb.GetTestObjectByIso()—IsoDbmust be initialized before accessing this property.
4. Dependencies
This module depends on:
DTS.Slice.Users- User typesDTS.Common.ISO- ISO 13499 database and test objects (ISO13499FileDb,MMETestObjects)DTS.Common.Licensing.Messages-ValidationResultDTS.Common.Base-BasePropertyChangedfor MVVM patternDTS.DASLib.DASFactory- Underlying DAS factory implementationDTS.DASLib.Service- Channel and communication typesDTS.Common.Utilities.Logging-APILoggerDTS.Common.Interface.DASFactory-IDASFactory,IDiscoveredDeviceDTS.Common.Interface.DataRecorders-IDASHardwareDTS.Common.Enums.Hardware-HardwareTypesDTS.Common.Enums.Sensors- Sensor enumsDTS.Common.Constant.DASSpecific-SensorConstants,DFConstantsAndEnumsDTS.Common.Converters-EnumDescriptionTypeConverterDTS.Common.SharedResource.Strings- Localized stringsDTS.Serialization- File reading utilitiesDTS.Common.Utils- Utility classesDTS.Common.DataModel.Classes.TestTemplate-TSRAIRGoTestSetupSystem.Windows.Media-ColortypeSystem.Xml.Linq- XML parsing
What depends on this module:
- Unclear from source alone — this appears to be a foundational module likely consumed by UI components, test management, and hardware configuration modules.
5. Gotchas
-
ApplicationProperties Static State: All properties are mutable static state with no thread-safety mechanisms. Concurrent access from multiple threads could cause race conditions.
-
SysBuiltObjectType Null Risk: The
TestObjectgetter callsApplicationProperties.IsoDb.GetTestObjectByIso()without null checks. IfIsoDbis null, this will throw. -
DASFactory Constructor Blocking: The constructor performs a synchronous
WaitOne()on aManualResetEventduring refresh, which could block the calling thread indefinitely if the refresh callback never fires. -
ChannelRepresentation Type Casting: The first constructor casts
ctoDAS.DASLib.Service.AnalogInputDASChannelwithout checking type first, which will throw for non-analog channels. -
DataFilesList.GetTestInfo Silent Failure: Returns
falseon any exception during XML parsing, logging the exception but not propagating the error. Callers may receive empty strings without knowing parsing failed. -
Hardcoded Strings:
TSRAIRGoTestSetup.TEST_NAMEis used for TSR AIR detection but the class definition is not in the provided source. -
Namespace Inconsistency:
ApplicationPropertiesis inDTS.Common.DataModelnamespace, whileCollectDataProcess,SysBuiltObjectType,DataFiles, andDASFactoryare inDataPROWin7.DataModelnamespace. -
Refresh Overlap Handling: When
Refreshis called while already refreshing, the second call is silently ignored (only logged ifLOG_DEBUG_REFRESHis defined). This could lead to stale device lists if callers expect refresh to