--- source_files: - DataPRO/DataPRO/DataModel/Classes/Hardware/ATDArmStatus.cs generated_at: "2026-04-17T16:01:50.083542+00:00" model: "zai-org/GLM-5-FP8" schema_version: 1 sha256: "5d7b47b08fb8d993" --- # Documentation: ATDArmStatus.cs ## 1. Purpose This module provides a hierarchical status tracking system for ATD (Airborne Test Device) hardware components used in data acquisition systems. It models the relationship between ATDs, Distributors, and individual Devices, tracking their armed states, diagnostic health, voltage levels, and connectivity status. The module aggregates status from individual devices upward through the hierarchy to provide an overall system health view, supporting real-time monitoring of hardware readiness for test operations. --- ## 2. Public Interface ### `DbParentInfo` (internal class) Simple data container for database-retrieved parent information. | Property | Type | Description | |----------|------|-------------| | `SerialNumber` | `string` | Device serial number | | `ParentDAS` | `string` | Parent DAS identifier | | `PositionOnDistributor` | `int` | Position on distributor | | `PositionOnChain` | `int` | Position in chain | | `Port` | `int` | Port number | **Constructor:** `DbParentInfo(string serial, string parentDAS, int positionDb, int positionChain, int port)` --- ### `AllATDStatus` (public class) Implements `IAllATDStatus`. Root container for all ATD status tracking. | Property/Method | Signature | Description | |-----------------|----------|-------------| | `OverallStatus` | `AllATDStatuses` (get) | Aggregate status across all ATDs | | `ATDs` | `IATDStatus[]` (get) | Array of all ATD status objects | | `PopulateFromHardware` | `void PopulateFromHardware(IDASHardware[] hardware)` | Populates the hierarchy from a hardware array; SLICE Ethernet controllers are added first as distributors | | `AddDevice` | `void AddDevice(IDeviceArmStatus device, string parent = null)` | Adds a device to the appropriate ATD/distributor based on parent relationship | --- ### `ATDStatus` (public class) Implements `IATDStatus`. Represents a single ATD unit containing one or more distributors. | Property/Method | Signature | Description | |-----------------|----------|-------------| | `Status` | `AllATDStatuses` (get) | Aggregate status for this ATD | | `Distributors` | `IDistributorArmStatus[]` (get) | Array of distributors belonging to this ATD | | `IP` | `IPAddress` (get) | IP address of the ATD | | `AddDistributor` | `void AddDistributor(IDistributorArmStatus distributor)` | Adds a distributor if not already present | | `SetIP` | `void SetIP(IPAddress ip)` | Sets the IP address | | `UpdateAggregateStatus` | `void UpdateAggregateStatus()` | Recalculates status based on all distributor states | --- ### `DistributorArmStatus` (public class) Implements `IDistributorArmStatus`. Represents a distributor device with attached devices. | Property/Method | Signature | Description | |-----------------|----------|-------------| | `SerialNumber` | `string` (get/set) | Serial number; returns `Distributor.SerialNumber` if set, otherwise internal field | | `EmptyDistributor` | `bool` (get) | Returns `true` if serial number is null or empty | | `LastSeen` | `DateTime?` (get/set) | Last communication timestamp | | `InputVoltage` | `float?` (get/set) | Input voltage reading | | `BackupVoltage` | `float?` (get/set) | Backup voltage reading | | `AggregateStatus` | `AllATDStatuses` (get/set) | Aggregate status of distributor and devices | | `DistributorStatus` | `DistributorStatuses` (get) | Status specific to the distributor | | `Distributor` | `IDeviceArmStatus` (get) | The device acting as distributor | | `Devices` | `IDeviceArmStatus[]` (get) | Array of devices attached to this distributor | | `AddDevice` | `void AddDevice(IDeviceArmStatus device)` | Adds a device if not already present | | `SetDistributor` | `void SetDistributor(IDeviceArmStatus distributor)` | Sets the distributor device | | `SetSerialNumber` | `void SetSerialNumber(string serial)` | Sets serial number | | `SetDistributorStatus` | `void SetDistributorStatus(DistributorStatuses status)` | Sets distributor status | | `UpdateStatusFromQATS` | `void UpdateStatusFromQATS(IUDPQATSEntry qats)` | Updates voltage and status from QATS entry | | `UpdateAggregateStatus` | `void UpdateAggregateStatus()` | Recalculates aggregate status; marks devices as `MissingNotBooted` if not seen within `QATSMaxExpectedTimeMS` | --- ### `DeviceArmStatus` (public class) Implements `IDeviceArmStatus`. Represents an individual device with diagnostic tracking. | Property/Method | Signature | Description | |-----------------|----------|-------------| | `SerialNumber` | `string` (get) | Returns from `DASCommunication.SerialNumber`, `Hardware.SerialNumber`, or internal field (in that order) | | `IPAddress` | `string` (get) | Returns `Hardware.Connection` if set, otherwise internal field | | `DASStatus` | `DASStatuses` (get) | Current DAS status | | `HasArmed` | `bool` (get/set) | Whether device has ever armed | | `DiagStatus` | `DiagStatuses` (get) | Diagnostic status flags | | `Distributor` | `IDistributorArmStatus` (get) | Parent distributor | | `Hardware` | `IDASHardware` (get) | Associated hardware object | | `DASCommunication` | `IDASCommunication` (get) | Associated DAS communication object | | `LastSeen` | `DateTime?` (get/set) | Last communication timestamp | | `InputVoltage` | `float?` (get/set) | Input voltage | | `BackupVoltage` | `float?` (get/set) | Backup voltage | | `Triggered` | `bool` (get/set) | Whether device has triggered | | `ShuntResults` | `string` (get/set) | Shunt diagnostic results string | | `OffsetResults` | `string` (get/set) | Offset diagnostic results string | | `TiltX`, `TiltY`, `TiltZ` | `double?` (get/set) | Tilt sensor readings | | `SetSerialNumber