open-energymesh-offline-fir.../adapters/meter_adapter.js

22 lines
290 B
JavaScript

// Minimal meter adapter scaffold
class MeterAdapter {
constructor(id) {
this.id = id;
}
readState() {
return {
id: this.id,
consumptionW: 0
};
}
applyCommand(cmd) {
return { success: true, command: cmd };
}
}
module.exports = {
MeterAdapter
};