Files
DP44/docs/ai/Common/DTS.Common/Classes/ClockSync.md
2026-04-17 14:55:32 -04:00

2.6 KiB

source_files, generated_at, model, schema_version, sha256
source_files generated_at model schema_version sha256
Common/DTS.Common/Classes/ClockSync/IClockSyncProfile.cs
Common/DTS.Common/Classes/ClockSync/ClockSyncProfile.cs
Common/DTS.Common/Classes/ClockSync/ClockSyncProfileConverter.cs
Common/DTS.Common/Classes/ClockSync/ClockSyncProfileCollection.cs
2026-04-17T15:37:46.003596+00:00 zai-org/GLM-5-FP8 1 3a836b4af12d4326

ClockSync Profile Module Documentation

1. Purpose

This module provides configuration management for clock synchronization profiles within the DTS system. It defines various time synchronization methods (PTP IEEE 1588, IRIG-B, GPS, 1PPS) that can be used to synchronize system clocks. The module implements a singleton-based collection pattern with XML persistence, enabling runtime profile configuration while providing default profiles for standard clock sync scenarios. It is designed to integrate with property grid UI components for configuration interfaces.


2. Public Interface

IClockSyncProfile (Interface)

File: IClockSyncProfile.cs

Defines the contract for clock synchronization profiles.

Property Type Description
ProfileId int Unique identifier for the profile
ProfileName string Display name of the profile
ProfileDesc string Description of the profile
DisplayOrder int Sort order for UI display
Visible bool Whether the profile is visible in UI
FilterRestrictions DASRestriction[] Array of restrictions applied to the profile

ClockSyncProfile (Class)

File: ClockSyncProfile.cs

Concrete implementation of IClockSyncProfile.

Constructors:

  • ClockSyncProfile() — Default parameterless constructor.
  • ClockSyncProfile(int profileId, string profileName, string profileDesc, int displayOrder, bool visible, DASRestriction[] filterRestrictions) — Initializes with all property values.
  • ClockSyncProfile(ClockSyncProfileCollection.ClockSyncProfileDefaults defaults, DASRestriction[] restrictions) — Initializes from a defaults enum value; extracts display metadata via reflection.

Methods:

  • ToString() — Override returning ProfileName.

ClockSyncProfileConverter (Class)

File: ClockSyncProfileConverter.cs

Extends ArrayConverter for property grid integration.

Properties:

  • ValuesClockSyncProfile[] — Lazily-loaded, filtered, and sorted array of visible profiles. Filters out null and non-visible entries; sorts by DisplayOrder.

Methods:

  • `CanConvertFrom(ITypeDescriptorContext context,