2016-01-02 03:02:34 -08:00
|
|
|
/*----------------------------------------------------------------------------*/
|
2017-01-01 01:05:57 -07:00
|
|
|
/* Copyright (c) FIRST 2016-2017. All Rights Reserved. */
|
2016-01-02 03:02:34 -08:00
|
|
|
/* Open Source Software - may be modified and shared by FRC teams. The code */
|
|
|
|
|
/* must be accompanied by the FIRST BSD license file in the root directory of */
|
|
|
|
|
/* the project. */
|
|
|
|
|
/*----------------------------------------------------------------------------*/
|
|
|
|
|
|
2014-06-23 15:12:58 -04:00
|
|
|
#pragma once
|
|
|
|
|
|
2017-07-09 22:27:43 -04:00
|
|
|
#include "Commands/Command.h"
|
2014-06-23 15:12:58 -04:00
|
|
|
|
2016-11-01 22:33:12 -07:00
|
|
|
namespace frc {
|
|
|
|
|
|
2015-06-25 15:07:55 -04:00
|
|
|
class MockCommand : public Command {
|
|
|
|
|
public:
|
|
|
|
|
MockCommand();
|
2016-09-06 00:01:45 -07:00
|
|
|
int32_t GetInitializeCount() { return m_initializeCount; }
|
2015-06-25 15:07:55 -04:00
|
|
|
bool HasInitialized();
|
|
|
|
|
|
2016-09-06 00:01:45 -07:00
|
|
|
int32_t GetExecuteCount() { return m_executeCount; }
|
|
|
|
|
int32_t GetIsFinishedCount() { return m_isFinishedCount; }
|
2015-06-25 15:07:55 -04:00
|
|
|
bool IsHasFinished() { return m_hasFinished; }
|
|
|
|
|
void SetHasFinished(bool hasFinished) { m_hasFinished = hasFinished; }
|
2016-09-06 00:01:45 -07:00
|
|
|
int32_t GetEndCount() { return m_endCount; }
|
2015-06-25 15:07:55 -04:00
|
|
|
bool HasEnd();
|
|
|
|
|
|
2016-09-06 00:01:45 -07:00
|
|
|
int32_t GetInterruptedCount() { return m_interruptedCount; }
|
2015-06-25 15:07:55 -04:00
|
|
|
bool HasInterrupted();
|
2017-01-02 00:44:35 -08:00
|
|
|
|
|
|
|
|
protected:
|
|
|
|
|
void Initialize() override;
|
|
|
|
|
void Execute() override;
|
|
|
|
|
bool IsFinished() override;
|
|
|
|
|
void End() override;
|
|
|
|
|
void Interrupted() override;
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
int32_t m_initializeCount;
|
|
|
|
|
int32_t m_executeCount;
|
|
|
|
|
int32_t m_isFinishedCount;
|
|
|
|
|
bool m_hasFinished;
|
|
|
|
|
int32_t m_endCount;
|
|
|
|
|
int32_t m_interruptedCount;
|
2014-06-23 15:12:58 -04:00
|
|
|
};
|
2016-11-01 22:33:12 -07:00
|
|
|
|
|
|
|
|
} // namespace frc
|