From 950a48078c6464decada0262f5590c75c5d35a6f Mon Sep 17 00:00:00 2001 From: "Robin.Mueller" Date: Thu, 5 Dec 2019 12:21:06 +0100 Subject: [PATCH] some documentation, question about HasParametersIF, variable in ParameterHelper intialized (compiler warning) --- devicehandlers/DeviceCommunicationIF.h | 6 ++--- devicehandlers/DeviceHandlerBase.h | 36 ++++++++++++-------------- parameters/HasParametersIF.h | 1 + parameters/ParameterHelper.cpp | 2 +- 4 files changed, 21 insertions(+), 24 deletions(-) diff --git a/devicehandlers/DeviceCommunicationIF.h b/devicehandlers/DeviceCommunicationIF.h index 10ad2776..ca0e9fe2 100644 --- a/devicehandlers/DeviceCommunicationIF.h +++ b/devicehandlers/DeviceCommunicationIF.h @@ -5,10 +5,10 @@ #include /** - * Documentation: Dissertation Baetz p.138 - * - * This is an interface to decouple device communication from + * @brief This is an interface to decouple device communication from * the device handler to allow reuse of these components. + * @details + * Documentation: Dissertation Baetz p.138 * It works with the assumption that received data * is polled by a component. There are four generic steps of device communication: * diff --git a/devicehandlers/DeviceHandlerBase.h b/devicehandlers/DeviceHandlerBase.h index d489ada1..e7ac3aa6 100644 --- a/devicehandlers/DeviceHandlerBase.h +++ b/devicehandlers/DeviceHandlerBase.h @@ -331,9 +331,10 @@ protected: uint32_t parameter = 0); /** - * - - * @param parameter2 additional parameter + * Send reply to a command, differentiate between raw command + * and normal command. + * @param status + * @param parameter */ void replyToCommand(ReturnValue_t status, uint32_t parameter = 0); @@ -532,10 +533,9 @@ protected: size_t commandDataLen) = 0; /** - * fill the #deviceCommandMap - * - * called by the initialize() of the base class - * + * @brief fill the #deviceCommandMap + * called by the initialize() of the base class + * @details * This is used to let the base class know which replies are expected. * There are different scenarios regarding this: * - "Normal" commands. These are commands, that trigger a direct reply from the device. In this case, the id of the command should be added to the command map @@ -556,9 +556,9 @@ protected: * perform debugging * @details Example: Calling this in performOperation * to track values like mode. - * @param positionTracker Provide the child handler a way to know where the debugInterface was called - * @param objectId Provide the child handler object Id to specify actions for spefic devices - * @param parameter Supply a parameter of interest + * @param positionTracker Provide the child handler a way to know where the debugInterface was called + * @param objectId Provide the child handler object Id to specify actions for spefic devices + * @param parameter Supply a parameter of interest * Please delete all debugInterface calls in DHB after debugging is finished ! */ virtual void debugInterface(uint8_t positionTracker = 0, object_id_t objectId = 0, uint32_t parameter = 0); @@ -766,7 +766,7 @@ protected: /** * Used to retrieve logical address - * @return + * @return logicalAddress */ virtual uint32_t getLogicalAddress(); Mode_t getBaseMode(Mode_t transitionMode); @@ -863,12 +863,8 @@ protected: ActionHelper actionHelper; - - private: - - /** * State a cookie is in. * @@ -957,11 +953,6 @@ private: void buildRawDeviceCommand(CommandMessage* message); void buildInternalCommand(void); -// /** -// * Send a reply with the current mode and submode. -// */ -// void announceMode(void); - /** * Decrement the counter for the timout of replies. * @@ -1066,6 +1057,11 @@ private: */ ReturnValue_t switchCookieChannel(object_id_t newChannelId); + /** + * Handle device handler messages (e.g. commands sent by PUS Service 2) + * @param message + * @return + */ ReturnValue_t handleDeviceHandlerMessage(CommandMessage *message); diff --git a/parameters/HasParametersIF.h b/parameters/HasParametersIF.h index fbb69445..cd053fee 100644 --- a/parameters/HasParametersIF.h +++ b/parameters/HasParametersIF.h @@ -46,6 +46,7 @@ public: * @param startAtIndex * @return */ + // shouldnt startAtIndex be uint8? virtual ReturnValue_t getParameter(uint8_t domainId, uint16_t parameterId, ParameterWrapper *parameterWrapper, const ParameterWrapper *newValues, uint16_t startAtIndex) = 0; diff --git a/parameters/ParameterHelper.cpp b/parameters/ParameterHelper.cpp index 75b71a7e..6ebc9e62 100644 --- a/parameters/ParameterHelper.cpp +++ b/parameters/ParameterHelper.cpp @@ -3,7 +3,7 @@ #include ParameterHelper::ParameterHelper(ReceivesParameterMessagesIF* owner) : - owner(owner), storage(NULL) { + owner(owner), ownerQueueId(0), storage(NULL){ }