examples/deprecated/easyble/tisensortag/easyble.dist.js
function(connectInfo)
			{
				// DEBUG LOG
				console.log('BLE connect state: ' + connectInfo.state);
			
				if (connectInfo.state == 2) // connected
				{
					device.deviceHandle = connectInfo.deviceHandle;
					device.__uuidMap = {};
					device.__serviceMap = {};
					device.__isConnected = true;
					internal.connectedDevices[device.address] = device;

					success(device);
				}
				else if (connectInfo.state == 0) // disconnected
				{
					device.__isConnected = false;
					internal.connectedDevices[device.address] = null;

					// TODO: Perhaps this should be redesigned, as disconnect is
					// more of a status change than an error? What do you think?
					fail && fail(evothings.easyble.error.DISCONNECTED);
				}
			}
function(connectInfo)
			{
				// DEBUG LOG
				console.log('BLE connect state: ' + connectInfo.state);
			
				if (connectInfo.state == 2) // connected
				{
					device.deviceHandle = connectInfo.deviceHandle;
					device.__uuidMap = {};
					device.__serviceMap = {};
					device.__isConnected = true;
					internal.connectedDevices[device.address] = device;

					success(device);
				}
				else if (connectInfo.state == 0) // disconnected
				{
					device.__isConnected = false;
					internal.connectedDevices[device.address] = null;

					// TODO: Perhaps this should be redesigned, as disconnect is
					// more of a status change than an error? What do you think?
					fail && fail(evothings.easyble.error.DISCONNECTED);
				}
			}
function ( connectInfo ) { // DEBUG LOG console . log ( 'BLE connect state: ' + connectInfo . state ) ; if ( connectInfo . state == 2 ) // connected { device . deviceHandle = connectInfo . deviceHandle ; device . __uuidMap = { } ; device . __serviceMap = { } ; device . __isConnected = true ; internal . connectedDevices [ device . address ] = device ; success ( device ) ; } else if ( connectInfo . state == 0 ) // disconnected { device . __isConnected = false ; internal . connectedDevices [ device . address ] = null ; // TODO: Perhaps this should be redesigned, as disconnect is // more of a status change than an error? What do you think? fail && fail ( evothings . easyble . error . DISCONNECTED ) ; } }
Success callback.
Success callback .