blob: 743bf290c719fccfece40f4773af2d376bd99cef [file] [log] [blame]
George Liuc777bef2020-11-23 17:04:21 +08001#include "config.h"
2
3#include "lamptest.hpp"
4
5namespace phosphor
6{
7namespace led
8{
9
10void LampTest::stop()
11{
12 timer.setEnabled(false);
13}
14
15void LampTest::start()
16{
17 // restart lamp test, it contains initiate or reset the timer.
18 timer.restart(std::chrono::seconds(LAMP_TEST_TIMEOUT_IN_SECS));
19}
20
21void LampTest::timeOutHandler()
22{
23 // set the Asserted property of lamp test to false
24}
25
26void LampTest::requestHandler(bool value)
27{
28 if (value)
29 {
30 start();
31 }
32 else
33 {
34 stop();
35 }
36}
37
38} // namespace led
39} // namespace phosphor