Comparing version 0.0.7 to 0.0.8
@@ -15,2 +15,3 @@ /** | ||
var licenseeNames = { | ||
"24ddf4118cf1440c87cde368daf9c93e": "RECO", | ||
"2f234454cf6d4a0fadf2f4911ba9ffa6": "Radius Networks", | ||
@@ -17,0 +18,0 @@ "3d4f13b4d1fd404980e5d3edcc840b69": "Orange S.A.", |
@@ -6,3 +6,12 @@ /** | ||
/** | ||
var BIT0_NAME = 'LE Limited Discoverable Mode'; | ||
var BIT1_NAME = 'LE General Discoverable Mode'; | ||
var BIT2_NAME = 'BR/EDR Not Supported'; | ||
var BIT3_NAME = 'Simultaneous LE and BR/EDR to Same Device Capable (Controller)'; | ||
var BIT4_NAME = 'Simultaneous LE and BR/EDR to Same Device Capable (Host)'; | ||
var BIT5_NAME = 'Reserved'; | ||
/** | ||
* Parse BLE advertiser data flags. | ||
@@ -17,19 +26,28 @@ * @param {string} payload The raw payload as a hexadecimal-string. | ||
if(flags & 0x01) { | ||
result.push("LE Limited Discoverable Mode"); | ||
result.push(BIT0_NAME); | ||
} | ||
if(flags & 0x02) { | ||
result.push("LE General Discoverable Mode"); | ||
result.push(BIT1_NAME); | ||
} | ||
if(flags & 0x04) { | ||
result.push("BR/EDR Not Supported"); | ||
result.push(BIT2_NAME); | ||
} | ||
if(flags & 0x08) { | ||
result.push("Simultaneous LE and BR/EDR to Same Device Capable (Controller)"); | ||
result.push(BIT3_NAME); | ||
} | ||
if(flags & 0x10) { | ||
result.push("Simultaneous LE and BR/EDR to Same Device Capable (Host)"); | ||
result.push(BIT4_NAME); | ||
} | ||
if(flags & 0x20) { | ||
result.push(BIT5_NAME); | ||
} | ||
advertiserData.flags = result; | ||
} | ||
module.exports.process = process; | ||
module.exports.process = process; | ||
module.exports.BIT0_NAME = BIT0_NAME; | ||
module.exports.BIT1_NAME = BIT1_NAME; | ||
module.exports.BIT2_NAME = BIT2_NAME; | ||
module.exports.BIT3_NAME = BIT3_NAME; | ||
module.exports.BIT4_NAME = BIT4_NAME; | ||
module.exports.BIT5_NAME = BIT5_NAME; |
@@ -147,1 +147,2 @@ /** | ||
module.exports.process = process; | ||
module.exports.flags = flags; |
@@ -29,1 +29,2 @@ /** | ||
module.exports.address = address; | ||
module.exports.data = data; |
@@ -13,3 +13,3 @@ { | ||
], | ||
"version": "0.0.7", | ||
"version": "0.0.8", | ||
"engines": { | ||
@@ -16,0 +16,0 @@ "node": "^0.10.0" |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
268162
137
3978