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.
25 lines
766 B
JavaScript
25 lines
766 B
JavaScript
3 years ago
|
const MessageManager = require("../MessageManager")
|
||
|
const PagerDevice = require("./Device")
|
||
|
const Str = require('@supercharge/strings')
|
||
|
const config = require('../../config.json')
|
||
|
|
||
|
// Birdy Slim (IoT) Device
|
||
|
class EMessage2Ways extends PagerDevice {
|
||
|
constructor () {
|
||
|
super()
|
||
|
this.duplex = true
|
||
|
this.supportBOSkrypt = false
|
||
|
this.name = "emessage2WayS"
|
||
|
}
|
||
|
RandID() {
|
||
|
return `E${ Str.random(8) }`
|
||
|
}
|
||
|
async formatTX(msg) {
|
||
|
msg.id = this.RandID()
|
||
|
await MessageManager.BindMsg(msg)
|
||
|
//msg.payload = msg.type === 'duplex' ? `${ msg.id }${ msg.payload }` : msg.payload // only if duplex wanted we add the id
|
||
|
}
|
||
|
async tryReceive(data, connector) {
|
||
|
}
|
||
|
}
|
||
|
module.exports = EMessage2Ways
|