// Specific driver
// it covers the mappings to specific protocols
// the methods will be used by devices
// require libraries that you are using
module.exports = function(){
//attributes and private methods of the driver
// propietaryParameters is a list of string that will be force when creating instances
let propietaryParameters = [];
//methods of a driver
return {
// public API offered by a driver
readSensorData: function(sensorConf, callback){
let result=0;
//write your code here and return a number
callback(null, result);
},
storeSensorData: function(data){
// receives propietary data and transforms it to agnostic data
// ?? it has to call to specific protocol libraries such as OPC_UA, MQTT, etc
},
sendCommand: function(command){
// gets an object to the command and calls a library specific to the protocol to send it
}
}
}