souce data setter function
This commit is contained in:
parent
483a47d353
commit
7bc29fc2d5
@ -102,6 +102,11 @@ void TmPacketBase::initializeTmPacket(uint16_t apid, uint8_t service, uint8_t su
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void TmPacketBase::setSourceData(uint8_t* sourceData, size_t sourceSize) {
|
||||||
|
memcpy(getSourceData(), sourceData, sourceSize);
|
||||||
|
setSourceDataSize(sourceSize);
|
||||||
|
}
|
||||||
|
|
||||||
void TmPacketBase::setSourceDataSize(uint16_t size) {
|
void TmPacketBase::setSourceDataSize(uint16_t size) {
|
||||||
setPacketDataLength(size + sizeof(PUSTmDataFieldHeader) + CRC_SIZE - 1);
|
setPacketDataLength(size + sizeof(PUSTmDataFieldHeader) + CRC_SIZE - 1);
|
||||||
}
|
}
|
||||||
|
@ -125,6 +125,13 @@ public:
|
|||||||
* current content of the packet.
|
* current content of the packet.
|
||||||
*/
|
*/
|
||||||
void setErrorControl();
|
void setErrorControl();
|
||||||
|
/**
|
||||||
|
* This sets the source data. It copies the provided data to
|
||||||
|
* the internal TmPacketPointer.
|
||||||
|
* @param sourceData
|
||||||
|
* @param sourceSize
|
||||||
|
*/
|
||||||
|
void setSourceData(uint8_t* sourceData, size_t sourceSize);
|
||||||
/**
|
/**
|
||||||
* With this method, the packet data pointer can be redirected to another
|
* With this method, the packet data pointer can be redirected to another
|
||||||
* location.
|
* location.
|
||||||
|
Loading…
Reference in New Issue
Block a user