You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

20 lines
527 B

/*
* Request.cpp
*
* Created on: Jul 14, 2021
* Author: Andreas Berthoud
*/
#include "Request.hpp"
Request::Request(com_channel_type_t com_channel_type, uint8_t * payload_ptr, uint16_t size)
: Command(), com_channel_type(com_channel_type) {
this->response_identifier = payload_ptr[0] << 8 | payload_ptr[1];
}
bool Request::execute() {
Response * response = this->execute_request(this->com_channel_type, this->response_identifier);
bool result = response->execute();
delete response;
return result;
}