9.6 KiB
source_files, generated_at, model, schema_version, sha256
| source_files | generated_at | model | schema_version | sha256 | ||||
|---|---|---|---|---|---|---|---|---|
|
2026-04-16T03:41:14.998508+00:00 | Qwen/Qwen3-Coder-Next-FP8 | 1 | 5d62833ecdd15a59 |
Documentation: TestObject Serialization Model
1. Purpose
This module defines a set of strongly-typed, serializable data structures used to represent test setup metadata in the DTS (Dynamic Testing System) serialization framework. Specifically, it provides models for TestObject, DASHardware (Data Acquisition System hardware), and associated channel types (TOChannel, DASChannel). These classes encapsulate metadata about physical test objects (e.g., impact hammers, barriers), associated hardware (e.g., DAS units), and their channels (sensors), enabling structured storage, retrieval, and exchange of test configuration data. The classes are designed to support versioning, naming, and descriptive properties while leveraging a custom Property<T> wrapper for internal state management.
2. Public Interface
All classes are partial and nested inside DTS.Serialization.TestSetup.TestObject. They inherit from Exceptional (not shown, but assumed to provide exception-handling or logging infrastructure).
TestObject Class
-
TestObject()
Default constructor initializing all properties tonull(exceptVersion, initialized to"1.0.0.0"and list properties to empty lists). -
string NameOfTestObject { get; set; }
Human-readable name of the test object (e.g.,"Hammer A"). -
string SerialNumber { get; set; }
Manufacturer’s serial number of the test object. -
string CodeOfTestObject { get; set; }
Internal or standardized code identifying the test object type. -
string ClassOfTestObject { get; set; }
Classification of the test object (e.g.,"Hammer","Barrier"). -
string Location { get; set; }
Physical or logical location of the test object. -
string Version { get; set; }
Version string of the test object definition (default:"1.0.0.0"). -
List<TOChannel> Channels { get; set; }
List ofTOChannelinstances associated with this test object. -
List<DASHardware> DASHardwares { get; set; }
List ofDASHardwareinstances linked to this test object. -
string BarrierHeight { get; set; }
Height of a barrier test object (if applicable). -
string BarrierWidth { get; set; }
Width of a barrier test object. -
string ImpactSideTestObject { get; set; }
Side of the test object used for impact (e.g.,"Top","Bottom"). -
string DriverPositionObject { get; set; }
Position of the driver relative to the test object. -
string MassOfTestObject { get; set; }
Mass of the test object (string representation, e.g.,"5.2 kg"). -
string Velocity { get; set; }
Velocity associated with the test object (e.g., impact velocity). -
string VelocityMeasurementUnit { get; set; }
Unit of measurement forVelocity(e.g.,"m/s"). -
string Offset { get; set; }
Offset value (e.g., zero offset in measurement). -
string OriginX/Y/Z { get; set; }
3D coordinate origin (string values, likely in meters). -
string ReferenceSystem { get; set; }
Coordinate reference system (e.g.,"WGS84","Local"). -
string RefNumberOfTestObject { get; set; }
Reference number or ID assigned to the test object. -
string NumberOfLoadCells { get; set; }
Number of load cells used in the test. -
string TargetSampleRate { get; set; }
Desired sample rate for data acquisition. -
string ExcitationWarmupMS { get; set; }
Warm-up time before excitation (in milliseconds). -
string Comment1/2/3 { get; set; }
Free-text comment fields. -
string YawAngle { get; set; }
Angular orientation (e.g., yaw in degrees). -
List<ExtraProperty> ExtraProperties { get; set; }
List of arbitrary key-value metadata (typeExtraPropertynot defined here; assumed to be defined elsewhere).
Note
: The
TypeOfTestObjectproperty is commented out and not part of the public interface.
TOChannel Class
-
TOChannel()
Default constructor initializing_versionto"1.0.0.0"; other fields tonull. -
string Name { get; set; }
Name of the channel (e.g.,"Channel_1"). -
string SensorName { get; set; }
Name of the sensor associated with this channel. -
string Version { get; set; }
Version of the channel definition (default:"1.0.0.0").
DASHardware Class
-
DASHardware()
Default constructor initializing_versionto"1.0.0.0"; other fields tonull. -
List<DASChannel> DASChannels { get; set; }
List ofDASChannelinstances attached to this DAS hardware. -
string SampleRate { get; set; }
Sample rate configured for this DAS hardware (e.g.,"2000 Hz"). -
string SerialNumber { get; set; }
Serial number of the DAS hardware unit. -
string Version { get; set; }
Version of the DAS hardware definition (default:"1.0.0.0").
DASHardware.DASChannel Class
-
DASChannel()
Default constructor initializing_versionto"1.0.0.0"; other fields tonull. -
string Name { get; set; }
Name of the DAS channel (e.g.,"DAS_Ch1"). -
string SensorName { get; set; }
Name of the physical sensor connected to this channel. -
string SerialNumber { get; set; }
Serial number of the sensor. -
string Location { get; set; }
Physical location of the sensor (e.g.,"Top Flange"). -
string MeasurementUnits { get; set; }
Units of measurement for this channel (e.g.,"g","V"). -
string NumberOfSamples { get; set; }
Number of samples recorded on this channel. -
string Version { get; set; }
Version of the DAS channel definition (default:"1.0.0.0").
3. Invariants
- Default
Version: All classes (TestObject,TOChannel,DASHardware,DASChannel) initialize theirVersionproperty to"1.0.0.0"in the constructor. This is the only guaranteed non-null default value. - List Properties: All list properties (
Channels,DASHardwares,DASChannels,ExtraProperties) are initialized to empty lists (new List<T>()) in their respectiveProperty<T>declarations. They are nevernullunless explicitly set tonullvia setter. - String Properties: All string properties are backed by
Property<string>initialized with non-null default values (empty string""). However, the constructor sets them tonullbefore theProperty<T>default is applied, meaning:- Immediately after construction, all string properties are
null. - The
Property<T>default ("") is only used if the property is never explicitly set.
- Immediately after construction, all string properties are
- Namespace-based Property Keys: Each
Property<T>instance uses a key derived fromtypeof(...).Namespace + "." + [ClassName].[PropertyName]. This implies a strict naming convention for property metadata, but the key itself is internal and not exposed via the public API.
4. Dependencies
- Internal Dependencies:
DTS.Common.UtilitiesandDTS.Common.Utilities.DotNetProgrammingConstructsnamespaces (likely containing theExceptionalbase class andProperty<T>implementation).System.Collections.GenericforList<T>usage.
- External Dependencies:
ExtraProperty(used inTestObject.ExtraProperties) is referenced but not defined in the provided files. Its definition must exist elsewhere in the codebase.DASHardware.DASChannelis defined in a separate file (DASHardware.DASChannel.cs) usingpartialclass extension, indicating a split implementation (likely for maintainability or code generation).
- Dependents:
- This module is part of
DTS.Serialization, implying usage by serialization/deserialization logic (e.g., XML/JSON converters, test setup loaders) not included here.
- This module is part of
5. Gotchas
- String vs. Typed Values: All properties are
string-typed, even for numeric or structured data (e.g.,SampleRate,OriginX,MassOfTestObject). Consumers must parse or interpret these values themselves. No validation or type conversion is performed by the model. - Null vs. Empty String: While
Property<T>defaults to"", the constructor explicitly sets all string fields tonull. This means:- A newly constructed object has
nullfor all string properties. - An unset property remains
null(not""), which may differ from expectations based on theProperty<T>default.
- A newly constructed object has
- No Validation: No setters enforce constraints (e.g.,
Versionformat, non-emptyName). Validation must be handled externally. - Partial Class Fragmentation:
DASHardwareandDASChannelare split across files (DASHardware.csandDASHardware.DASChannel.cs). Developers must be aware of both files to see the full class definition. - Commented-Out Property:
TypeOfTestObjectis commented out inTestObject.cs. Its absence may indicate legacy or deprecated functionality; do not rely on it. - Ambiguous Units: Properties like
VelocityMeasurementUnitandMeasurementUnitsrely on string values without enforced unit standards (e.g., SI vs. imperial), risking misinterpretation without external documentation. - No Invariants Enforced on Lists: While lists are initialized, there is no protection against adding
nullelements (e.g.,testObject.Channels.Add(null)is allowed).