first version of status api, cleaned up code, and split LoRaWAN into 2 Connector Types
This commit is contained in:
parent
91226efa79
commit
767e6aee06
4 changed files with 14 additions and 7 deletions
3
index.js
3
index.js
|
@ -37,5 +37,8 @@ app.post('/api/message/advanced', async (req, res) => {
|
|||
await types.MessageManager.Deliver(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)
|
|
@ -1,6 +0,0 @@
|
|||
class RouteablePage {
|
||||
id
|
||||
|
||||
constructor() {
|
||||
}
|
||||
}
|
11
types/connectors/LoRaWANConnectorTXBridge.js
Normal file
11
types/connectors/LoRaWANConnectorTXBridge.js
Normal file
|
@ -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"),
|
||||
devices: require("./devices"),
|
||||
Message: require("./Message"),
|
||||
RouteablePage: require("./RouteablePage"),
|
||||
|
||||
DeviceRegistry: require("./DeviceRegistry"),
|
||||
MessageManager: require("./MessageManager"),
|
||||
|
|
Loading…
Add table
Reference in a new issue