2021-10-18 10:54:01 +00:00
|
|
|
#include "stdafx.h"
|
|
|
|
#include "cycle_t.h"
|
|
|
|
|
2021-10-20 22:06:42 +00:00
|
|
|
cycle_t::cycle_t(uint16_t address, uint8_t value, std::string action) noexcept
|
2021-10-18 10:54:01 +00:00
|
|
|
: m_address(address),
|
|
|
|
m_value(value),
|
|
|
|
m_action(action) {}
|
|
|
|
|
2021-10-18 16:19:28 +00:00
|
|
|
cycle_t::cycle_t(simdjson::dom::element input) noexcept
|
2021-10-18 10:54:01 +00:00
|
|
|
: cycle_t(input.get_array()) {}
|
|
|
|
|
2021-10-20 22:06:42 +00:00
|
|
|
cycle_t::cycle_t(simdjson::dom::array input) noexcept
|
|
|
|
: m_address((uint16_t)(int64_t)input.at(0)),
|
|
|
|
m_value((uint8_t)(int64_t)input.at(1)),
|
|
|
|
m_action((std::string)input.at(2)) {}
|