10 KiB
source_files, generated_at, model, schema_version, sha256
| source_files | generated_at | model | schema_version | sha256 | ||||
|---|---|---|---|---|---|---|---|---|
|
2026-04-17T15:39:09.615523+00:00 | zai-org/GLM-5-FP8 | 1 | 474439030090ef0a |
Documentation: DTS.Slice.Control.Event.Module
1. Purpose
This module provides the Event.Module class, which represents a data acquisition system (DAS) module within a Slice Control event. It serves as a container for channel configurations, timing information, sensor readings (tilt and temperature), and metadata about the recording hardware. The module also provides a set of reviewable attributes (ReviewableAttribute subclasses) that expose specific module properties in a standardized format for review/display purposes, and implements bidirectional conversion between runtime objects and serialization formats.
2. Public Interface
Event.Module Class
Namespace: DTS.Slice.Control
Inheritance: Exceptional, implements Serialization.Test.Module.IConvertable
Constructors
| Signature | Description |
|---|---|
Module() |
Default constructor. Initializes a new instance with empty channels list. |
Module(Event parentEvent) |
Initializes with a parent Event reference. |
Module(Serialization.Test.Module that, Event parent, Serialization.Test.ReportErrors reportErrors) |
Initializes from a serialization object, populating all properties from the source. |
Properties
| Property | Type | Description |
|---|---|---|
ParentEvent |
Event |
The parent Event containing this module. Has SetParentEvent(Event e) setter method. |
Channels |
List<Channel> |
List of channels on this event module. |
Number |
int |
Module number identifier. |
DasSerialNumber |
string |
DAS serial number string. |
Description |
string |
Module description. |
BaseSerialNumber |
string |
Base serial number for this DAS. |
RequestedPreTriggerSeconds |
double |
Requested pre-trigger duration in seconds. |
RequestedPostTriggerSeconds |
double |
Requested post-trigger duration in seconds. |
PreTriggerSeconds |
double |
Actual pre-trigger duration in seconds. |
PostTriggerSeconds |
double |
Actual post-trigger duration in seconds. |
NumberOfSamples |
UInt64 |
Number of samples in this module. |
UnsubsampledNumberOfSamples |
UInt64 |
Number of unsubsampled samples. |
TriggerSampleNumbers |
List<UInt64> |
Trigger sample numbers. |
UnsubsampledTriggerSampleNumbers |
List<UInt64> |
Unsubsampled trigger sample numbers. |
StartRecordSampleNumber |
UInt64 |
Start record sample number. |
SampleRateHz |
float |
Sample rate in Hz. |
StartRecordTimestampSec |
double |
Start record timestamp (seconds component). |
StartRecordTimestampNanoSec |
double |
Start record timestamp (nanoseconds component). |
TriggerTimestampSec |
double |
Trigger timestamp (seconds component). |
TriggerTimestampNanoSec |
double |
Trigger timestamp (nanoseconds component). |
PTPMasterSync |
bool |
Whether PTP master sync is used. |
TiltSensorAxisXDegreesPre / TiltSensorAxisYDegreesPre / TiltSensorAxisZDegreesPre |
double |
Pre-trigger tilt sensor axis values in degrees. |
TiltSensorAxisXDegreesPost / TiltSensorAxisYDegreesPost / TiltSensorAxisZDegreesPost |
double |
Post-trigger tilt sensor axis values in degrees. |
TemperatureLocation1Pre through TemperatureLocation4Pre |
float |
Pre-trigger temperature sensor values at 4 locations. |
TemperatureLocation1Post through TemperatureLocation4Post |
float |
Post-trigger temperature sensor values at 4 locations. |
AaFilterRateHz |
float |
Anti-aliasing filter rate in Hz. |
NominalExcitationVoltage |
Test.Module.Channel.Sensor.ExcitationVoltageOption |
Nominal excitation voltage (default: Volt5). |
RecordingMode |
Test.Module.RecordingMode |
Recording mode (default: CircularBuffer). |
Methods
| Signature | Description |
|---|---|
void SetPropertyValuesFrom(DASLib.Service.DASModule that) |
Copies trigger sample numbers, number of samples, and fault flags from a DASModule object. |
override bool Equals(object obj) |
Memberwise equality comparison of all major properties and child collections. |
override int GetHashCode() |
Returns base hash code. |
bool IsSlice6DBModule() |
Returns true if Description equals "slice6db module". |
Serialization.Test.Module ToDtsSerializationTestModule(Serialization.Test parentTest) |
Converts this object to a Serialization.Test.Module. Only includes channels where IsConfigured is true. |
void FromDtsSerializationTestModule(Serialization.Test.Module that, Serialization.Test.ReportErrors reportErrors) |
Populates this object from a Serialization.Test.Module. Creates channels via Channel.CreateChannel(). |
Event.Module.ReviewableAttribute Class
Inheritance: Slice.Control.ReviewableAttribute (abstract)
Constructors
| Signature | Description |
|---|---|
public ReviewableAttribute(Event.Module channel) |
Throws NotImplementedException wrapped in Module.ReviewableAttribute.Exception. Documented as "concrete class should implement this constructor." |
protected ReviewableAttribute(string name, DetermineValueString calculateValue) |
Protected constructor that passes name and value delegate to base class. |
Event.Module.ReviewableDasSerialNumberAttribute Class
Inheritance: Event.Module.ReviewableAttribute
| Constructor | Description |
|---|---|
public ReviewableDasSerialNumberAttribute(Event.Module module) |
Initializes with name "DAS Serial Number" and a delegate returning module.DasSerialNumber. |
Event.Module.ReviewableSampleRateAttribute Class
Inheritance: Event.Module.ReviewableAttribute
| Constructor | Description |
|---|---|
public ReviewableSampleRateAttribute(Event.Module module) |
Initializes with name "Sample Rate" and a delegate returning module.SampleRateHz.ToString("N"). |
Event.Module.ReviewableTestDescriptionAttribute Class
Inheritance: Event.Module.ReviewableAttribute
| Constructor | Description |
|---|---|
public ReviewableTestDescriptionAttribute(Event.Module module) |
Initializes with name "Test Description" and a delegate returning module.ParentEvent.Description. |
Event.Module.ReviewableHardwareFrequencyAttribute Class
Inheritance: Event.Module.ReviewableAttribute
| Constructor | Description |
|---|---|
public ReviewableHardwareFrequencyAttribute(Event.Module module) |
Initializes with name "HW AAF" and a delegate returning module.AaFilterRateHz.ToString("N2"). |
3. Invariants
-
Parent-Child Relationship: A
Modulemust have a validParentEventreference for operations that access parent properties (e.g.,ReviewableTestDescriptionAttributeaccessesmodule.ParentEvent.Description). -
Channel Filtering in Serialization:
ToDtsSerializationTestModule()only serializes channels whereIsConfiguredistrue. -
Channel Numbering: When populating from a serialization module, channels are assigned sequential absolute channel numbers starting from
ParentEvent.LastAbsoluteChannelNumberInEvent + 1. -
Equality Semantics:
Equals()performs memberwise comparison including all properties and child collections (Channels,TriggerSampleNumbers,UnsubsampledTriggerSampleNumbers). -
ReviewableAttribute Constructor Contract: The public constructor taking
Event.Moduleis explicitly designed to throw; subclasses must use the protected constructor with name and delegate.
4. Dependencies
This Module Depends On:
DTS.Common.DAS.ConceptsDTS.Serialization.StringResourcesDTS.Common.UtilitiesDTS.Common.Utilities.DotNetProgrammingConstructsDTS.Common.Utilities.Logging(forAPILogger)DTS.Utilities(referenced inReviewableDasSerialNumberAttribute.csandReviewableSampleRateAttribute.cs)System,System.Collections.Generic,System.Linq,System.DiagnosticsDASLib.Service.DASModule(external service type used inSetPropertyValuesFrom)Slice.Control.ReviewableAttribute(base class forEvent.Module.ReviewableAttribute)Slice.Control.Event(parent container class)Serialization.Test.Moduleand related serialization types
What Depends On This Module:
- Not explicitly shown in source, but
Channelclass is referenced extensively, implyingEvent.Module.Channelis a dependent nested class.
5. Gotchas
-
ReviewableAttribute Constructor Throws by Design: The public constructor
ReviewableAttribute(Event.Module channel)always throws aNotImplementedException. This appears to be intentional guard code, but the pattern is unusual—subclasses should call the protected constructor directly. -
Inappropriate Exception Handling: The
FromDtsSerializationTestModule()method uses try/catch blocks around individual property assignments (e.g.,StartRecordTimestampSec,TriggerTimestampSec, tilt sensor values, temperature values) with logging but no re-throw. This silently swallows errors and continues execution. Source contains TODO comments:"//TODO: inappropriate using try/catch!!!". -
Incorrect Log Message: In
FromDtsSerializationTestModule(), the catch block forTriggerTimestampNanoSeclogs"failed to get TriggerTimestampSec"instead of"failed to get TriggerTimestampNanoSec". -
Wrong Property Assignment: In
FromDtsSerializationTestModule(), the lineTriggerTimestampNanoSec = that.StartRecordTimestampNanoSecappears to copy from the wrong source property (should likely bethat.TriggerTimestampNanoSec). -
Commented-Out Initialization: In the default
Module()constructor, the call toInitializeReviewableAttributesis commented out. It is unclear if this is intentional or dead code. -
Exception Swallowing in SetPropertyValuesFrom: The method catches exceptions when reading
ParentEvent.FaultFlagsand silently ignores them with an empty catch block (catch (System.Exception) { }). -
Format String Inconsistency:
ReviewableSampleRateAttributeuses"N"format whileReviewableHardwareFrequencyAttributeuses"N2"format for numeric display.