Can readProperty but can't writeProperty
mtoko opened this issue · 2 comments
Node Version: 8.1.3
Node BACstack Version :0.0.1-beta.13
Thanks for the great work
I can read but cannot write, this is similar to issue #58
Code
const bacnet = require('bacstack');
const client = new bacnet();
client.writeProperty('192.168.1.135', {type: 4, instance: 0}, 85, [
{type: bacnet.enum.ApplicationTags.BACNET_APPLICATION_TAG_REAL, value: 1}
], (err, value) => {
console.log('value: ', value);
});
Error
C:\Users\User\WebstormProjects\untitled3\write.js:5
{type: bacnet.enum.ApplicationTags.BACNET_APPLICATION_TAG_REAL, value: 1}
^
TypeError: Cannot read property 'ApplicationTags' of undefined
at Object. (C:\Users\User\WebstormProjects\untitled3\write.js:5:23)
at Module._compile (module.js:569:30)
at Object.Module._extensions..js (module.js:580:10)
at Module.load (module.js:503:32)
at tryModuleLoad (module.js:466:12)
at Function.Module._load (module.js:458:3)
at Function.Module.runMain (module.js:605:10)
at startup (bootstrap_node.js:158:16)
at bootstrap_node.js:575:3
Process finished with exit code 1
Hi @mtoko
Thanks for your bug-report.
However, I'm unable to reproduce the issue under the same circumstanzes as reported by you:
- Used the code you provided in your description
- Used
bacstack@0.0.1-beta.13
- Used
Node.js v8.9.3
Furthermore, the provided error message it really confusing, as it implies that bacnet.enum
isn't defined.
Are you sure, that the correct bacstack
has been imported?
Cheers
Hi
Thank you for your assistance. I have specifically installed bacstack@0.0.1-beta.13 and this has fixed the issue. I am continuing to test my application