doc improved, some functions virtual now

This commit is contained in:
Robin Müller 2020-11-03 23:39:56 +01:00
parent cf7385d64e
commit 5efbc7496a

View File

@ -27,9 +27,16 @@ class HousekeepingPacketUpdate;
* @brief This class is the managing instance for the local data pool. * @brief This class is the managing instance for the local data pool.
* @details * @details
* The actual data pool structure is a member of this class. Any class which * The actual data pool structure is a member of this class. Any class which
* has a local data pool shall have this class as a member and implement * has a local data pool shall have this manager class as a member and implement
* the HasLocalDataPoolIF. * the HasLocalDataPoolIF.
* *
* The manager offers some adaption points and functions which can be used
* by the owning class to simplify data handling significantly.
*
* Please ensure that both initialize and initializeAfterTaskCreation are
* called at some point by the owning class in the respective functions of the
* same name!
*
* Users of the data pool use the helper classes LocalDataSet, * Users of the data pool use the helper classes LocalDataSet,
* LocalPoolVariable and LocalPoolVector to access pool entries in * LocalPoolVariable and LocalPoolVector to access pool entries in
* a thread-safe and efficient way. * a thread-safe and efficient way.
@ -67,14 +74,16 @@ public:
* initialize() has to be called in any case before using the object! * initialize() has to be called in any case before using the object!
* @param owner * @param owner
* @param queueToUse * @param queueToUse
* @param appendValidityBuffer * @param appendValidityBuffer Specify whether a buffer containing the
* validity state is generated when serializing or deserializing packets.
*/ */
LocalDataPoolManager(HasLocalDataPoolIF* owner, MessageQueueIF* queueToUse, LocalDataPoolManager(HasLocalDataPoolIF* owner, MessageQueueIF* queueToUse,
bool appendValidityBuffer = true); bool appendValidityBuffer = true);
virtual~ LocalDataPoolManager(); virtual~ LocalDataPoolManager();
/** /**
* Assigns the queue to use. * Assigns the queue to use. Make sure to call this in the #initialize
* function of the owner.
* @param queueToUse * @param queueToUse
* @param nonDiagInvlFactor See #setNonDiagnosticIntervalFactor doc * @param nonDiagInvlFactor See #setNonDiagnosticIntervalFactor doc
* @return * @return
@ -84,20 +93,24 @@ public:
/** /**
* Initializes the map by calling the map initialization function and * Initializes the map by calling the map initialization function and
* setting the periodic factor for non-diagnostic packets. * setting the periodic factor for non-diagnostic packets.
* Don't forget to call this, otherwise the map will be invalid! * Don't forget to call this in the #initializeAfterTaskCreation call of
* the owner, otherwise the map will be invalid!
* @param nonDiagInvlFactor * @param nonDiagInvlFactor
* @return * @return
*/ */
ReturnValue_t initializeAfterTaskCreation(uint8_t nonDiagInvlFactor = 5); ReturnValue_t initializeAfterTaskCreation(
uint8_t nonDiagInvlFactor = 5);
/** /**
* @brief This should be called in the periodic handler of the owner. * @brief This should be called in the periodic handler of the owner.
* @details * @details
* This in generally called in the #performOperation function of the owner.
* It performs all the periodic functionalities of the data pool manager, * It performs all the periodic functionalities of the data pool manager,
* for example generating periodic HK packets. * for example generating periodic HK packets.
* Marked virtual as an adaption point for custom data pool managers.
* @return * @return
*/ */
ReturnValue_t performHkOperation(); virtual ReturnValue_t performHkOperation();
/** /**
* @brief Subscribe for the generation of periodic packets. * @brief Subscribe for the generation of periodic packets.
@ -185,7 +198,7 @@ public:
* @param message * @param message
* @return * @return
*/ */
ReturnValue_t handleHousekeepingMessage(CommandMessage* message); virtual ReturnValue_t handleHousekeepingMessage(CommandMessage* message);
/** /**
* Generate a housekeeping packet with a given SID. * Generate a housekeeping packet with a given SID.