ninjasource / embedded-bacnet

A library to read and write bacnet packets for embedded devices
Apache License 2.0
12 stars 2 forks source link

BACnet server support #1

Closed bbartling closed 4 months ago

bbartling commented 4 months ago

Hello,

Would you ever be open to BACnet server support? IE., some app that has BACnet I-am service and will respond to a Who-is?..

Where then the app can be configured to discover "points" inside a device...

It would be real neat if a repo like this could recreate bacpypes (Py BACnet stack) the mini_device.py which is a just fake BACnet server app that just loops through random values to update the BACnet server point values... Where then people can build off of for creating real BACnet applications on real data, like GPIO readings or whatever...

I am a bit of a newbie in Rust but would love to contribute if there would be some support. I would love how to learn how to make this but I would need some help on the rust side. Thanks for anytime you would have in response..

Cheers.

ninjasource commented 4 months ago

Hi Ben,

Thanks for your comment! There is already a lot of sever support (like who-is) but alas no Change-Of-Value server support as yet because I haven't had to simulate that. I've already built a working simulator for my own testing but it is too messy publish just yet.

There is server support for the following right now:

UnconfirmedRequest::WhoIs
ConfirmedRequestService::ReadPropertyMultiple
ConfirmedRequestService::ReadProperty
ConfirmedRequestService::ReadRange
ConfirmedRequestService::WriteProperty

The following object types can be served:

ObjectType::ObjectAnalogInput
ObjectType::ObjectAnalogOutput
ObjectType::ObjectAnalogValue
ObjectType::ObjectBinaryInput
ObjectType::ObjectBinaryOutput
ObjectType::ObjectBinaryValue
ObjectType::ObjectSchedule
ObjectType::ObjectTrendlog
ObjectType::ObjectDevice

I hope that helps for now. More stuff will come soon. I might publish my demo simulator once I get round to cleaning it up.

David

bbartling commented 4 months ago

Thanks!!