src/Device.js
function Device (device, sp) {
  if (!(device && sp))
    throw new Error('a Device and a SerialPort must be passed');

  for (var i in device)
    this[i] = device[i];

  this._open = false;
  this._sp = sp;

  EventEmitter.call(this);
}
function Device (device, sp) {
  if (!(device && sp))
    throw new Error('a Device and a SerialPort must be passed');

  for (var i in device)
    this[i] = device[i];

  this._open = false;
  this._sp = sp;

  EventEmitter.call(this);
}
function Device ( device , sp ) { if ( ! ( device && sp ) ) throw new Error ( 'a Device and a SerialPort must be passed' ) ; for ( var i in device ) this [ i ] = device [ i ] ; this . _open = false ; this . _sp = sp ; EventEmitter . call ( this ) ; }
Represents a valid Device.

emits:
- connect
- disconnect
- error

@param {obj} device the info about the device
@param {obj} sp     serialport object
Represents a valid Device .