From bba2d883b64675adf77ea0da3928e144b1d6aa54 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Tue, 9 Aug 2022 16:18:45 +0200 Subject: [PATCH] added some documentation --- src/fsfw/cfdp/handler/FaultHandlerBase.h | 21 +++++++++++++++++++++ src/fsfw/cfdp/handler/UserBase.h | 11 +++++++++-- 2 files changed, 30 insertions(+), 2 deletions(-) diff --git a/src/fsfw/cfdp/handler/FaultHandlerBase.h b/src/fsfw/cfdp/handler/FaultHandlerBase.h index 2383f849d..48b9c42ee 100644 --- a/src/fsfw/cfdp/handler/FaultHandlerBase.h +++ b/src/fsfw/cfdp/handler/FaultHandlerBase.h @@ -7,6 +7,27 @@ namespace cfdp { +/** + * @brief Provides a way to implement the fault handling procedures as specified + * in chapter 4.8 of the CFDP standard. + * + * @details + * It is passed into the CFDP handlers as part of the local entity configuration and provides + * a way to specify custom user error handlers. + * + * It does so by mapping each applicable CFDP condition code to a fault handler which + * is denoted by the four @cfdp::FaultHandlerCodes. This code is used to dispatch + * to a user-provided callback function: + * + * 1. @FaultHandlerCodes::IGNORE_ERROR -> @ignore_cb + * 2. @FaultHandlerCodes::NOTICE_OF_CANCELLATION` -> @notice_of_cancellation_cb + * 3. @FaultHandlerCodes::NOTICE_OF_SUSPENSION` -> @notice_of_suspension_cb + * 4. @FaultHandlerCodes::ABANDON_TRANSACTION` -> @abandon_transaction_cb + * + * For each error reported by @reportError, the appropriate fault handler callback + * will be called. The user provides the callbacks by providing a custom class which implements + * these base class and all abstract fault handler callbacks. + */ class FaultHandlerBase { public: virtual ~FaultHandlerBase(); diff --git a/src/fsfw/cfdp/handler/UserBase.h b/src/fsfw/cfdp/handler/UserBase.h index 6c0f372e1..282db9e26 100644 --- a/src/fsfw/cfdp/handler/UserBase.h +++ b/src/fsfw/cfdp/handler/UserBase.h @@ -8,9 +8,16 @@ namespace cfdp { class UserBase { public: /** - * Create a user base class which is used to provides a user interface to interact with CFDP - * handlers. It is also used to pass the Virtual Filestore (VFS) Implementation to the CFDP + * @brief Base class which provides a user interface to interact with CFDP handlers. + * + * @details + * This class is also used to pass the Virtual Filestore (VFS) Implementation to the CFDP * handlers so the filestore operations can be mapped to the underlying filestore. + * + * It is used by implementing it in a child class and then passing it to the CFDP + * handler objects. The base class provides default implementation for the user indication + * primitives specified in the CFDP standard. The user can override these implementations + * to provide custom indication handlers. * @param vfs Virtual Filestore Object. Will be used for all file operations */ explicit UserBase(HasFileSystemIF& vfs);