goToMain / libosdp

Implementation of IEC 60839-11-5 OSDP (Open Supervised Device Protocol); provides a C library with support for C++, Rust and Python3
https://libosdp.sidcha.dev
Apache License 2.0
128 stars 69 forks source link

Develop #144

Closed mehmoodmalik closed 7 months ago

mehmoodmalik commented 7 months ago

Hi, I am currently developing OSDP product using your library. I faced the following issues: 1- I was unable to pass a class object to the PD callback, I noticed that instead of passing args you are just passing _ctx which doesn't make any sense to me. That is why i added the args in the set_command_callback of PD. 2- It is enough to declare _ctx = nullptr at Common class because each derived class would call the constructor of Common and it will initialize the _ctx to nullptr. 3- Exposing ISTAT and OSTAT to application level. I faced a situation where ACU need to know the default state of the PD.

Please have a look to my changes i am waiting for this to be merged so that we can utilize this code in our company.

Best regards, Mehmood Malik.

sidcha commented 7 months ago

Thanks for the PR. I squash merged your change to minimize git log noise.

sidcha commented 7 months ago

@mehmoodmalik I added the status query feature that you were interested in e2d2c036488fc1527ce0694bf05a8dba9d809228.