#include #include "JkBmsSerialMessage.h" #include "MessageOutput.h" namespace JkBms { SerialCommand::SerialCommand(SerialCommand::Command cmd) : SerialMessage(20, 0x00) { set(_raw.begin(), startMarker); set(_raw.begin() + 2, static_cast(_raw.size() - 2)); // frame length set(_raw.begin() + 8, static_cast(cmd)); set(_raw.begin() + 9, static_cast(Source::Host)); set(_raw.begin() + 10, static_cast(Type::Command)); set(_raw.end() - 5, endMarker); updateChecksum(); } using Label = JkBms::DataPointLabel; template