14 "power",
"caps",
"kana",
"pause",
"turbo",
"FDD"
24 , msxCliComm(msxCliComm_)
25 , interp(commandController.getInterpreter())
30 std::string name = getLedName(
static_cast<Led>(i));
31 ledStatus[i] = std::make_unique<ReadOnlySetting>(
32 commandController,
tmpStrCat(
"led_", name),
33 "Current status for LED",
42 if (ledValue[led] == status)
return;
43 ledValue[led] = status;
50 auto diff = now - lastTime;
63 void LedStatus::handleEvent(Led led) noexcept
65 std::string_view str = ledValue[led] ?
"on":
"off";
66 ledStatus[led]->setReadOnlyValue(
TclObject(str));
70 void LedStatus::executeRT()
73 if (ledValue[i] != ledStatus[i]->getValue().getBoolean(interp)) {
74 handleEvent(
static_cast<Led>(i));
LedStatus(RTScheduler &rtScheduler, CommandController &commandController, MSXCliComm &msxCliComm)
void setLed(Led led, bool status)
void scheduleRT(uint64_t delta)
uint64_t getTime()
Get current (real) time in us.
This file implemented 3 utility functions:
TemporaryString tmpStrCat(Ts &&... ts)
constexpr auto xrange(T e)