Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tracking multiple devices #3

Open
invaderb opened this issue Apr 14, 2017 · 5 comments
Open

Tracking multiple devices #3

invaderb opened this issue Apr 14, 2017 · 5 comments

Comments

@invaderb
Copy link

Greetings,

I'm starting to get the hang of the library and created a custom adapter for my GPS device and have it sending data however is it possible to track multiple different devices at the same time?

Lets say I have my GPS device and the TK103 in the index.js under the var options = {
'debug' : false,
'port' : 8090,
'device_adapter' : "TK103",
'device_adapter' : "AB100"
}
However what ever is set as the last device_adapter is what the app is looking for.

any advice would be greatly appreciated!

@gdespirito
Copy link
Member

gdespirito commented Apr 14, 2017 via email

@invaderb
Copy link
Author

So would it be possible to display multiple devices on a map with this library?

@gdespirito
Copy link
Member

gdespirito commented Apr 14, 2017 via email

@invaderb
Copy link
Author

Hmm ok I think I understand

So there are two files that make up the node server
index.js and main.js in gps-tracking/lib

in the index.js
I'm assuming it would look something like this?
var server1 = app.listen(3000);
var server2 = app.listen(3000);

var options1 = {};
var options2 = {};

var server1 = gps.server1(options1 ......... ;
var server2 = gps.server(options2 .......... ;

would I also need to duplicate the main.js file as well and require is with the module export?

Another question what do the functions export to in the functions.js file?

@invaderb
Copy link
Author

Upon further searching socket io should be able to do asynchronous IO on one port but still not sure how to handle the multiple devices.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants