hasactionsIF include guard and doc
This commit is contained in:
parent
2ecd7c4493
commit
6f4682e1c8
@ -1,5 +1,5 @@
|
|||||||
#ifndef HASACTIONSIF_H_
|
#ifndef FRAMEWORK_ACTION_HASACTIONSIF_H_
|
||||||
#define HASACTIONSIF_H_
|
#define FRAMEWORK_ACTION_HASACTIONSIF_H_
|
||||||
|
|
||||||
#include <framework/action/ActionHelper.h>
|
#include <framework/action/ActionHelper.h>
|
||||||
#include <framework/action/ActionMessage.h>
|
#include <framework/action/ActionMessage.h>
|
||||||
@ -11,22 +11,26 @@
|
|||||||
* Interface for component which uses actions
|
* Interface for component which uses actions
|
||||||
*
|
*
|
||||||
* @details
|
* @details
|
||||||
* This interface is used to execute actions in the component. Actions, in the sense of this interface, are activities with a well-defined beginning and
|
* This interface is used to execute actions in the component. Actions, in the
|
||||||
* end in time. They may adjust sub-states of components, but are not supposed to change
|
* sense of this interface, are activities with a well-defined beginning and
|
||||||
* the main mode of operation, which is handled with the HasModesIF described below.
|
* end in time. They may adjust sub-states of components, but are not supposed
|
||||||
|
* to change the main mode of operation, which is handled with the HasModesIF
|
||||||
|
* described below.
|
||||||
*
|
*
|
||||||
* The HasActionsIF allows components to define such actions and make them available
|
* The HasActionsIF allows components to define such actions and make them
|
||||||
* for other components to use. Implementing the interface is straightforward: There’s a
|
* available for other components to use. Implementing the interface is
|
||||||
* single executeAction call, which provides an identifier for the action to execute, as well
|
* straightforward: There’s a single executeAction call, which provides an
|
||||||
* as arbitrary parameters for input. Aside from direct, software-based
|
* identifier for the action to execute, as well as arbitrary parameters for
|
||||||
* actions, it is used in device handler components as an interface to forward commands to
|
* input.
|
||||||
* devices.
|
* Aside from direct, software-based actions, it is used in device handler
|
||||||
* Implementing components of the interface are supposed to check identifier (ID) and
|
* components as an interface to forward commands to devices.
|
||||||
* parameters and immediately start execution of the action. It is, however, not required to
|
* Implementing components of the interface are supposed to check identifier
|
||||||
* immediately finish execution. Instead, this may be deferred to a later point in time, at
|
* (ID) and parameters and immediately start execution of the action.
|
||||||
* which the component needs to inform the caller about finished or failed execution.
|
* It is, however, not required to immediately finish execution.
|
||||||
|
* Instead, this may be deferred to a later point in time, at which the
|
||||||
|
* component needs to inform the caller about finished or failed execution.
|
||||||
*
|
*
|
||||||
* \ingroup interfaces
|
* @ingroup interfaces
|
||||||
*/
|
*/
|
||||||
class HasActionsIF {
|
class HasActionsIF {
|
||||||
public:
|
public:
|
||||||
@ -43,13 +47,14 @@ public:
|
|||||||
virtual MessageQueueId_t getCommandQueue() const = 0;
|
virtual MessageQueueId_t getCommandQueue() const = 0;
|
||||||
/**
|
/**
|
||||||
* Execute or initialize the execution of a certain function.
|
* Execute or initialize the execution of a certain function.
|
||||||
* Returning #EXECUTION_FINISHED or a failure code, nothing else needs to be done.
|
* Returning #EXECUTION_FINISHED or a failure code, nothing else needs to
|
||||||
* When needing more steps, return RETURN_OK and issue steps and completion manually.
|
* be done. When needing more steps, return RETURN_OK and issue steps and
|
||||||
|
* completion manually.
|
||||||
* One "step failed" or completion report must be issued!
|
* One "step failed" or completion report must be issued!
|
||||||
*/
|
*/
|
||||||
virtual ReturnValue_t executeAction(ActionId_t actionId, MessageQueueId_t commandedBy,
|
virtual ReturnValue_t executeAction(ActionId_t actionId,
|
||||||
const uint8_t* data, size_t size) = 0;
|
MessageQueueId_t commandedBy, const uint8_t* data, size_t size) = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
#endif /* HASACTIONSIF_H_ */
|
#endif /* FRAMEWORK_ACTION_HASACTIONSIF_H_ */
|
||||||
|
Loading…
Reference in New Issue
Block a user