361// throw new Exception("Could not evaluate the UpdateStartExpression {0} for {1} {2}.".Build(OpenConnectionExpression, this.GetType().Name, Name), E);
378// throw new Exception("Could not evaluate the UpdateOutputExpression {0} for {1} {2}.".Build(UpdateOutputExpression, this.GetType().Name, Name), E);
396// throw new Exception("Could not evaluate the UpdateEndExpression {0} for {1} {2}.".Build(OpenConnectionExpression, this.GetType().Name, Name), E);
397// }
398// SendData(Data);
399// }
400
401// }
402// }
403// else
404// {
405// throw new Exception("Port {0} for {1} {2} is not initialized.".Build(ComPort, this.GetType().Name, Name));
467// Log.Exception("Could not evaluate the CloseConnectionExpression {0} for {1} {2}.".Build(CloseConnectionExpression, this.GetType().Name, Name), E);
468// }
469
470// try
471// {
472// SendData(Data);
473
474// }
475// catch (Exception E)
476// {
477// Log.Exception(E.Message, E);
478// }
479// Port.Close();
480// Port = null;
481// OldValues = null;
482// }
483
484// }
485// }
486
487// private void SendData(byte[] Data)
488// {
489// lock (PortLocker)
490// {
491// try
492// {
493// Port.Write(Data, 0, Data.Length);
494// }
495// catch (Exception E)
496// {
497// throw new Exception("Could not send data to com port {0} for {1} {2}.".Build(ComPort, this.GetType().Name, Name), E);