using SHJX.Service.ServerClient;
using SHJX.Service.Control.PortOperate.Interface;
using SHJX.Service.Control.Common;
namespace SHJX.Service.Control.PortOperate
{
public class SilverSulfateOperate : PortOperateImp
{
///
/// 硫酸银
///
///
public SilverSulfateOperate(OptClient optClient) : base(optClient)
{
OpName = "SilverSulfate";
}
/*protected override void CutPipe(string pipeName)
{
OptPipe(() =>
{
var readRes = Read();
if (readRes is null || readRes.Length < 1) return false;
var res = pipeName switch
{
"In" => readRes[6].Equals('0'),
"Out1" => readRes[5].Equals('0'),
"Out2" => readRes[7].Equals('0'),
_ => false,
};
return res;
});
}*/
public override bool LiquidOperation(string pipeName, long quantity)
{
using (OptionSilverSulfatePipe optPipe = new(pipeName))
{
return MotorWrite(quantity); //吸液
}
}
}
}