Example #1
0
 /// <summary>
 /// The basic system object, sets up the connection to the serial port.
 /// </summary>
 /// <param name="portName"></param>
 public FluffInsteon(string portName, DeviceProvider provider)
 {
     this.port = new CommunicationDevice(new SerialPort(portName, 19000, Parity.None, 8, StopBits.One));
     this.port.ReceivedMessage += port_ReceivedMessage;
     this.linkingEvent          = new AutoResetEvent(false);
     this.deviceFactory         = new DeviceFactory(this);
     this.provider              = provider;
     log.Info("Started FluffInsteon up");
 }
Example #2
0
 /// <summary>
 /// Disposes this object.
 /// </summary>
 public void Dispose()
 {
     this.linkingEvent.Dispose();
     this.port.Dispose();
     this.devices.Clear();
     this.devices        = null;
     this.deviceFactory  = null;
     this.linkedDevices  = null;
     this.linkingEvent   = null;
     this.plm            = null;
     this.port           = null;
     this.provider       = null;
     this.receivedPacket = null;
     this.sendingPacket  = null;
     this.connected      = false;
 }