UNPKG

mesh-net-codec

Version:

Decoder for enless LoRaWAN data frames.

11 lines (10 loc) 299 B
exports.initialize = (type) => { try { const devicePath = "./types/" + type; const deviceModule = require(devicePath); return new deviceModule.device(); } catch (e) { //console.log("This device type is not supported"); return null; } };