public static void Adr(this ILambdaProtocol lambdaProtocol, string identifier, byte address, float voltage) { var response = lambdaProtocol.Adr(address); if (response.Error != null) { throw new LambdaFailureException( string.Format( Properties.Resources.NotFoundPowerSource, identifier, address, VoltageRound(voltage)), response.Error); } }
public override void PowerOn(ILambdaWorker worker) { try { _unit.Available(false); _protocol.Adr(_unit.ExpectedIdentifier, _unit.Address, _unit.Address); _unit.Available(true); _protocol.OutOn(_unit.ExpectedIdentifier, _unit.Address, _unit.Voltage); _protocol.Idn(_unit.ExpectedIdentifier, _unit.Address); worker.Goto(worker.StateReadInit); } catch (Exception) { worker.Goto(worker.StateFailure); throw; } }