Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
F
flowagent
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Registry
Registry
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
node-red
flowagent
Commits
bf9006d1
Commit
bf9006d1
authored
Apr 12, 2020
by
Chavee Issariyapat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
clean up
parent
877de189
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
22 deletions
+0
-22
flowemitter.js
+0
-22
No files found.
flowemitter.js
View file @
bf9006d1
...
@@ -4,11 +4,7 @@ const events = require('events');
...
@@ -4,11 +4,7 @@ const events = require('events');
const
FlowEmitter
=
function
(
param
=
{})
{
const
FlowEmitter
=
function
(
param
=
{})
{
this
.
red
=
param
.
red
;
// node-red object
this
.
red
=
param
.
red
;
// node-red object
//this.devicelist = {};
//this.sublist = {};
this
.
globalcontext
=
param
.
globalcontext
;
this
.
globalcontext
=
param
.
globalcontext
;
this
.
events
=
new
events
.
EventEmitter
;
this
.
events
=
new
events
.
EventEmitter
;
}
}
...
@@ -16,13 +12,6 @@ FlowEmitter.prototype.start = function() {
...
@@ -16,13 +12,6 @@ FlowEmitter.prototype.start = function() {
let
that
=
this
;
let
that
=
this
;
this
.
red
.
events
.
on
(
'register'
,
function
(
client
)
{
this
.
red
.
events
.
on
(
'register'
,
function
(
client
)
{
// that.devicelist[client.nodeid] = {
// deviceid : client.deviceid,
// devicetoken: client.devicetoken,
// msgtopic : [],
// subbed : false
// }
that
.
emit
(
'newclient'
,
client
);
that
.
emit
(
'newclient'
,
client
);
});
});
...
@@ -42,17 +31,6 @@ FlowEmitter.prototype.start = function() {
...
@@ -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
)
{
FlowEmitter
.
prototype
.
pub
=
function
(
topic
,
payload
)
{
this
.
red
.
events
.
emit
(
topic
,
payload
);
this
.
red
.
events
.
emit
(
topic
,
payload
);
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment