Пример #1
0
 /// <summary>
 /// Create a CVLSThreadedComPort for a CVLS unit. This port type should be used when the unit connection
 /// state is unknown. Functions are provided to be notified of connections and status changes. When using
 /// a static configuration, consider using the CVLSComPort classes instead.
 /// </summary>
 /// <param name="threadName">Name of the thread.</param>
 /// <param name="closingWorker">The ClosingWorker to add this thread too</param>
 /// <param name="cvlsPortType">Select the CVLSPortType, can use multiple flags</param>
 /// <param name="serialNumber">The serial number to connect too</param>
 public CVLSThreadedComPort(string threadName, ClosingWorker closingWorker, CVLSPortType cvlsPortType, int serialNumber)
     : base(threadName, closingWorker, CVLSComPort.ComParameters(serialNumber), CVLSComPort.ComMode(cvlsPortType), CVLSComPort.SelectionRule(cvlsPortType))
 {
     InitializeFirmwareUploader();
 }
Пример #2
0
 /// <summary>
 /// Change the connection method of the CVLSThreadedComPort.
 /// </summary>
 /// <param name="cvlsPortType">Select the CVLSPortType, can use multiple flags</param>
 /// <param name="serialNumber">The serial number to connect too</param>
 public void ChangeMode(CVLSPortType cvlsPortType, int serialNumber)
 {
     ConnectionParameters.CopyFrom(CVLSComPort.ComParameters(serialNumber));
     base.ChangeMode(CVLSComPort.ComMode(cvlsPortType), CVLSComPort.SelectionRule(cvlsPortType));
 }