Today's the day. Renamed platform to framework.
This commit is contained in:
51
modes/ModeHelper.h
Normal file
51
modes/ModeHelper.h
Normal file
@ -0,0 +1,51 @@
|
||||
#ifndef MODEHELPER_H_
|
||||
#define MODEHELPER_H_
|
||||
|
||||
#include <framework/ipc/MessageQueueSender.h>
|
||||
#include <framework/modes/ModeMessage.h>
|
||||
#include <framework/returnvalues/HasReturnvaluesIF.h>
|
||||
#include <framework/timemanager/Countdown.h>
|
||||
|
||||
class HasModesIF;
|
||||
|
||||
class ModeHelper {
|
||||
public:
|
||||
MessageQueueId_t theOneWhoCommandedAMode;
|
||||
Mode_t commandedMode;
|
||||
Submode_t commandedSubmode;
|
||||
|
||||
ModeHelper(HasModesIF *owner);
|
||||
virtual ~ModeHelper();
|
||||
|
||||
ReturnValue_t handleModeCommand(CommandMessage *message);
|
||||
|
||||
/**
|
||||
*
|
||||
* @param parentQueue the Queue id of the parent object. Set to 0 if no parent present
|
||||
*/
|
||||
void setParentQueue(MessageQueueId_t parentQueueId);
|
||||
|
||||
ReturnValue_t initialize(MessageQueueId_t parentQueueId);
|
||||
|
||||
ReturnValue_t initialize(void); //void is there to stop eclipse CODAN from falsely reporting an error
|
||||
|
||||
void modeChanged(Mode_t mode, Submode_t submode);
|
||||
|
||||
void startTimer(uint32_t timeoutMs);
|
||||
|
||||
bool isTimedOut();
|
||||
|
||||
bool isForced();
|
||||
|
||||
void setForced(bool forced);
|
||||
protected:
|
||||
HasModesIF *owner;
|
||||
MessageQueueId_t parentQueueId;
|
||||
|
||||
Countdown countdown;
|
||||
MessageQueueSender sender;
|
||||
|
||||
bool forced;
|
||||
};
|
||||
|
||||
#endif /* MODEHELPER_H_ */
|
Reference in New Issue
Block a user