Pass DeviceCommunicationIF* instead of object ID to device handler #550
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
I think Mahsa already mentioned that this would make more sense.
Doing so would be more intuitive as well. There are a lot of cases where it's just not feasible to make a device handler generic or the device handler has dependencies on OS specific functionality anyway (toggle GPIOs, special commands which require circumventing the PST Mechanism etc.). Passing the com IF directly allows the user to access the communication interface directly by casting the IF back to the user defined type, so it's not necessary anymore to retrieve the pointer with the object manager.
This is an API change. For backwords compatibility, one could just add the new constructor and leaving the old one, adding a deprecation note.
Pass `DeviceCommunicationIF*` instead of object ID to device handlerto Pass DeviceCommunicationIF* instead of object ID to device handler