lib/transports/ethernet.js
function EthernetTransport(opts) {
  if (!(this instanceof EthernetTransport)) {
    return new EthernetTransport(opts);
  }

  this.configuration = opts.configuration;
  this.controller = "";

  switch (Controllers[this.configuration.controller].driver) {
  case Controllers.WIZ5100.driver:
    this.controller = Controllers.WIZ5100;
    break;
  case Controllers.ENC28J60.driver:
    this.controller = Controllers.ENC28J60;
    break;
  case Controllers.YUN.driver:
    this.controller = Controllers.YUN;
    break;
  default:
    throw new Error("No valid Ethernet controller defined");
  }
}
function EthernetTransport(opts) {
  if (!(this instanceof EthernetTransport)) {
    return new EthernetTransport(opts);
  }

  this.configuration = opts.configuration;
  this.controller = "";

  switch (Controllers[this.configuration.controller].driver) {
  case Controllers.WIZ5100.driver:
    this.controller = Controllers.WIZ5100;
    break;
  case Controllers.ENC28J60.driver:
    this.controller = Controllers.ENC28J60;
    break;
  case Controllers.YUN.driver:
    this.controller = Controllers.YUN;
    break;
  default:
    throw new Error("No valid Ethernet controller defined");
  }
}
function EthernetTransport ( opts ) { if ( ! ( this instanceof EthernetTransport ) ) { return new EthernetTransport ( opts ) ; } this . configuration = opts . configuration ; this . controller = "" ; switch ( Controllers [ this . configuration . controller ] . driver ) { case Controllers . WIZ5100 . driver : this . controller = Controllers . WIZ5100 ; break ; case Controllers . ENC28J60 . driver : this . controller = Controllers . ENC28J60 ; break ; case Controllers . YUN . driver : this . controller = Controllers . YUN ; break ; default : throw new Error ( "No valid Ethernet controller defined" ) ; } }
Ethernet transport. Currently configurable as client only on Arduino.
@constructor
@param {Objedt} opts
Ethernet transport . Currently configurable as client only on Arduino .