embedded/IoTaLibEmbedded/IoTaLibEmbedded/DataCapsule.cpp
//Used for transparentally generating specifically addressed capsules from broadcast capsule
Used for transparentally generating specifically addressed capsules from broadcast capsule
Used for transparentally generating specifically addressed capsules from broadcast capsule
DataCapsule::DataCapsule(DataCapsule *bcastCap, long newDest)
{
	this->destination = newDest;
	this->source = bcastCap->source;
	this->funcId = bcastCap->funcId;
	this->dataSize = bcastCap->dataSize;
	if (this->dataSize <= 256) {
		memcpy(this->data, bcastCap->data, dataSize);
		this->dataSize = dataSize;
	}
}
DataCapsule :: DataCapsule ( DataCapsule * bcastCap , long newDest ) { this -> destination = newDest ; this -> source = bcastCap -> source ; this -> funcId = bcastCap -> funcId ; this -> dataSize = bcastCap -> dataSize ; if ( this -> dataSize <= 256 ) { memcpy ( this -> data , bcastCap -> data , dataSize ) ; this -> dataSize = dataSize ; } }
Used for transparentally generating specifically addressed capsules from broadcast capsule
Used for transparentally generating specifically addressed capsules from broadcast capsule