init
This commit is contained in:
@@ -0,0 +1,153 @@
|
||||
---
|
||||
source_files:
|
||||
- Common/DTS.CommonCore/Interface/Groups/GroupChannelList/IGroupChannelListView.cs
|
||||
- Common/DTS.CommonCore/Interface/Groups/GroupChannelList/IGroupChannelSettingsListView.cs
|
||||
- Common/DTS.CommonCore/Interface/Groups/GroupChannelList/IGroupChannelListViewModel.cs
|
||||
generated_at: "2026-04-16T12:21:49.528154+00:00"
|
||||
model: "zai-org/GLM-5-FP8"
|
||||
schema_version: 1
|
||||
sha256: "b48152996c8c8c44"
|
||||
---
|
||||
|
||||
# Documentation: Group Channel List Interfaces
|
||||
|
||||
## 1. Purpose
|
||||
|
||||
This module defines the contract for the Group Channel List feature using a Model-View-ViewModel (MVVM) pattern. It provides three interfaces—`IGroupChannelListView`, `IGroupChannelSettingsListView`, and `IGroupChannelListViewModel`—that govern the display, filtering, sorting, and manipulation of channel data within groups and test setups. The module serves as the abstraction layer between the UI layer and the business logic for managing sensor channels, their configurations, and their presentation modes.
|
||||
|
||||
---
|
||||
|
||||
## 2. Public Interface
|
||||
|
||||
### IGroupChannelListView
|
||||
**Inherits from:** `IBaseView`
|
||||
|
||||
| Member | Signature | Description |
|
||||
|--------|-----------|-------------|
|
||||
| `HandleColumns` | `void HandleColumns(IsoViewMode viewMode)` | Configures which columns are displayed based on the provided ISO view mode. |
|
||||
|
||||
---
|
||||
|
||||
### IGroupChannelSettingsListView
|
||||
**Inherits from:** `IBaseView`
|
||||
|
||||
| Member | Signature | Description |
|
||||
|--------|-----------|-------------|
|
||||
| `SetOrderMode` | `void SetOrderMode(bool bUseTestSetupOrder)` | Sets whether columns should reflect group order or test setup order. |
|
||||
| `SetDisplayOptions` | `void SetDisplayOptions(bool bShowSensorChannelUserValues)` | Controls visibility of User Value X columns. |
|
||||
| `HandleColumns` | `void HandleColumns(IsoViewMode viewMode)` | Sets which columns to display based on an ISO view mode. |
|
||||
| `SetFilterMode` | `void SetFilterMode(PossibleFilters filterMode)` | Sets which columns to display based on a sensor type filter. |
|
||||
| `ViewDbVersion` | `int ViewDbVersion { get; set; }` | Stores the minimum client database version associated with view data; used to hide or disable properties/features. |
|
||||
|
||||
---
|
||||
|
||||
### IGroupChannelListViewModel
|
||||
**Inherits from:** `IBaseViewModel`, `IFilterableListView`
|
||||
|
||||
#### Properties
|
||||
|
||||
| Property | Type | Description |
|
||||
|----------|------|-------------|
|
||||
| `View` | `IGroupChannelListView` | The associated main view. |
|
||||
| `SettingsView` | `IGroupChannelSettingsListView` | The associated settings view. |
|
||||
| `CreateVoltageInputChannels` | `bool` | Controls whether voltage insertion channels are created when dragging an analog hardware channel onto a blank channel with no sensor set. |
|
||||
| `CapacityFormat` | `string` | Format string for double values (typically "N2"). |
|
||||
| `AllChannels` | `List<Channels.IGroupChannel>` | All available channels prior to filtering/searching/sorting. |
|
||||
| `ChannelCodesFunc` | `Func<IList<IChannelCode>>` | Function returning available channel codes. |
|
||||
| `Channels` | `ObservableCollection<Channels.IGroupChannel>` | Channels displayed in the channel list view. |
|
||||
| `SettingChannels` | `ObservableCollection<Channels.IGroupChannel>` | Channels displayed in settings view; snapshot from `OnSetActive` with blank channels removed. |
|
||||
| `SettingsViewLoaded` | `bool` | Indicates whether the attached `SettingsView` has loaded. |
|
||||
| `SettingChannelsLoaded` | `bool` | Indicates whether `SettingChannel` UI elements were created. |
|
||||
| `Group` | `IGroup` | The group being viewed (when editing a group). |
|
||||
| `TestSetup` | `ITestSetup` | The test setup being viewed (when editing a test setup). |
|
||||
| `UseISOCodeFilterMapping` | `bool` | Whether to always match the CFC to the ISO code and vice versa. |
|
||||
| `ShowISOCodes` | `bool` | Indicates whether to show ISO codes. |
|
||||
| `ShowUserCodes` | `bool` | Indicates whether to show user codes. |
|
||||
| `ShowDallasIdColumn` | `bool` | Indicates whether to show Dallas ID column. |
|
||||
| `ISOViewMode` | `IsoViewMode` | Gets/sets the ISO view mode. |
|
||||
| `ShowISOStringBuilder` | `bool` | Controls visibility of ISO string builder. |
|
||||
| `UniqueISOCodesRequired` | `bool` | Gets/sets whether complete and unique ISO codes are required. |
|
||||
| `ShowChannelCodeLookupHelper` | `bool` | Controls visibility of channel code lookup helper. |
|
||||
| `UseTestSetupOrder` | `bool` | Indicates whether test setup order is being used. |
|
||||
| `ShowSensorChannelUserValues` | `bool` | Controls visibility of sensor channel user values. |
|
||||
| `ApplySensorDataToBlankChannels` | `bool` | Modifies how meta data is handled when sensors are dragged onto channels without sensors. |
|
||||
| `AllowChannelDeletionByNonAdminUser` | `bool` | Controls whether non-admin users can delete channels. |
|
||||
| `UserIsAdmin` | `bool` | Indicates whether the current user is an admin. |
|
||||
| `AllowSensorPushAndPull` | `bool` | Controls sensor push/pull functionality. |
|
||||
| `ReadOnlyParametersMode` | `bool` | Enables read-only mode for parameters. |
|
||||
| `ReadOnlyChannelsMode` | `bool` | Enables read-only mode for channels. |
|
||||
| `UserID` | `int` | The current user ID. |
|
||||
|
||||
#### Methods
|
||||
|
||||
| Method | Signature | Description |
|
||||
|--------|-----------|-------------|
|
||||
| `PopulateChannels` | `IDictionary<IGroup, Channels.IGroupChannel[]> PopulateChannels(object page, IDictionary<int, ISensorData> sensorLookup, IDictionary<int, IDASHardware> hardwareLookup, IChannelSetting[] channelDefaults, bool allowChannelDeletionByNonAdminUser = true, bool userIsAdmin = true, bool allowSensorPushAndPull = false, bool keepExistingChannels = false, bool allowChannelDeletionFromFixedGroup = true)` | Populates channels to be displayed in views. Returns a dictionary mapping groups to their channels. |
|
||||
| `CompareAndMarkChannelParameters` | `bool CompareAndMarkChannelParameters(Channels.IGroupChannel ch)` | Checks if any modifiable channel parameter values differ from the sensor database values; used for decoration in the Parameters step. |
|
||||
| `OnSetActive` | `void OnSetActive()` | Called when a view is loaded. |
|
||||
| `Unset` | `void Unset()` | Called when a view is unloaded. |
|
||||
| `Filter` | `void Filter(string term)` | Filters content by a string search term. |
|
||||
| `Filter` | `void Filter(PossibleFilters filter)` | Filters channels by sensor type. |
|
||||
| `SetFilter` | `void SetFilter(PossibleFilters bridgeFilter)` | Sets which channel types are displayed by sensor type. |
|
||||
| `MoveDown` | `void MoveDown(Channels.IGroupChannel[] channel)` | Moves the specified channels down in the list. |
|
||||
| `MoveBottom` | `void MoveBottom(Channels.IGroupChannel[] channel)` | Moves the specified channels to the bottom of the list. |
|
||||
| `MoveUp` | `void MoveUp(Channels.IGroupChannel[] channel)` | Moves the specified channels up in the list. |
|
||||
| `MoveTop` | `void MoveTop(Channels.IGroupChannel[] channel)` | Moves the specified channels to the top of the list. |
|
||||
| `AddChannels` | `void AddChannels(DTS.Common.Interface.Sensors.SensorsList.IDragAndDropItem[] sensors)` | Adds channels from drag-and-drop sensor items. |
|
||||
| `AddChannels` | `void AddChannels(IHardwareChannel[] hardwareChannels)` | Adds channels from hardware channels. |
|
||||
| `AddChannels` | `void AddChannels(Channels.IGroupChannel[] groupChannels)` | Adds existing group channels. |
|
||||
| `Remove` | `void Remove(Channels.IGroupChannel channel, bool notifyChanged = true)` | Removes a channel from the list. |
|
||||
| `CreateGroupIfNeeded` | `IGroup CreateGroupIfNeeded(ITestSetup testSetup, string groupName)` | Creates a group if one does not already exist. |
|
||||
| `SetIncludedHardware` | `void SetIncludedHardware(IDASHardware[] hardwares)` | Sets included hardware; used to count channels for the view label. |
|
||||
| `SetRange` | `void SetRange(CACOption option)` | Sets the range of all analog sensors according to the input option. |
|
||||
| `Sort` | `void Sort(object columnTag, bool bUserClick)` | Sorts the view by the specified column. |
|
||||
|
||||
---
|
||||
|
||||
## 3. Invariants
|
||||
|
||||
- `IGroupChannelListView` and `IGroupChannelSettingsListView` must always inherit from `IBaseView`.
|
||||
- `IGroupChannelListViewModel` must always inherit from both `IBaseViewModel` and `IFilterableListView`.
|
||||
- `Channels` and `SettingChannels` must be of type `ObservableCollection<Channels.IGroupChannel>` to support UI binding.
|
||||
- `SettingChannels` is a snapshot of `Channels` taken during `OnSetActive` with blank channels removed; it does not automatically update when `Channels` changes.
|
||||
- `ViewDbVersion` on `IGroupChannelSettingsListView` must be set to the minimum client database version to ensure proper feature availability.
|
||||
- The `PopulateChannels` method requires valid lookups (`sensorLookup`, `hardwareLookup`) to properly populate channel data.
|
||||
|
||||
---
|
||||
|
||||
## 4. Dependencies
|
||||
|
||||
### This module depends on:
|
||||
- `DTS.Common.Base` (`IBaseView`, `IBaseViewModel`)
|
||||
- `DTS.Common.Enums` (`IsoViewMode`, `CACOption`)
|
||||
- `DTS.Common.Enums.Sensors` (`PossibleFilters`)
|
||||
- `DTS.Common.Enums.Sensors.SensorsList` (used in `IDragAndDropItem`)
|
||||
- `DTS.Common.Interface.Channels` (`IGroupChannel`, `IHardwareChannel`)
|
||||
- `DTS.Common.Interface.Channels.ChannelCodes` (`IChannelCode`)
|
||||
- `DTS.Common.Interface.DataRecorders` (`IDASHardware`)
|
||||
- `DTS.Common.Interface.Groups.GroupList` (`IGroup`)
|
||||
- `DTS.Common.Interface.Pagination` (`IFilterableListView`)
|
||||
- `DTS.Common.Interface.Sensors` (`ISensorData`, `IChannelSetting`)
|
||||
- `DTS.Common.Interface.Sensors.SensorsList` (`IDragAndDropItem`)
|
||||
- `DTS.Common.Interface.TestSetups.TestSetupsList` (`ITestSetup`)
|
||||
- `System.Collections.Generic`
|
||||
- `System.Collections.ObjectModel`
|
||||
|
||||
### What depends on this module:
|
||||
- Not determinable from the provided source files alone.
|
||||
|
||||
---
|
||||
|
||||
## 5. Gotchas
|
||||
|
||||
1. **Two separate channel collections:** `Channels` and `SettingChannels` are both `ObservableCollection<Channels.IGroupChannel>`, but `SettingChannels` is a snapshot taken during `OnSetActive` with blank channels removed. Changes to one do not automatically reflect in the other.
|
||||
|
||||
2. **Multiple `AddChannels` overloads:** There are three overloads of `AddChannels` accepting different types (`IDragAndDropItem[]`, `IHardwareChannel[]`, `IGroupChannel[]`). Ensure the correct overload is called for the source data type.
|
||||
|
||||
3. **Two `Filter` overloads with different semantics:** `Filter(string term)` performs text-based filtering, while `Filter(PossibleFilters filter)` performs sensor-type-based filtering. These are distinct operations.
|
||||
|
||||
4. **`CreateVoltageInputChannels` behavior:** This property controls automatic creation of voltage insertion channels when dragging an analog hardware channel onto a blank channel. This behavior may be unexpected if not explicitly configured.
|
||||
|
||||
5. **`CompareAndMarkChannelParameters` side effects:** This method not only compares values but also "marks" them (presumably for UI decoration). It should be called when channel parameter modifications need to be highlighted.
|
||||
|
||||
6. **`Remove` method notification parameter:** The `Remove` method has a `notifyChanged` parameter defaulting to `true`. Setting this to `false` may suppress necessary UI updates.
|
||||
@@ -0,0 +1,240 @@
|
||||
---
|
||||
source_files:
|
||||
- Common/DTS.CommonCore/Interface/Groups/GroupList/IGroupListView.cs
|
||||
- Common/DTS.CommonCore/Interface/Groups/GroupList/TestSetupParentHelper.cs
|
||||
- Common/DTS.CommonCore/Interface/Groups/GroupList/IGroupListViewModel.cs
|
||||
- Common/DTS.CommonCore/Interface/Groups/GroupList/IGroup.cs
|
||||
generated_at: "2026-04-16T12:22:13.797964+00:00"
|
||||
model: "zai-org/GLM-5-FP8"
|
||||
schema_version: 1
|
||||
sha256: "a5d3249cf1dc850d"
|
||||
---
|
||||
|
||||
# Documentation: DTS.Common.Interface.Groups.GroupList
|
||||
|
||||
## 1. Purpose
|
||||
|
||||
This module defines the core interfaces and a helper class for managing Groups within the DTS system. Groups appear to be configurable entities that associate hardware, channels, sensors, and test setups together. The module provides the view-model contract (`IGroupListViewModel`), the view contract (`IGroupListView`), the domain entity interface (`IGroup`), and a helper class (`TestSetupParentHelper`) for tracking test setup associations. This abstraction layer enables separation between the UI layer and business logic for group management operations including creation, deletion, filtering, sorting, and XML serialization.
|
||||
|
||||
---
|
||||
|
||||
## 2. Public Interface
|
||||
|
||||
### `IGroupListView`
|
||||
**File:** `IGroupListView.cs`
|
||||
**Namespace:** `DTS.Common.Interface.Groups.GroupTemplateList`
|
||||
|
||||
```csharp
|
||||
public interface IGroupListView : IBaseView { }
|
||||
```
|
||||
|
||||
A marker interface extending `IBaseView`. No members are defined; it serves as a contract identifier for views that display group lists.
|
||||
|
||||
---
|
||||
|
||||
### `TestSetupParentHelper`
|
||||
**File:** `TestSetupParentHelper.cs`
|
||||
**Namespace:** `DTS.Common.Interface.Groups.GroupList`
|
||||
|
||||
```csharp
|
||||
public class TestSetupParentHelper
|
||||
{
|
||||
public int Id;
|
||||
public string Name { get; set; }
|
||||
public bool Modified { get; set; }
|
||||
public override string ToString()
|
||||
}
|
||||
```
|
||||
|
||||
A POCO class used to represent associated test setups within a group.
|
||||
|
||||
| Member | Type | Description |
|
||||
|--------|------|-------------|
|
||||
| `Id` | `int` (public field) | Identifier for the test setup |
|
||||
| `Name` | `string` | Display name of the test setup |
|
||||
| `Modified` | `bool` | Flag indicating whether the test setup has been modified |
|
||||
| `ToString()` | `string` | Returns the `Name` property |
|
||||
|
||||
---
|
||||
|
||||
### `IGroupListViewModel`
|
||||
**File:** `IGroupListViewModel.cs`
|
||||
**Namespace:** `DTS.Common.Interface.Groups.GroupList`
|
||||
|
||||
```csharp
|
||||
public interface IGroupListViewModel : IBaseViewModel, IFilterableListView
|
||||
```
|
||||
|
||||
Defines the contract for a view model that manages a list of groups.
|
||||
|
||||
#### Properties
|
||||
|
||||
| Signature | Description |
|
||||
|-----------|-------------|
|
||||
| `IGroupListView View { get; set; }` | Gets or sets the associated view |
|
||||
| `IGroup[] Groups { get; set; }` | Gets or sets the array of groups |
|
||||
|
||||
#### Methods
|
||||
|
||||
| Signature | Description |
|
||||
|-----------|-------------|
|
||||
| `void Unset()` | Purpose unclear from source alone |
|
||||
| `void Sort(object o, bool columnClick)` | Sorts the group list; parameters' specific meanings unclear from source |
|
||||
| `void OnSetActive(object page, bool groupTile, object currentUser)` | Called when the view becomes active; parameter purposes unclear from source |
|
||||
| `void MouseDoubleClick(int index)` | Handles mouse double-click on a group at the specified index |
|
||||
| `void Filter(string term)` | Filters the group list by the given search term |
|
||||
| `IGroup GetGroup(int? id, bool updateTags = true)` | Retrieves a group by ID; optionally updates tags |
|
||||
| `IGroup GetGroup(string displayName)` | Retrieves a group by display name |
|
||||
| `IGroup[] GetGroups(int[] ids)` | Retrieves multiple groups by an array of IDs |
|
||||
| `IGroup[] GetAllGroups()` | Retrieves all groups |
|
||||
| `void DeleteGroups(int[] ids)` | Deletes groups specified by the array of IDs |
|
||||
| `IGroup CreateGroup()` | Creates a new group with default parameters |
|
||||
| `IGroup CreateGroup(List<string> includedHardwareStringList)` | Creates a new group with specified hardware string identifiers |
|
||||
| `IGroup CreateGroup(SqlDataReader reader, List<string> includedHardwareStringList, List<int> dasIdList)` | Creates a group from a database reader |
|
||||
| `IGroup CreateGroup(IGroupDbRecord groupRecord, List<string> includedHardwareStringList, List<int> dasIdList)` | Creates a group from a database record |
|
||||
|
||||
---
|
||||
|
||||
### `IGroup`
|
||||
**File:** `IGroup.cs`
|
||||
**Namespace:** `DTS.Common.Interface.Groups.GroupList`
|
||||
|
||||
```csharp
|
||||
public interface IGroup : IComparable<IGroup>
|
||||
```
|
||||
|
||||
Defines the contract for a Group entity, supporting comparison, hardware/channel management, XML serialization, and test setup associations.
|
||||
|
||||
#### Identity & Metadata Properties
|
||||
|
||||
| Signature | Description |
|
||||
|-----------|-------------|
|
||||
| `int Id { get; set; }` | Unique identifier for the group |
|
||||
| `string Name { get; set; }` | Internal name of the group |
|
||||
| `string DisplayName { get; set; }` | User-facing display name |
|
||||
| `int? StaticGroupId { get; set; }` | Optional reference to a static group |
|
||||
| `string Description { get; set; }` | Group description |
|
||||
| `bool Embedded { get; set; }` | Indicates if the group is embedded |
|
||||
| `DateTime LastModified { get; set; }` | Timestamp of last modification |
|
||||
| `string LastModifiedBy { get; set; }` | User who last modified the group |
|
||||
| `int DisplayOrder { get; set; }` | Order in which the group appears in lists |
|
||||
|
||||
#### Hardware Properties
|
||||
|
||||
| Signature | Description |
|
||||
|-----------|-------------|
|
||||
| `int[] IncludedHardware { get; set; }` | Array of hardware IDs included in the group |
|
||||
| `string[] IncludedHardwareStringList { get; set; }` | Legacy hardware identifiers using old SerialNumber_type scheme (primarily for import) |
|
||||
| `int ChannelCount { get; set; }` | Number of channels in the group |
|
||||
|
||||
#### Position & Test Object Properties
|
||||
|
||||
| Signature | Description |
|
||||
|-----------|-------------|
|
||||
| `bool PositionIsMixed { get; set; }` | Indicates if position values are mixed across channels |
|
||||
| `bool PositionIsTextbox { get; set; }` | Indicates if position is represented as a textbox |
|
||||
| `bool PositionIsCombobox { get; set; }` | Indicates if position is represented as a combobox |
|
||||
| `string Position { get; set; }` | Position value |
|
||||
| `bool TestObjectIsMixed { get; set; }` | Indicates if test object values are mixed across channels |
|
||||
| `string TestObject { get; set; }` | Test object value |
|
||||
| `List<string> AvailableTestObjects { get; set; }` | List of available test object options |
|
||||
| `string SelectedTestObjectItem { get; set; }` | Currently selected test object item |
|
||||
| `List<string> AvailablePositions { get; set; }` | List of available position options |
|
||||
| `string SelectedPositionItem { get; set; }` | Currently selected position item |
|
||||
|
||||
#### Channel & Sensor Methods
|
||||
|
||||
| Signature | Description |
|
||||
|-----------|-------------|
|
||||
| `List<IGroupChannel> GroupChannelList { get; set; }` | List of channels associated with the group |
|
||||
| `bool Save(IGroupChannel[] groupChannels, bool canUserCommitChannelCodes)` | Saves the group with the specified channels |
|
||||
| `void ClearGroupChannelSettingCache(long groupId)` | Clears cached channel settings for the group |
|
||||
| `IGroupChannel[] GetAllChannels(bool bEditable, IDictionary<int, ISensorData> sensorLookup, IDictionary<int, IDASHardware> hardwareLookup, IChannelSetting[] channelDefaults, bool allowSensorPushAndPull = false)` | Retrieves all channels with lookups for sensors and hardware |
|
||||
| `void LoadHardware()` | Loads hardware for the group |
|
||||
| `void ConvertToEmbedded(IGroupChannel[] groupChannels)` | Converts the group to embedded using the specified channels |
|
||||
| `void DeterminePositionAndTestObject(IGroupChannel[] channels)` | Determines position and test object from channels |
|
||||
| `ISensorData GetSensor(IGroupChannel channel, ISensorData sensorData, bool bUseIsoFilter)` | Retrieves sensor data for a channel |
|
||||
| `void SetSensor(IGroupChannel channel, ISensorData sensorData)` | Sets sensor data for a channel |
|
||||
|
||||
#### XML Serialization Methods
|
||||
|
||||
| Signature | Description |
|
||||
|-----------|-------------|
|
||||
| `void WriteXML(ref XmlWriter writer)` | Writes the group to XML |
|
||||
| `IGroup ReadXML(XmlElement node, Dictionary<long, IGroupChannel> channelLookup, List<ISensorData> sensors)` | Reads group from XML; returns the group instance |
|
||||
|
||||
#### Test Setup & Tag Methods
|
||||
|
||||
| Signature | Description |
|
||||
|-----------|-------------|
|
||||
| `List<TestSetupParentHelper> AssociatedTestSetups { get; set; }` | List of associated test setups |
|
||||
| `void SetTestSetupLists()` | Populates the associated test setups list |
|
||||
| `bool StaticGroupIsEqual()` | Compares group to its static counterpart |
|
||||
| `bool IsDifferentThanStaticGroup { get; set; }` | Indicates if group differs from its static version |
|
||||
| `bool TagCompatible(int[] tags)` | Checks if the group is compatible with the given tags |
|
||||
| `int[] TagIDs { get; set; }` | Array of tag IDs associated with the group |
|
||||
| `string GetTagsAsCommaSeparatedString(TagsGetDelegate tagsGet)` | Gets tags as a comma-separated string using the provided delegate |
|
||||
| `string Tags { get; set; }` | Tags as a string |
|
||||
|
||||
#### Other Methods
|
||||
|
||||
| Signature | Description |
|
||||
|-----------|-------------|
|
||||
| `bool Filter(string term)` | Returns true if the group matches the search term |
|
||||
| `void SetIncludedHardware(int[] hardware)` | Sets included hardware and updates internal loaded state |
|
||||
| `IGroupDbRecord GetIGroupDbRecord()` | Retrieves the database record representation of the group |
|
||||
|
||||
---
|
||||
|
||||
## 3. Invariants
|
||||
|
||||
1. **Comparability**: All `IGroup` implementations must support comparison via `IComparable<IGroup>` for sorting operations.
|
||||
|
||||
2. **Hardware Dual Representation**: Groups maintain hardware references in two forms:
|
||||
- `IncludedHardware` as `int[]` (current scheme)
|
||||
- `IncludedHardwareStringList` as `string[]` (legacy SerialNumber_type scheme)
|
||||
|
||||
3. **Position/Test Object State Exclusivity**: The properties `PositionIsMixed`, `PositionIsTextbox`, and `PositionIsCombobox` appear to represent mutually exclusive states, though this is not explicitly enforced in the interface.
|
||||
|
||||
4. **Static Group Relationship**: When `StaticGroupId` is set, the group has a relationship with a static group that can be compared via `StaticGroupIsEqual()`.
|
||||
|
||||
5. **Channel Setting Cache**: Channel settings may be cached and must be explicitly cleared via `ClearGroupChannelSettingCache()` when needed.
|
||||
|
||||
---
|
||||
|
||||
## 4. Dependencies
|
||||
|
||||
### This module depends on:
|
||||
|
||||
| Dependency | Usage |
|
||||
|------------|-------|
|
||||
| `DTS.Common.Base` | Provides `IBaseView`, `IBaseViewModel` base interfaces |
|
||||
| `DTS.Common.Interface.Pagination` | Provides `IFilterableListView` for filtering capability |
|
||||
| `DTS.Common.Interface.Channels` | Provides `IGroupChannel`, `IChannelSetting` for channel management |
|
||||
| `DTS.Common.Interface.DataRecorders` | Provides `IDASHardware` for hardware lookups |
|
||||
| `DTS.Common.Interface.Sensors` | Provides `ISensorData` for sensor data operations |
|
||||
| `DTS.Common.Interface.TestSetups.TestSetupsList` | Referenced in comments; relationship unclear from source |
|
||||
| `System.Collections.Generic` | For `List<T>`, `IDictionary<TKey, TValue>` |
|
||||
| `System.Data.SqlClient` | For `SqlDataReader` used in `CreateGroup` |
|
||||
| `System.Xml` | For `XmlWriter`, `XmlElement` in XML serialization |
|
||||
| `Classes.Tags.TagsInstance.TagsGetDelegate` | Delegate type for tag retrieval (fully qualified in source) |
|
||||
|
||||
### What depends on this module:
|
||||
|
||||
Cannot be determined from the provided source files alone.
|
||||
|
||||
---
|
||||
|
||||
## 5. Gotchas
|
||||
|
||||
1. **Namespace Mismatch**: `IGroupListView` is defined in namespace `DTS.Common.Interface.Groups.GroupTemplateList`, while all other types in this module are in `DTS.Common.Interface.Groups.GroupList`. This inconsistency may cause confusion or require additional using directives.
|
||||
|
||||
2. **Legacy Hardware Identification**: The `IncludedHardwareStringList` property uses the "old SerialNumber_type id scheme" and is "primarily for import purposes" per the source comment. New code should prefer `IncludedHardware`.
|
||||
|
||||
3. **Mixed State Indicators**: The `PositionIsMixed` and `TestObjectIsMixed` properties indicate that values vary across channels within a group. Code consuming these values should handle the "mixed" state appropriately.
|
||||
|
||||
4. **Public Field in TestSetupParentHelper**: The `Id` member is a public field rather than a property, unlike `Name` and `Modified`. This inconsistency may affect serialization or data binding scenarios.
|
||||
|
||||
5. **XML Writer Passed by Reference**: The `WriteXML` method takes `ref XmlWriter writer`, which is unusual. The reason for passing by reference is unclear from the source alone.
|
||||
|
||||
6. **Overloaded CreateGroup with SqlDataReader**: Direct use of `SqlDataReader` in the interface suggests tight coupling to SQL Server data access patterns, which may limit flexibility for alternative data sources.
|
||||
Reference in New Issue
Block a user