56 lines
1.8 KiB
Plaintext
56 lines
1.8 KiB
Plaintext
|
|
using System.Threading;
|
||
|
|
using DTS.Common.Interface.DASFactory;
|
||
|
|
using DTS.DASLib.Command.SLICE;
|
||
|
|
|
||
|
|
namespace DTS.DASLib.Service
|
||
|
|
{
|
||
|
|
public class SLICEPowerProInputReader : SLICEBaseInputReader
|
||
|
|
{
|
||
|
|
private readonly ICommunication _comm;
|
||
|
|
|
||
|
|
public SLICEPowerProInputReader(ICommunication comm) : base(comm)
|
||
|
|
{
|
||
|
|
_comm = comm;
|
||
|
|
}
|
||
|
|
|
||
|
|
public override double InputMilliVolts
|
||
|
|
{
|
||
|
|
get
|
||
|
|
{
|
||
|
|
var measure = new MeasurePowerProDiagnosticChannel(_comm);
|
||
|
|
measure.Channel = MeasurePowerProDiagnosticChannel.PowerProDiagnosticChannelList.InputVoltage_A;
|
||
|
|
measure.DeviceGroup = 0;
|
||
|
|
measure.DeviceID = 0;
|
||
|
|
measure.SyncExecute();
|
||
|
|
return measure.Measurement * 1000.0;
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
public override double TemperatureC
|
||
|
|
{
|
||
|
|
get
|
||
|
|
{
|
||
|
|
var measure = new MeasurePowerProDiagnosticChannel(_comm);
|
||
|
|
measure.Channel = MeasurePowerProDiagnosticChannel.PowerProDiagnosticChannelList.TemperatureC;
|
||
|
|
measure.DeviceGroup = 0;
|
||
|
|
measure.DeviceID = 0;
|
||
|
|
measure.SyncExecute();
|
||
|
|
return measure.Measurement;
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
public override double DirectBackupMilliVolts
|
||
|
|
{
|
||
|
|
get
|
||
|
|
{
|
||
|
|
var measure = new MeasurePowerProDiagnosticChannel(_comm);
|
||
|
|
measure.Channel = MeasurePowerProDiagnosticChannel.PowerProDiagnosticChannelList.BatteryVoltage;
|
||
|
|
measure.DeviceGroup = 0;
|
||
|
|
measure.DeviceID = 0;
|
||
|
|
measure.SyncExecute();
|
||
|
|
return measure.Measurement * 1000.0;
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|