// // Created by robin on 6/27/15. // #include #include "ScBasicCommand.h" ScBasicCommand::ScBasicCommand(const std::string &data) { DWORD size = 0; for (auto c : data) { if (isxdigit(c)) ++size; } auto d = new BYTE[size]; size = 0; for (int i = 0; i < data.size(); ++i) { auto c = data[i]; if (isxdigit(c)) d[size++] = hexToDec(c); } _data = ScByteArray(d, size); } ScBasicCommand::~ScBasicCommand() { } ScByteArray ScBasicCommand::getData() const { return _data; }