Compare commits
8 Commits
mohr/GCC13
...
obj-manage
Author | SHA1 | Date | |
---|---|---|---|
50252e36ef
|
|||
f57db99954
|
|||
4ecd9eb62e | |||
fb89d7a3b6 | |||
146c3471d0 | |||
1816c3f623 | |||
13b97abf0d | |||
9fe8579377 |
@ -10,6 +10,11 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
|
||||
|
||||
## Fixes
|
||||
|
||||
- The `PusTmCreator` API only accepted 255 bytes of source data. It can now accept source
|
||||
data with a size limited only by the size of `size_t`.
|
||||
- Important bugfix in CFDP PDU header format: The entity length field and the transaction sequence
|
||||
number fields stored the actual length of the field instead of the length minus 1 like specified
|
||||
in the CFDP standard.
|
||||
- PUS Health Service: Size check for set health command.
|
||||
Perform operation completion for announce health command.
|
||||
https://egit.irs.uni-stuttgart.de/fsfw/fsfw/pulls/746
|
||||
@ -22,6 +27,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
|
||||
|
||||
- add CFDP subsystem ID
|
||||
https://egit.irs.uni-stuttgart.de/fsfw/fsfw/pulls/742
|
||||
- Added object manager initialization printout failure for `printf` support.
|
||||
|
||||
## Changed
|
||||
- Bump ETL version to 20.35.14
|
||||
|
4
automation/Jenkinsfile
vendored
4
automation/Jenkinsfile
vendored
@ -97,7 +97,7 @@ pipeline {
|
||||
sh 'rsync -r --delete docs/sphinx/* buildfix@documentation.irs.uni-stuttgart.de:/fsfw/development'
|
||||
}
|
||||
}
|
||||
dir(BUILDDIR) {
|
||||
dir(BUILDDIR_LINUX) {
|
||||
sshagent(credentials: ['documentation-buildfix']) {
|
||||
sh 'rsync -r --delete fsfw-tests_coverage/* buildfix@documentation.irs.uni-stuttgart.de:/fsfw/coverage/development'
|
||||
}
|
||||
@ -116,7 +116,7 @@ pipeline {
|
||||
sh 'rsync -r --delete docs/sphinx/* buildfix@documentation.irs.uni-stuttgart.de:/fsfw/master'
|
||||
}
|
||||
}
|
||||
dir(BUILDDIR) {
|
||||
dir(BUILDDIR_LINUX) {
|
||||
sshagent(credentials: ['documentation-buildfix']) {
|
||||
sh 'rsync -r --delete fsfw-tests_coverage/* buildfix@documentation.irs.uni-stuttgart.de:/fsfw/coverage/master'
|
||||
}
|
||||
|
@ -24,8 +24,8 @@ ReturnValue_t HeaderCreator::serialize(uint8_t **buffer, size_t *size, size_t ma
|
||||
*buffer += 1;
|
||||
**buffer = pduDataFieldLen & 0x00ff;
|
||||
*buffer += 1;
|
||||
**buffer = segmentationCtrl << 7 | pduConf.sourceId.getWidth() << 4 | segmentMetadataFlag << 3 |
|
||||
pduConf.seqNum.getWidth();
|
||||
**buffer = segmentationCtrl << 7 | ((pduConf.sourceId.getWidth() - 1) << 4) |
|
||||
segmentMetadataFlag << 3 | (pduConf.seqNum.getWidth() - 1);
|
||||
*buffer += 1;
|
||||
*size += 4;
|
||||
ReturnValue_t result = pduConf.sourceId.serialize(buffer, size, maxSize, streamEndianness);
|
||||
|
@ -78,11 +78,11 @@ cfdp::SegmentationControl PduHeaderReader::getSegmentationControl() const {
|
||||
}
|
||||
|
||||
cfdp::WidthInBytes PduHeaderReader::getLenEntityIds() const {
|
||||
return static_cast<cfdp::WidthInBytes>((pointers.fixedHeader->fourthByte >> 4) & 0x07);
|
||||
return static_cast<cfdp::WidthInBytes>(((pointers.fixedHeader->fourthByte >> 4) & 0b111) + 1);
|
||||
}
|
||||
|
||||
cfdp::WidthInBytes PduHeaderReader::getLenSeqNum() const {
|
||||
return static_cast<cfdp::WidthInBytes>(pointers.fixedHeader->fourthByte & 0x07);
|
||||
return static_cast<cfdp::WidthInBytes>((pointers.fixedHeader->fourthByte & 0b111) + 1);
|
||||
}
|
||||
|
||||
cfdp::SegmentMetadataFlag PduHeaderReader::getSegmentMetadataFlag() const {
|
||||
|
@ -109,13 +109,16 @@ void ObjectManager::initialize() {
|
||||
for (auto const& it : objectList) {
|
||||
result = it.second->initialize();
|
||||
if (result != returnvalue::OK) {
|
||||
#if FSFW_VERBOSE_LEVEL >= 1
|
||||
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
||||
object_id_t var = it.first;
|
||||
sif::error << "ObjectManager::initialize: Object 0x" << std::hex << std::setw(8)
|
||||
<< std::setfill('0') << var
|
||||
<< " failed to "
|
||||
"initialize with code 0x"
|
||||
<< result << std::dec << std::setfill(' ') << std::endl;
|
||||
<< std::setfill('0') << it.first << " failed to initialize with code 0x" << result
|
||||
<< std::dec << std::setfill(' ') << std::endl;
|
||||
#else
|
||||
sif::printError(
|
||||
"ObjectManager::initialize: Object 0x%08x failed to initialize with code 0x%04x\n", var,
|
||||
it.first);
|
||||
#endif
|
||||
#endif
|
||||
errorCount++;
|
||||
}
|
||||
|
@ -40,7 +40,7 @@ struct PusTmParams {
|
||||
size_t dataLen)
|
||||
: secHeader(service, subservice, timeStamper), adapter(data, dataLen), sourceData(&adapter) {}
|
||||
PusTmSecHeader secHeader;
|
||||
SerialBufferAdapter<uint8_t> adapter;
|
||||
SerialBufferAdapter<size_t> adapter;
|
||||
const SerializeIF* sourceData = nullptr;
|
||||
};
|
||||
|
||||
|
@ -97,7 +97,7 @@ TEST_CASE("CFDP Header", "[cfdp]") {
|
||||
REQUIRE(creator.serialize(&serTarget, &serSize, serBuf.size(),
|
||||
SerializeIF::Endianness::BIG) == returnvalue::OK);
|
||||
CHECK(serBuf[0] == 0x3f);
|
||||
CHECK(serBuf[3] == 0x99);
|
||||
CHECK(serBuf[3] == 0x88);
|
||||
REQUIRE(creator.getCrcFlag() == true);
|
||||
REQUIRE(creator.getDirection() == cfdp::Direction::TOWARDS_SENDER);
|
||||
REQUIRE(creator.getLargeFileFlag() == true);
|
||||
@ -127,7 +127,7 @@ TEST_CASE("CFDP Header", "[cfdp]") {
|
||||
REQUIRE(creator.getTransmissionMode() == cfdp::TransmissionMode::UNACKNOWLEDGED);
|
||||
REQUIRE(creator.getSegmentationControl() == true);
|
||||
// Last three bits are 2 now (length of seq number) and bit 1 to bit 3 is 4 (len entity IDs)
|
||||
REQUIRE(serBuf[3] == 0b11001010);
|
||||
REQUIRE(serBuf[3] == 0b10111001);
|
||||
uint32_t entityId = 0;
|
||||
size_t deSerSize = 0;
|
||||
SerializeAdapter::deSerialize(&entityId, serBuf.data() + 4, &deSerSize,
|
||||
@ -175,7 +175,7 @@ TEST_CASE("CFDP Header", "[cfdp]") {
|
||||
REQUIRE(serBuf[1] == 0);
|
||||
REQUIRE(serBuf[2] == 0);
|
||||
// Entity and Transaction Sequence number are 1 byte large
|
||||
REQUIRE(serBuf[3] == 0b00010001);
|
||||
REQUIRE(serBuf[3] == 0b00000000);
|
||||
// Source ID
|
||||
REQUIRE(serBuf[4] == 0);
|
||||
// Transaction Seq Number
|
||||
@ -220,7 +220,7 @@ TEST_CASE("CFDP Header", "[cfdp]") {
|
||||
REQUIRE(serBuf[1] == 0);
|
||||
REQUIRE(serBuf[2] == 0);
|
||||
// Entity and Transaction Sequence number are 1 byte large
|
||||
REQUIRE(serBuf[3] == 0b00010001);
|
||||
REQUIRE(serBuf[3] == 0b00000000);
|
||||
REQUIRE(serSize == 7);
|
||||
// Deser call not strictly necessary
|
||||
auto reader = PduHeaderReader(serBuf.data(), serBuf.size());
|
||||
@ -270,7 +270,7 @@ TEST_CASE("CFDP Header", "[cfdp]") {
|
||||
REQUIRE(reader.parseData() == returnvalue::OK);
|
||||
// Everything except version bit flipped to one now
|
||||
REQUIRE(serBuf[0] == 0x3f);
|
||||
REQUIRE(serBuf[3] == 0b11001010);
|
||||
REQUIRE(serBuf[3] == 0b10111001);
|
||||
REQUIRE(reader.getWholePduSize() == 14);
|
||||
|
||||
REQUIRE(reader.getCrcFlag() == true);
|
||||
|
@ -68,7 +68,7 @@ TEST_CASE("File Data PDU", "[cfdp][pdu]") {
|
||||
// Bits 1 to 3 length of enitity IDs is 2
|
||||
// Bit 4: Segment metadata flag is set
|
||||
// Bit 5 to seven: length of transaction seq num is 2
|
||||
REQUIRE(fileDataBuffer[3] == 0b10101010);
|
||||
REQUIRE(fileDataBuffer[3] == 0b10011001);
|
||||
REQUIRE((fileDataBuffer[10] >> 6) &
|
||||
0b11 == cfdp::RecordContinuationState::CONTAINS_START_AND_END);
|
||||
// Segment metadata length
|
||||
|
@ -30,7 +30,7 @@ TEST_CASE("CFDP File Directive", "[cfdp][pdu]") {
|
||||
REQUIRE(serBuf[1] == 0);
|
||||
REQUIRE(serBuf[2] == 5);
|
||||
// Entity and Transaction Sequence number are 1 byte large
|
||||
REQUIRE(serBuf[3] == 0b00010001);
|
||||
REQUIRE(serBuf[3] == 0b00000000);
|
||||
// Source ID
|
||||
REQUIRE(serBuf[4] == 0);
|
||||
// Transaction Seq Number
|
||||
@ -82,4 +82,4 @@ TEST_CASE("CFDP File Directive", "[cfdp][pdu]") {
|
||||
// Invalid file directive
|
||||
REQUIRE(fdDeser.parseData() == cfdp::INVALID_DIRECTIVE_FIELD);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -33,8 +33,8 @@ TEST_CASE("CFDP Base", "[cfdp]") {
|
||||
// PDU data field length is 5 (4 + Directive code octet)
|
||||
REQUIRE(serBuf[1] == 0);
|
||||
REQUIRE(serBuf[2] == 5);
|
||||
// Entity and Transaction Sequence number are 1 byte large
|
||||
REQUIRE(serBuf[3] == 0b00010001);
|
||||
// Entity and Transaction Sequence number are 1 byte large, value minus one is stored
|
||||
REQUIRE(serBuf[3] == 0b00000000);
|
||||
// Source ID
|
||||
REQUIRE(serBuf[4] == 0);
|
||||
// Transaction Seq Number
|
||||
|
Reference in New Issue
Block a user