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.
31 lines
593 B
31 lines
593 B
/*
|
|
* Request.hpp
|
|
*
|
|
* Created on: Jul 14, 2021
|
|
* Author: Andreas Berthoud
|
|
*/
|
|
|
|
#ifndef REQUEST_HPP_
|
|
#define REQUEST_HPP_
|
|
|
|
#include "Command.hpp"
|
|
#include "Response.hpp"
|
|
|
|
class Request : public Command {
|
|
public:
|
|
Request(com_channel_type_t com_channel_type, uint8_t * payload_ptr, uint16_t size);
|
|
|
|
bool execute() override;
|
|
|
|
virtual Response * execute_request(com_channel_type_t com_channel_type, uint16_t response_identifier) = 0;
|
|
|
|
protected:
|
|
int buffer_offset = 2;
|
|
|
|
private:
|
|
uint16_t response_identifier;
|
|
com_channel_type_t com_channel_type;
|
|
|
|
};
|
|
|
|
#endif /* REQUEST_HPP_ */
|
|
|