Menu

#73 create simple BACnet server

release
open
nobody
None
1
2023-11-26
2023-10-24
No

Hello, am new here... and I am exploring the repo... am curious to create a simple BACnet server with a command-able AnalogValue and a read-only AnalogValue just to start with.

Am looking at this code in apps/server directory where i can run the app just fine with the $ ./bacserv 1234

I see when I discover the app there is a 144 objects, can someone give me a tip on figuring out how these objects are defined or configured? It doesnt seem to be as easy as looking inside main.c

For experimentation purposes is it possible to trim this example server app down to just a command-able AnalogValue and another one that is read-only AnalogValue object?

Thanks!

Related

Support Requests: #73

Discussion

  • Anonymous

    Anonymous - 2023-11-24

    Hello, would anyone be able to point me in the direction of tutorials if they exist for people starting out on how to make basic client apps to read/write or a basic custom BACnet server? Thanks! : )

     
  • Steve Karg

    Steve Karg - 2023-11-25

    The example objects for the OS-based apps (Linux/BSD/Windows) are located in src/bacnet/basic/object/ folder. To change the behavior of the example apps/server/ device (bacserv demo), edit src/bacnet/basic/object/device.c module to have only the objects you desire (note: device object and network port object are required objects). Or you can create your own device object service table and in apps/server/main.c pass your table via Device_Init() function.

    To change the default behavior of Analog Value object types, edit src/bacnet/basic/object/av.c to accomplish the desired object features. For commandability, you will likely need some handling from ao.c module; for read-only (input) you would use the Analog Value handling as-is. You would need specific logic or configuration to know when the property values are writable or not. I have often used a boolean flag in the object data structure to indicate if the present-value is writable or not, and the flag is configured either statically or via non-volatile data.

     
  • Ben Bartling

    Ben Bartling - 2023-11-26

    Thanks Steve, would you have a tutorial on how to make a simple present-value client read request to a device analog input?

     

Anonymous
Anonymous

Add attachments
Cancel