first version of status api, cleaned up code, and split LoRaWAN into 2 Connector Types

master
cheetah 4 years ago
parent 91226efa79
commit 767e6aee06

@ -37,5 +37,8 @@ app.post('/api/message/advanced', async (req, res) => {
await types.MessageManager.Deliver(id) await types.MessageManager.Deliver(id)
return res.json(id) return res.json(id)
}) })
app.get('/api/message/status/:id', async (req, res) => { //TODO: make this fancy
return res.json(types.MessageManager.messages[ req.params.id ])
})
app.listen(3000) app.listen(3000)

@ -1,6 +0,0 @@
class RouteablePage {
id
constructor() {
}
}

@ -0,0 +1,11 @@
const Connector = require("./Connector")
class LoRaWANConnectorTXBridge extends Connector {
// this is optimized for transmitting Downlink Messages via a Special Bridge which overcomes Network Limitations
constructor (amqpConnMngr) {
super(amqpConnMngr)
this.name = "lorawanbridge"
this.duplexCapable = true
}
}
module.exports = LoRaWANConnectorTXBridge

@ -5,7 +5,6 @@ module.exports = {
Connectors: require("./connectors"), Connectors: require("./connectors"),
devices: require("./devices"), devices: require("./devices"),
Message: require("./Message"), Message: require("./Message"),
RouteablePage: require("./RouteablePage"),
DeviceRegistry: require("./DeviceRegistry"), DeviceRegistry: require("./DeviceRegistry"),
MessageManager: require("./MessageManager"), MessageManager: require("./MessageManager"),

Loading…
Cancel
Save