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

writeProperty throws Exception when writing null to presentValue #65

Closed
lka opened this issue Nov 18, 2017 · 1 comment
Closed

writeProperty throws Exception when writing null to presentValue #65

lka opened this issue Nov 18, 2017 · 1 comment
Assignees
Labels
Milestone

Comments

@lka
Copy link

lka commented Nov 18, 2017

tried to use

writeProperty (address, 4, objectInstance, 85, 12, [{ type: 9, value: null }], (err, val) => {}

in order to reset entry in priority Array and got an Exception 'buffer.Add is not a function'
(yes I know that the type of BACNET_APPLICATION_TAG_NULL is 0, but this doesn't matter here)

this is at line 431 of master/lib/bacnet-asn1.js:
snip >>>>

var bacappEncodeApplicationData = module.exports.bacappEncodeApplicationData = function(buffer, value) {
  if (value.value === null) {
    buffer.Add(baEnum.BacnetApplicationTags.BACNET_APPLICATION_TAG_NULL);
    return;
  }

<<<< snip

@fh1ch
Copy link
Owner

fh1ch commented Dec 5, 2017

Hi @lka

Thank you very much for reporting this issue. I really appreciate this 👍
Sorry for the delay on this, I don't have too much time working on such topics lately...
However, this issue has been fixed in PR #67 and is now available as release 0.0.1-beta.12.

Happy coding 🍻

@fh1ch fh1ch closed this as completed Dec 5, 2017
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

2 participants