2016-06-15 23:48:41 +02:00
|
|
|
/**
|
|
|
|
* @file Farm1StateLockout.cpp
|
|
|
|
* @brief This file defines the Farm1StateLockout class.
|
|
|
|
* @date 24.04.2013
|
|
|
|
* @author baetz
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-08-13 20:53:35 +02:00
|
|
|
#include "ClcwIF.h"
|
|
|
|
#include "Farm1StateLockout.h"
|
|
|
|
#include "TcTransferFrame.h"
|
|
|
|
#include "VirtualChannelReception.h"
|
2016-06-15 23:48:41 +02:00
|
|
|
Farm1StateLockout::Farm1StateLockout(VirtualChannelReception* setMyVC) : myVC(setMyVC) {
|
|
|
|
}
|
|
|
|
|
|
|
|
ReturnValue_t Farm1StateLockout::handleADFrame(TcTransferFrame* frame,
|
|
|
|
ClcwIF* clcw) {
|
|
|
|
return FARM_IN_LOCKOUT;
|
|
|
|
}
|
|
|
|
|
|
|
|
ReturnValue_t Farm1StateLockout::handleBCUnlockCommand(ClcwIF* clcw) {
|
|
|
|
myVC->farmBCounter++;
|
|
|
|
clcw->setRetransmitFlag(false);
|
|
|
|
clcw->setLockoutFlag( false );
|
|
|
|
clcw->setWaitFlag( false );
|
|
|
|
myVC->currentState = &(myVC->openState);
|
|
|
|
return BC_IS_UNLOCK_COMMAND;
|
|
|
|
}
|
|
|
|
|
|
|
|
ReturnValue_t Farm1StateLockout::handleBCSetVrCommand(ClcwIF* clcw,
|
|
|
|
uint8_t vr) {
|
|
|
|
myVC->farmBCounter++;
|
|
|
|
return BC_IS_SET_VR_COMMAND;
|
|
|
|
}
|