43 lines
2.7 KiB
Markdown
43 lines
2.7 KiB
Markdown
---
|
|
source_files:
|
|
- DataPRO/IService/Classes/PowerProInput/SLICE.PowerPro.Input.Reader.cs
|
|
generated_at: "2026-04-17T16:10:43.628352+00:00"
|
|
model: "zai-org/GLM-5-FP8"
|
|
schema_version: 1
|
|
sha256: "583eb4dab6fcbf41"
|
|
---
|
|
|
|
# PowerProInput
|
|
|
|
### Purpose
|
|
This module provides a concrete implementation of input reading functionality for PowerPro hardware devices. It extends `SLICEBaseInputReader` to measure diagnostic channel values including input voltage, temperature, and backup battery voltage from PowerPro hardware via a communication interface.
|
|
|
|
### Public Interface
|
|
|
|
**Class: `SLICEPowerProInputReader`**
|
|
|
|
- **Constructor**: `SLICEPowerProInputReader(ICommunication comm)` - Initializes the reader with an `ICommunication` interface for hardware communication. Passes the communication object to the base class and stores it in a private readonly field.
|
|
|
|
- **Property**: `override double InputMilliVolts` - Measures the input voltage on diagnostic channel `InputVoltage_A`. Creates a `MeasurePowerProDiagnosticChannel` instance, configures it with `DeviceGroup = 0` and `DeviceID = 0`, executes synchronously, and returns the measurement converted to millivolts (multiplied by 1000.0).
|
|
|
|
- **Property**: `override double TemperatureC` - Measures the temperature in Celsius. Uses diagnostic channel `TemperatureC` with `DeviceGroup = 0` and `DeviceID = 0`. Returns the raw measurement value without conversion.
|
|
|
|
- **Property**: `override double DirectBackupMilliVolts` - Measures the backup battery voltage. Uses diagnostic channel `BatteryVoltage` with `DeviceGroup = 0` and `DeviceID = 0`. Returns the measurement converted to millivolts (multiplied by 1000.0).
|
|
|
|
### Invariants
|
|
- All measurement operations use `DeviceGroup = 0` and `DeviceID = 0` (single device assumption).
|
|
- Voltage measurements (`InputMilliVolts`, `DirectBackupMilliVolts`) are always returned in millivolts, requiring multiplication by 1000.0 from the raw measurement.
|
|
- Temperature is always returned in Celsius without scaling.
|
|
- Each property getter performs a synchronous execution call; there is no caching of measurements.
|
|
|
|
### Dependencies
|
|
**Depends on:**
|
|
- `DTS.Common.Interface.DASFactory` - Provides `ICommunication` interface
|
|
- `DTS.DASLib.Command.SLICE` - Provides `MeasurePowerProDiagnosticChannel` class and `PowerProDiagnosticChannelList` enum
|
|
- `SLICEBaseInputReader` (base class, location not shown in source)
|
|
|
|
**Depended on by:** Not determinable from source alone.
|
|
|
|
### Gotchas
|
|
- Each property access creates a new `MeasurePowerProDiagnosticChannel` instance and performs a synchronous `SyncExecute()` call. Frequent property access could impact performance.
|
|
- The hardcoded `DeviceGroup = 0` and `DeviceID = 0` values suggest this implementation only supports single |