You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

24 lines
571 B
JavaScript

4 years ago
const PagerDevice = require("./Device")
// Birdy Slim (IoT) Device
class BirdySlim extends PagerDevice {
constructor () {
super()
this.duplex = true
4 years ago
this.name = "birdyslim"
}
RandID() {
return `B${ Str.random(4) }`
}
async formatTX(msg) {
msg.id = this.RandID()
await MessageManager.BindMsg(msg)
msg.payload = `${ msg.id }${ msg.payload }`
msg._routerData = {
recvAck: true,
readAck: true,
response: true,
}
4 years ago
}
}
module.exports = BirdySlim