JoelBender / bacpypes

BACpypes provides a BACnet application layer and network layer written in Python for daemons, scripting, and graphical interfaces.
MIT License
302 stars 129 forks source link

Implement WhoIsIAm and "WhoHasIHave services together #468

Open JoelBender opened 2 years ago

JoelBender commented 2 years ago

Can you please guide me on how to implement "WhoIsIAm" and "WhoHasIHave" services together?

I have done WhoIsIAm and am through with it and have also implemented multiple devices in one application but now I want to provide WhoHasIHave Service also. So, Can you please help me with that?!

Originally posted by @SRikinR in https://github.com/JoelBender/bacpypes/issues/189#issuecomment-1243229082

JoelBender commented 2 years ago

The WhoHasIHaveServices class in the bacpypes.service.device module is a "mix-in class" which you can include in your inheritance class list when you subclass an Application or one of its subclasses, like BIPSimpleApplication. In the ReadPropertyMultipleServer.py sample application you can see where the ReadPropertyMultipleApplication class inherits from BIPSimpleApplication and includes additional services like ReadWritePropertyMultipleServices and DeviceCommunicationControlServices.

SRikinR commented 2 years ago

Thank you for your help, I think only one thread should be active or else this might create confusion and might be hectic. I request you to close this thread and continue our discussion in the #467 We have same issue thread going on #467.