public Task <SerialRes> WriteComm(byte[] buff, W32Serial.SerWriteInfoCmpareInfo ovInf = null) { TaskCompletionSource <SerialRes> ts = new TaskCompletionSource <SerialRes>(); WriteComm(new W32Serial.SerWriteInfo { OverRideInfo = ovInf, buf = buff, Done = (stat, err) => { ts.SetResult(new SerialRes { OK = stat, Err = err }); } }); return(ts.Task); }
public bool canOverRide(W32Serial.SerWriteInfoCmpareInfo a) { return(Oper == ((SimpleDriveCompar)a).Oper); }
public Task <SerialRes> WriteComm(string s, W32Serial.SerWriteInfoCmpareInfo ovInf = null) { return(WriteComm(System.Text.ASCIIEncoding.ASCII.GetBytes(s), ovInf)); }