HasParameterIF and ParameterHelper confusing to use #153
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
HasParametersIF
is confusing to implement in its current form and even more confusing to understand.Major issues are confusing naming (Parameter ID contains another Parameter ID, which is accessed via getMatrixId?) , implicit expected structure of parameter packets
(there is a paramerer header which contains type information, column and row, why not use third parameter field inside parameter message to make that expected information explicit to the user?), and no documentation anywhere, at least not in the code.
Also, I still have issues with the concept of getting two wrappers. What wrapper do I use? what is the purpose of
newValues
?Also, in
getParameter
, auin16_t
is passed as the index type, but the getter function returns auint8_t
Suggestions:
getMatrixId()
togetUniqueIdentifierId()
ParameterMessage
, requires CommandMessage refactoring (which unlocks more parameter slots): Expose type, column and row explicitely via setter function for parameter load message.ParameterWrapper
andParameterHelper
. I suggest to convert it to a uint16_t in HasParametersIF and also document that this is actually a linear index, running from left to right, top to bottom for matrices. This changes the meaning of ParameterId_t: The first byte will be the domain ID, the second byte a unique identifier (I assume that there will not be more than 255 parameters for a software object,that would be bad design..). And the third and the fourth byte are going to be the linear index.getParameter
toloadParameter
. A getter always implies read-only, no setting. So this name is already confusing. This will propably be a separatep ull request.`HasParameterIF` and `ParameterHelper` confusing to useto HasParameterIF and ParameterHelper confusing to use