Commit bf9006d1 by Chavee Issariyapat

clean up

parent 877de189
......@@ -4,11 +4,7 @@ const events = require('events');
const FlowEmitter = function(param = {}) {
this.red = param.red; // node-red object
//this.devicelist = {};
//this.sublist = {};
this.globalcontext = param.globalcontext;
this.events = new events.EventEmitter;
}
......@@ -16,13 +12,6 @@ FlowEmitter.prototype.start = function() {
let that = this;
this.red.events.on('register', function(client) {
// that.devicelist[client.nodeid] = {
// deviceid : client.deviceid,
// devicetoken: client.devicetoken,
// msgtopic : [],
// subbed : false
// }
that.emit('newclient', client);
});
......@@ -42,17 +31,6 @@ FlowEmitter.prototype.start = function() {
}
// FlowEmitter.prototype.getDeviceList = function() {
// return this.devicelist;
// }
// FlowEmitter.prototype.clearDeviceSubscriptionState = function() {
// for (let nodeid in this.devicelist) {
// this.devicelist[nodeid].subbed = false;
// }
// }
FlowEmitter.prototype.pub = function(topic, payload) {
this.red.events.emit(topic, payload);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment