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

How does a PD answer to CMD_ISTAT? #154

Closed Sympatron closed 5 months ago

Sympatron commented 6 months ago

A CMD_ISTAT command from the CP triggers this code in the PD: https://github.com/goToMain/libosdp/blob/4394508e09e97c96c7a2f822d882902e213adda4/src/osdp_pd.c#L735-L746

This expects the correct input status event to be in pd->ephemeral_data. How is the input status data supposed to get there?

CMD_ISTAT and CMD_OSTAT do not trigger any user code as far as I can see.

sidcha commented 6 months ago

Right, there is no way to do this now. Will fix it, thanks for reporting it.