This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

BACNET Object Table
#1
Hi everyone!

I'm using the bacnet library to get all object under a bacnet device:

require('bacnet')
device, objects = bacnet.scandevice(1)


for _, object in ipairs(objects) do
 

 
log(object)

end

Everything is ok. This returns a table with all the info I need. The name, the type, and the present-value.

But when I try to decode the table:

object.name ===> works!!
object.type ===> works!!
object. present-value  ===> fail !!
 
I do not know how to set the "-" in preset-value becouse returns fail due to only takes the first part.

How can I set the request to access that info?


Thanks!!

Kike

Attached Files Thumbnail(s)
   
Reply
#2
Use object['present-value']
Reply
#3
(27.03.2023, 10:14)admin Wrote: Use object['present-value']

thanks! works fine!
Reply


Forum Jump: