-
-
Notifications
You must be signed in to change notification settings - Fork 71
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Develop #144
Develop #144
Conversation
… places where you need to pass class object
…y the default state of PD
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The C++ change looks good to me. Please drop the input/output status handling change from this PR.
src/osdp_cp.c
Outdated
case OSDP_CMD_OUT_STATUS: | ||
cmd_id = CMD_OSTAT; | ||
break; | ||
case OSDP_CMD_INPUT_STATUS: | ||
cmd_id = CMD_ISTAT; | ||
break; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The output/input status have to be handled along with case OSDP_CMD_STATUS:
above to avoid having to introduced too many command types. Also I think some refactoring around this area is overdue.
Please drop this change, I will take address it shortly.
Thanks for the PR. I squash merged your change to minimize git log noise. |
@mehmoodmalik I added the status query feature that you were interested in e2d2c03. |
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.