19#ifndef SRC_SUPLA_DEVICE_FACTORY_TEST_H_
20#define SRC_SUPLA_DEVICE_FACTORY_TEST_H_
22#include <supla/action_handler.h>
23#include <supla/element.h>
32 TestStage_RegisteredAndReady = 2,
33 TestStage_WaitForCfgButton = 3,
39 TestAction_CfgButtonOnPress = 11000,
40 TestAction_DeviceStatusChange = 11101
58 void handleAction(
int event,
int action)
override;
60 virtual int16_t getManufacturerId();
61 virtual void waitForConfigButtonPress();
62 virtual bool checkTestStep();
64 void setTestFailed(
int reason);
65 void setTestFinished();
66 Supla::TestStage getTestStage()
const;
68 void dontCheckAutomaticFirmwareUpdate();
71 bool testFailed =
false;
72 bool testFinished =
false;
73 bool waitForRegisteredAndReady =
true;
74 bool testingMachineEnabled =
true;
76 uint32_t timeoutS = 30;
77 uint32_t initTimestamp = 0;
78 Supla::TestStage testStage = Supla::TestStage_None;
83 bool checkAutomaticFirmwareUpdate =
true;
Definition SuplaDevice.h:97
Definition action_handler.h:21
FactoryTest(SuplaDeviceClass *sdc, uint32_t timeoutS)
Construct a new Factory Test object.
Definition factory_test.cpp:36
void iterateAlways() override
Method called on each SuplaDevice iteration.
Definition factory_test.cpp:238
void onInit() override
Third method called on element in SuplaDevice.begin()
Definition factory_test.cpp:47
Base class for all elements of SuplaDevice.
Definition element.h:37