42 #ifdef SIMPLE_MESSAGE_MOTOPLUS
53 namespace smpl_msg_connection
67 sendBuffer.
load(msgData);
68 rtn = this->sendBytes(sendBuffer);
73 LOG_ERROR(
"Message validation failed, message not sent");
82 return receiveMsg(message, -1);
95 rtn = this->receiveBytes(lengthBuffer, message.
getLengthSize(), timeout_ms);
99 rtn = lengthBuffer.
unload(length);
100 LOG_COMM(
"Message length: %d", length);
104 rtn = this->receiveBytes(msgBuffer, length, timeout_ms);
108 rtn = message.
init(msgBuffer);
112 LOG_ERROR(
"Failed to initialize message");
125 LOG_ERROR(
"Failed to receive message length");
135 return sendAndReceiveMsg(send, recv, -1, verbose);
142 rtn = this->sendMsg(send);
148 rtn = this->receiveMsg(recv, timeout_ms);