2018-04-03 15:11:06 +00:00
|
|
|
#pragma once
|
|
|
|
#include "../../dml/Record.h"
|
|
|
|
#include "MessageBuilder.h"
|
|
|
|
#include <string>
|
|
|
|
|
|
|
|
namespace ki
|
|
|
|
{
|
|
|
|
namespace protocol
|
|
|
|
{
|
|
|
|
namespace dml
|
|
|
|
{
|
|
|
|
class MessageTemplate
|
|
|
|
{
|
|
|
|
public:
|
2018-04-06 03:14:37 +00:00
|
|
|
MessageTemplate(std::string name, uint8_t type,
|
|
|
|
uint8_t service_id, ki::dml::Record *record);
|
2018-04-03 15:11:06 +00:00
|
|
|
~MessageTemplate();
|
|
|
|
|
|
|
|
std::string get_name() const;
|
|
|
|
void set_name(std::string name);
|
|
|
|
|
|
|
|
uint8_t get_type() const;
|
|
|
|
void set_type(uint8_t type);
|
|
|
|
|
2018-04-06 03:14:37 +00:00
|
|
|
uint8_t get_service_id() const;
|
|
|
|
void set_service_id(uint8_t service_id);
|
|
|
|
|
2018-04-03 15:11:06 +00:00
|
|
|
const ki::dml::Record &get_record() const;
|
|
|
|
void set_record(ki::dml::Record *record);
|
|
|
|
|
2018-04-05 16:36:26 +00:00
|
|
|
MessageBuilder &build_message() const;
|
2018-04-03 15:11:06 +00:00
|
|
|
private:
|
|
|
|
std::string m_name;
|
|
|
|
uint8_t m_type;
|
2018-04-06 03:14:37 +00:00
|
|
|
uint8_t m_service_id;
|
2018-04-03 15:11:06 +00:00
|
|
|
ki::dml::Record *m_record;
|
|
|
|
};
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|