4 #include "protocol/command_table.h" 12 std::memcpy(header, &PROTOCOL_VERS, Block::VersionProtocol);
14 DateTime datetime(boost::posix_time::second_clock::universal_time());
16 std::memcpy(header + Block::VersionProtocol + Block::Command, &datetime, Block::Datetime);
19 virtual const void* get_header()
const override {
return header; }
20 virtual void* get_header()
override {
return header; }
21 virtual const void* get_data()
const override {
return nullptr; }
22 virtual void* get_data()
override {
return nullptr; }
24 virtual uint16_t get_protocol_version()
const override {
return *(uint16_t*)header; }
26 virtual TypeCommand get_type()
const override {
return TypeCommand::Unknown; }
27 virtual TypeCommand get_type_data()
const override {
return (TypeCommand) *(header + Block::VersionProtocol); }
29 virtual DateTime get_datetime()
const override 32 std::memcpy(&dt, header + Block::VersionProtocol + Block::Command, Block::Datetime);
36 virtual uint32_t get_length_data()
const override {
return 0; }
39 char header[Block::Header];
42 using response_ptr = std::shared_ptr<Response>;
Definition: command_table.h:73