#include "tcpackettosend.h" TCPacketToSend::TCPacketToSend(char *Value, unsigned int count, char targetLogicalAddress, char userApplication, unsigned int delay, QObject *parent) : QObject(parent) { this->Value = (char*) malloc(count); for(unsigned int i=0; iValue[i] = Value[i]; // local copy of the data pointed by Value } this->count = count; this->targetLogicalAddress = targetLogicalAddress; this->userApplication = userApplication; this->delay = delay; } TCPacketToSend::~TCPacketToSend() { free(this->Value); }