ble-server/main-service.js
2017-08-10 09:24:14 +08:00

20 lines
453 B
JavaScript

const bleno = require('bleno')
const config = require('./config.json')
const TimeCharacteristic = require('./time-characteristic')
const GdataCharacteristic = require('./gdata-characteristic')
class MainService extends bleno.PrimaryService {
constructor(){
super({
uuid: config.uuid.service.id,
characteristics: [
new TimeCharacteristic(),
new GdataCharacteristic()
]
})
}
}
module.exports = MainService