function process(advertiserData) {
  var nearable = {};
  var data = advertiserData.manufacturerSpecificData.data;

  nearable.id = data.substr(2,16);
  nearable.temperature = toTemperature(data.substr(24,2), data.substr(22,2));
  if(parseInt(data.substr(26,2),16) & 0x40) {
    nearable.currentState = 'motion';
  }
  else {
    nearable.currentState = 'still';
  }
  nearable.accelerationX = toAcceleration(data.substr(28,2));
  nearable.accelerationY = toAcceleration(data.substr(30,2));
  nearable.accelerationZ = toAcceleration(data.substr(32,2));
  nearable.currentStateSeconds = toDuration(data.substr(34,2));
  nearable.previousStateSeconds = toDuration(data.substr(36,2));
  nearable.statusBytes = [ data.substr(0,2), data.substr(18,2),
                           data.substr(20,2), data.substr(24,2),
                           data.substr(26,2), data.substr(38,2) ];

  advertiserData.manufacturerSpecificData.nearable = nearable;
}
/**
 * Parse Estimote Nearable manufacturer specific data.
 * @param {Object} advertiserData The object containing all parsed data.
 */
Parse Estimote Nearable manufacturer specific data.
@param {Object} advertiserData The object containing all parsed data.
Parse Estimote Nearable manufacturer specific data . @param { Object } advertiserData The object containing all parsed data .
function process(advertiserData) {
  var nearable = {};
  var data = advertiserData.manufacturerSpecificData.data;
  nearable.id = data.substr(2,16);
  nearable.temperature = toTemperature(data.substr(24,2), data.substr(22,2));
  if(parseInt(data.substr(26,2),16) & 0x40) {
    nearable.currentState = 'motion';
  }
  else {
    nearable.currentState = 'still';
  }
  nearable.accelerationX = toAcceleration(data.substr(28,2));
  nearable.accelerationY = toAcceleration(data.substr(30,2));
  nearable.accelerationZ = toAcceleration(data.substr(32,2));
  nearable.currentStateSeconds = toDuration(data.substr(34,2));
  nearable.previousStateSeconds = toDuration(data.substr(36,2));
  nearable.statusBytes = [ data.substr(0,2), data.substr(18,2),
                           data.substr(20,2), data.substr(24,2),
                           data.substr(26,2), data.substr(38,2) ];
  advertiserData.manufacturerSpecificData.nearable = nearable;
}
function process ( advertiserData ) { var nearable = { } ; var data = advertiserData . manufacturerSpecificData . data ; nearable . id = data . substr ( 2 , 16 ) ; nearable . temperature = toTemperature ( data . substr ( 24 , 2 ) , data . substr ( 22 , 2 ) ) ; if ( parseInt ( data . substr ( 26 , 2 ) , 16 ) & 0x40 ) { nearable . currentState = 'motion' ; } else { nearable . currentState = 'still' ; } nearable . accelerationX = toAcceleration ( data . substr ( 28 , 2 ) ) ; nearable . accelerationY = toAcceleration ( data . substr ( 30 , 2 ) ) ; nearable . accelerationZ = toAcceleration ( data . substr ( 32 , 2 ) ) ; nearable . currentStateSeconds = toDuration ( data . substr ( 34 , 2 ) ) ; nearable . previousStateSeconds = toDuration ( data . substr ( 36 , 2 ) ) ; nearable . statusBytes = [ data . substr ( 0 , 2 ) , data . substr ( 18 , 2 ) , data . substr ( 20 , 2 ) , data . substr ( 24 , 2 ) , data . substr ( 26 , 2 ) , data . substr ( 38 , 2 ) ] ; advertiserData . manufacturerSpecificData . nearable = nearable ; }
Parse Estimote Nearable manufacturer specific data.
Parse Estimote Nearable manufacturer specific data .