Added comments in AssemblyBase and SubsystemBase
This commit is contained in:
parent
03ef63302b
commit
06631d06a5
@ -24,6 +24,13 @@
|
|||||||
* 1. check logic when active-> checkChildrenStateOn
|
* 1. check logic when active-> checkChildrenStateOn
|
||||||
* 2. transition logic to change the mode -> commandChildren
|
* 2. transition logic to change the mode -> commandChildren
|
||||||
*
|
*
|
||||||
|
* Important:
|
||||||
|
*
|
||||||
|
* The implementation must call registerChild(object_id_t child)
|
||||||
|
* for all commanded children during initialization.
|
||||||
|
* The implementation must call the initialization function of the base class.
|
||||||
|
* (This will call the function in SubsystemBase)
|
||||||
|
*
|
||||||
*/
|
*/
|
||||||
class AssemblyBase: public SubsystemBase {
|
class AssemblyBase: public SubsystemBase {
|
||||||
public:
|
public:
|
||||||
@ -41,9 +48,6 @@ public:
|
|||||||
virtual ~AssemblyBase();
|
virtual ~AssemblyBase();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
// SHOULDDO: Change that OVERWRITE_HEALTH may be returned
|
|
||||||
// (or return internalState directly?)
|
|
||||||
/**
|
/**
|
||||||
* Command children to reach [mode,submode] combination
|
* Command children to reach [mode,submode] combination
|
||||||
* Can be done by setting #commandsOutstanding correctly,
|
* Can be done by setting #commandsOutstanding correctly,
|
||||||
@ -68,6 +72,18 @@ protected:
|
|||||||
virtual ReturnValue_t checkChildrenStateOn(Mode_t wantedMode,
|
virtual ReturnValue_t checkChildrenStateOn(Mode_t wantedMode,
|
||||||
Submode_t wantedSubmode) = 0;
|
Submode_t wantedSubmode) = 0;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check whether a combination of mode and submode is valid.
|
||||||
|
*
|
||||||
|
* Ground Controller like precise return values from HasModesIF.
|
||||||
|
* So, please return any of them.
|
||||||
|
*
|
||||||
|
* @param mode The targeted mode
|
||||||
|
* @param submode The targeted submmode
|
||||||
|
* @return Any information why this combination is invalid from HasModesIF
|
||||||
|
* like HasModesIF::INVALID_SUBMODE.
|
||||||
|
* On success return HasReturnvaluesIF::RETURN_OK
|
||||||
|
*/
|
||||||
virtual ReturnValue_t isModeCombinationValid(Mode_t mode,
|
virtual ReturnValue_t isModeCombinationValid(Mode_t mode,
|
||||||
Submode_t submode) = 0;
|
Submode_t submode) = 0;
|
||||||
|
|
||||||
|
@ -37,6 +37,17 @@ public:
|
|||||||
|
|
||||||
virtual MessageQueueId_t getCommandQueue() const override;
|
virtual MessageQueueId_t getCommandQueue() const override;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Function to register the child objects.
|
||||||
|
* Performs a checks if the child does implement HasHealthIF and/or HasModesIF
|
||||||
|
*
|
||||||
|
* Also adds them to the internal childrenMap.
|
||||||
|
*
|
||||||
|
* @param objectId
|
||||||
|
* @return RETURN_OK if successful
|
||||||
|
* CHILD_DOESNT_HAVE_MODES if Child is no HasHealthIF and no HasModesIF
|
||||||
|
* COULD_NOT_INSERT_CHILD If the Child could not be added to the ChildrenMap
|
||||||
|
*/
|
||||||
ReturnValue_t registerChild(object_id_t objectId);
|
ReturnValue_t registerChild(object_id_t objectId);
|
||||||
|
|
||||||
virtual ReturnValue_t initialize() override;
|
virtual ReturnValue_t initialize() override;
|
||||||
|
Loading…
Reference in New Issue
Block a user