nodeserver/src/local/App.js
/* Main function to start gateway host application */
Main function to start gateway host application
Main function to start gateway host application
function findGatewayUpdateAndStart() {
  if (process.env.TTY){
    startGateway({"port": process.env.TTY});
  } else {
    getAllConnectedZigBeeNCP(function(zigbeeGateways) {
      var latestConnectedZigBeeNCP = getLatestVersionZigBeeNCP(zigbeeGateways);
      if (latestConnectedZigBeeNCP) {
        Logger.server.log('info', 'Found NCP', latestConnectedZigBeeNCP);
        startGateway(latestConnectedZigBeeNCP);
      }
    }.bind(this));
  }
}
function findGatewayUpdateAndStart ( ) { if ( process . env . TTY ) { startGateway ( { "port" : process . env . TTY } ) ; } else { getAllConnectedZigBeeNCP ( function ( zigbeeGateways ) { var latestConnectedZigBeeNCP = getLatestVersionZigBeeNCP ( zigbeeGateways ) ; if ( latestConnectedZigBeeNCP ) { Logger . server . log ( 'info' , 'Found NCP' , latestConnectedZigBeeNCP ) ; startGateway ( latestConnectedZigBeeNCP ) ; } } . bind ( this ) ) ; } }
Main function to start gateway host application
Main function to start gateway host application
/* Check if ncp is connected */