Wyatt  1.0.1
MockIRRangeFinderSensorMessage.cpp
1 //
2 // Created by Tucker Haydon on 4/25/17.
3 //
4 
5 #include "MockIRRangeFinderSensorMessage.h"
6 
7 MockIRRangeFinderSensorMessage::MockIRRangeFinderSensorMessage(Hardware hardware, std::string data) : IMessage(hardware) {
8  this->data = data;
9 }
10 
11 MockIRRangeFinderSensorMessage::~MockIRRangeFinderSensorMessage() {
12  // Nothing.
13 }
14 
15 std::string MockIRRangeFinderSensorMessage::getData() {
16  return this->data;
17 }
18 
20  std::string serial;
21  serial.append(1, hardware.address);
22  serial.append((char*)(&(this->data)), 8);
23  return serial;
24 }
25 
26