Skip to content
Snippets Groups Projects
Commit 2dd350b7 authored by Jens Georg's avatar Jens Georg
Browse files

dummy: Implement read requests

Implements #6523
parent 99ae1f40
No related branches found
No related tags found
No related merge requests found
......@@ -134,6 +134,14 @@ std::string TecDummy::processFrame(const std::string& command) {
result = "!" + parsedFrame[TecFramePart::ADDRESS] + parsedFrame[TecFramePart::SEQUENCE];
result += getCrc(result);
}
else if(parsedFrame[TecFramePart::COMMAND] == "?VR") {
uint32_t parameterId = std::stoul("0x" + parsedFrame[TecFramePart::PARAMETER_ID], 0, 16);
result = "!" + parsedFrame[TecFramePart::ADDRESS] + parsedFrame[TecFramePart::SEQUENCE];
std::stringstream ss;
ss << std::hex << std::setw(8) << std::setfill('0') << rawValues[static_cast<TecFrame::TecParameter>(parameterId)];
result += ss.str();
result += getCrc(result);
}
std::cout << "Returning result " << result << std::endl;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment