Pass DeviceCommunicationIF* instead of object ID to device handler #550

Open
opened 2022-02-10 13:24:57 +01:00 by muellerr · 0 comments
Owner

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.

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.
muellerr changed title from Pass `DeviceCommunicationIF*` instead of object ID to device handler to Pass DeviceCommunicationIF* instead of object ID to device handler 2022-02-10 13:25:17 +01:00
Sign in to join this conversation.
No Milestone
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: fsfw/fsfw#550
No description provided.