4.3 KiB
4.3 KiB
source_files, generated_at, model, schema_version, sha256
| source_files | generated_at | model | schema_version | sha256 | ||
|---|---|---|---|---|---|---|
|
2026-04-17T16:26:22.110592+00:00 | zai-org/GLM-5-FP8 | 1 | 1596815b04ddd43d |
Graph
Purpose
This module defines the data structure for a TestSetup.Graph and its nested Channel objects. It serves as a serialization-compatible model for test configurations, wrapping properties in a custom Property construct (likely for change tracking or validation) and exposing metadata about test channels, hardware associations, and versioning. It acts as a bridge between raw test module definitions and serialized storage formats.
Public Interface
Class: TestSetup.Graph
Graph()- Constructor. InitializesNameto null,Versionto "1.0.0.0", and generates a newIdentifier.void UnSet()- No-op implementation in current source.List<Channel> Channels- Gets or sets the list of channels associated with this graph.string Name- Gets or sets the name of the graph.string HardwareChannelName- Gets or sets the hardware channel name.string DisplayName- Read-only. Returns_Name.Value + "_" + _HardwareChannelName.Value.string Version- Gets or sets the version string.bool IsSingleChannelGraph- (XmlIgnore) Returns true ifChannelsis not null and contains exactly one channel.Channel FirstChannel- (XmlIgnore) Returns the first channel in theChannelslist.Test.Module.Channel FirstTestChannel- (XmlIgnore) Returns theTestChannelproperty of the first channel in the list.Guid Identifier- (XmlIgnore) Gets a unique identifier for this graph instance; set privately by constructor.
Class: TestSetup.Graph.Channel
Channel(Test.Module.Channel channel)- Constructor. Initializes the channel from aTest.Module.Channelobject.Channel(string channelId)- Constructor. Initializes with a specific string ID; setsParentTestModuleandTestChannelto null.Channel(long groupChannelId)- Constructor. Initializes with a long ID converted to string; setsParentTestModuleandTestChannelto null.string ChannelId- Gets or sets the unique ID for the logical channel.string ChannelGroupName- Gets or sets the group name.string Name- Read-only. ReturnsTestChannel.ChannelDescriptionStringor "Not Set".string SensorName- (XmlIgnore) ReturnsTestChannel.ChannelDescriptionStringor "Not Set".string AxisUnit- (XmlIgnore) Returns engineering units ifTestChannelis anAnalogInputChannel, otherwise "EU".string SerialNumber- (XmlIgnore) ReturnsParentTestModule.SerialNumberor "Not Set".Test.Module ParentTestModule- (XmlIgnore) Field holding a reference to the parent test module.Test.Module.Channel TestChannel- (XmlIgnore) Field holding a reference to the underlying test channel.
Invariants
Graph.Identifieris immutable after construction (private setter).Graph.Versiondefaults to "1.0.0.0" upon instantiation.Channelhas a private parameterless constructor, enforcing that instances must be created via one of the public constructors providing data.Channel.Name,SensorName,AxisUnit, andSerialNumberall return "Not Set" (or "EU" for units) ifTestChannelis null.
Dependencies
- Depends on:
System,System.Collections.Generic,DTS.Common.Utilities,DTS.Common.Utilities.DotNetProgrammingConstructs,Test.Module(referenced inChannelconstructors and properties). - Dependents: Unknown from source alone, but likely serialization logic or test setup management components.
Gotchas
- Indexing Risks: The properties
FirstChannelandFirstTestChannelaccessChannels[0]directly without bounds checking. IfChannelsis null or empty, this will throw an exception. - DisplayName Format:
DisplayNameconcatenates values with an underscore. If_Name.Valueis null (the default), the result will start with an underscore (e.g.,_HardwareName). - Internal Property Wrappers: Public properties are backed by
Propertyobjects. The behavior of these wrappers (e.g., validation logic) is defined inDTS.Common.Utilities.DotNetProgrammingConstructsand is not visible here.