DeviceHandlerBase: All Refactoring #44
No reviewers
Labels
No Label
API Change
Breaking API Change
bug
build
cosmetics
Documentation
duplicate
feature
help wanted
hotfix
invalid
question
Refactor
Tests
wontfix
No Milestone
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: fsfw/fsfw#44
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "KSat/fsfw:mueller_DeviceHandlerBase_AllRefactoring"
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?
This fixes #19 .
This fixes #41 .
However, the changes discussed on 01.04 includes more than just DeviceCommunicationIF, so maybe a new issue would be good to discuss all the changes I coded.
Repitition of points from #19:
Unfortunately, there are some several API changes after looking at this topic and implementing the SPI and I2C communication interfaces for SOURCE.
I also found out that an separate initialization function called in the DeviceHandlerBase (that was
open()
, I renamed it toinitializeInterface()
) is still needed because I need to initialize data structures in the communication interface implementation with information stored inside the cookie (e.g. for a map of addresses to Com Status information).Here is a list of the various changes. I have several branches which implemented subsets of these changes, but I think it would be best to gather them into one pull request as they are connected to each other.
Some clarification required:
What is the meaning of the returnvalues located in DHB, and the ones in DeviceHandlerIF? Did I understand correctly that the returnvalues in DHB alter the behaviour of DHB while the returnvalues in DeviceHandlerIF are just error codes? If it is supposed to be like that, I suggest moving the rest of the error codes (2-3 left I think) to DeviceHandlerIF too.
UPDATE: Actually, the returnvalues of DHB are "private" to DHB, so its okay like that.
Cookie
orCookieIF
Renamed to CookieIF (see #41 ), functionality stays the same.
Documentation added. There is a separate pull request #42 but this change is also included in #44.
How to integrate change: Rename Cookie to CookieIF
DeviceHandlerBase
No diff for header file , needs to be diffed from command line.
Constructor/API changes
Functional changes
switchCookieChannel
function commented out for nowIts value can be set in insertInCommandReplyMap on device handler initialization (or updateCommandReplyMap). It is used to pass the correct replyLength in the
requestReceiveMessage()
call to the communication interface.Documentation / Formatting / Code Style etc.
DeviceHandlerBase.h
I did not understand (line 350).Enhancement
How to integrate change
initializeInterface()
function callDeviceCommunicationIF
getParameter()
/setParameter()
andsetAddress()
/getAddress()
removed for nowreOpen()
removedopen()
replaced byinitializeInterface(CookieIF* cookie)
sendMessage()
data pointer is constantrequestReceiveMessage()
also supplies a replyLength in addition to the cookie. If a sequential communication system is used, the correct replyLength should be taken from the reply map and will be passed to the communication interface. Otherwise, 0 is passed and the communication interface can device to read everything or nothing.NO_REPLY_RECEIVED
, which can be used inreceiveRequestedReply()
to explicitely state that no reply was received.How to integrate change
DeviceHandlerIF
I think there was some issue with the indentation.
I improved the readability of this file by writing the explanation
of the modes above the mode definitions and keeping to the 80 column widht limit
(hope that did not break code parsers).
I also renamed the RmapAction to CommunicationAction (more generic name).
Label: API Change, Documentation, Enhancement
muellerr referenced this pull request2020-04-19 20:47:40 +02:00
muellerr referenced this pull request2020-04-19 20:54:46 +02:00
mueller_DeviceHandlerBase_AllRefactoringto DeviceHandlerBase: All Refactoring