adding grace period
This commit is contained in:
@@ -66,7 +66,12 @@ void powerSwitch::updateOutletNumber() {
|
||||
|
||||
int returnCode = outletNumberRecord.get(&newNumberOfOutlet);
|
||||
if (returnCode != CM_SUCCESS) {
|
||||
fMfe->Msg(MERROR, __FUNCTION__, "Unable to read outlet record number");
|
||||
if (gracePeriod < 0) {
|
||||
fMfe->Msg(MERROR, __FUNCTION__,
|
||||
"Unable to read outlet record number");
|
||||
} else {
|
||||
gracePeriod--;
|
||||
}
|
||||
}
|
||||
|
||||
if (this->numberOfOutlet < newNumberOfOutlet) {
|
||||
|
||||
@@ -16,8 +16,8 @@ class powerSwitch : public TMFeEquipment {
|
||||
mEpicsCa<int> outletNumberRecord;
|
||||
int numberOfOutlet;
|
||||
std::string equipmentPath;
|
||||
|
||||
void updateOutletNumber();
|
||||
int gracePeriod = 10;
|
||||
|
||||
void sendCommand(int index);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user