Пример #1
0
void
BlackBoardInterfaceListContent::serialize()
{
  _payload_size = sizeof(msg) + interface_list->buffer_size();
  _payload = malloc(_payload_size);
  copy_payload(0, &msg, sizeof(msg));
  copy_payload(sizeof(msg), interface_list->buffer(), interface_list->buffer_size());
}
Пример #2
0
void
PluginListMessage::serialize()
{
  _payload_size = sizeof(msg) + plugin_list->buffer_size();
  _payload = malloc(_payload_size);
  copy_payload(0, &msg, sizeof(msg));
  copy_payload(sizeof(msg), plugin_list->buffer(), plugin_list->buffer_size());
}
Пример #3
0
message& message::operator=(const message& rhs)
{
	if (&rhs == this)
		return *this;

	delete[] (char*) msg_.payload;
	msg_ = rhs.msg_;
	copy_payload(rhs.msg_.payload, rhs.msg_.payloadlen);
	return *this;
}
Пример #4
0
 void operator()(U & element)
 {
     copy_payload(element, out_);
 }
Пример #5
0
tuple_t* make_tuple(int something, payload_t* payload) {
  tuple_t *tuple = malloc(sizeof(tuple_t));
  tuple->something = something;
  tuple->payload = copy_payload(payload);
  return tuple;
}
Пример #6
0
message::message(const message& other) : msg_(other.msg_)
{
	copy_payload(other.msg_.payload, other.msg_.payloadlen);
}
Пример #7
0
message::message(const MQTTAsync_message& msg) : msg_(msg)
{
	copy_payload(msg.payload, msg.payloadlen);
}
Пример #8
0
message::message(const std::string& payload) 
						: msg_(MQTTAsync_message_initializer)
{
	copy_payload(payload.data(), payload.length());
}
Пример #9
0
message::message(const void* payload, size_t len) 
						: msg_(MQTTAsync_message_initializer)
{
	copy_payload(payload, len);
}
Пример #10
0
void message::set_payload(const void* payload, size_t len)
{
	delete[] (char*) msg_.payload;
	copy_payload(payload, len);
}