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

use multi read #3

Closed
heleon19 opened this issue May 10, 2018 · 4 comments
Closed

use multi read #3

heleon19 opened this issue May 10, 2018 · 4 comments
Labels

Comments

@heleon19
Copy link

Hi
How can I use the multi read function? Tried to pass the handle as array, but didn't work.
Thank's for your advice.
Regards Heleon

@roccomuso
Copy link
Owner

Please paste the whole code

@heleon19
Copy link
Author

heleon19 commented May 23, 2018

Connection is ok, read of single variable is ok.

Example of multi read:

var myHandles =[
 {
    symname: '.light.gp[0]',  
    bytelength: ads.INT,  
},
 {
    symname: '.light.gp[1]',  
    bytelength: ads.INT,  
}
];

var client = ads.connect(options, function() {
    this.mulitRead(myHandles, function(err, handle) {
        if (err) console.log(err)
        console.log(handle.value)
    });
});

@roccomuso
Copy link
Owner

roccomuso commented Jul 19, 2018

Try to put this listeners to catch errors:

client.on('notification', function(handle){
    console.log(handle)
})

client.on('error', function(error) {
    console.log(error)
})

I'm investigating the issue.

@PLCHome
Copy link
Collaborator

PLCHome commented Sep 15, 2018

@roccomuso it should work properly with 1.4.3

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

No branches or pull requests

3 participants