add helper methods to disable crc calculation
This commit is contained in:
parent
86692e202d
commit
059fb10558
src/fsfw/tmtcservices
@ -100,6 +100,10 @@ ReturnValue_t CommandingServiceBase::initialize() {
|
|||||||
}
|
}
|
||||||
tmStoreHelper.setTmStore(*tmStore);
|
tmStoreHelper.setTmStore(*tmStore);
|
||||||
}
|
}
|
||||||
|
// Generally, all TM packets will pass through a layer where the sequence count is set.
|
||||||
|
// This avoids duplicate calculation of the CRC16
|
||||||
|
tmStoreHelper.disableCrcCalculation();
|
||||||
|
|
||||||
if (errReporter == nullptr) {
|
if (errReporter == nullptr) {
|
||||||
errReporter =
|
errReporter =
|
||||||
ObjectManager::instance()->get<InternalErrorReporterIF>(objects::INTERNAL_ERROR_REPORTER);
|
ObjectManager::instance()->get<InternalErrorReporterIF>(objects::INTERNAL_ERROR_REPORTER);
|
||||||
|
@ -25,12 +25,16 @@ void setStaticFrameworkObjectIds();
|
|||||||
* relay Telecommands to software bus.
|
* relay Telecommands to software bus.
|
||||||
*
|
*
|
||||||
* It manages Telecommand reception and the generation of Verification Reports
|
* It manages Telecommand reception and the generation of Verification Reports
|
||||||
* similar to PusServiceBase. This class is used if a telecommand can't be
|
* similar to @PusServiceBase. This class is used if a telecommand can't be
|
||||||
* handled immediately and must be relayed to the internal software bus.
|
* handled immediately and must be relayed to the internal software bus.
|
||||||
* - isValidSubservice
|
* - isValidSubservice
|
||||||
* - getMessageQueueAndObject
|
* - getMessageQueueAndObject
|
||||||
* - prepareCommand
|
* - prepareCommand
|
||||||
* - handleReply
|
* - handleReply
|
||||||
|
*
|
||||||
|
* Please note that the TM packets generated by this class will not have a valid CRC. It is
|
||||||
|
* generally assumed that all packets will pass through a layer where the sequence count is set
|
||||||
|
* and the CRC16 needs to be re-calculated anyway.
|
||||||
* @author gaisser
|
* @author gaisser
|
||||||
* @ingroup pus_services
|
* @ingroup pus_services
|
||||||
*/
|
*/
|
||||||
|
@ -74,3 +74,7 @@ uint16_t TmStoreHelper::getApid() const { return creator.getApid(); }
|
|||||||
void TmStoreHelper::setService(uint8_t service) { creator.setService(service); }
|
void TmStoreHelper::setService(uint8_t service) { creator.setService(service); }
|
||||||
|
|
||||||
void TmStoreHelper::setSubservice(uint8_t subservice) { creator.setSubservice(subservice); }
|
void TmStoreHelper::setSubservice(uint8_t subservice) { creator.setSubservice(subservice); }
|
||||||
|
|
||||||
|
void TmStoreHelper::disableCrcCalculation() { creator.disableCrcCalculation(); }
|
||||||
|
|
||||||
|
bool TmStoreHelper::crcCalculationEnabled() const { return creator.crcCalculationEnabled(); }
|
||||||
|
@ -13,6 +13,9 @@ class TmStoreHelper {
|
|||||||
TmStoreHelper(uint16_t defaultApid, StorageManagerIF& tmStore);
|
TmStoreHelper(uint16_t defaultApid, StorageManagerIF& tmStore);
|
||||||
TmStoreHelper(uint16_t defaultApid, StorageManagerIF& tmStore, TimeStamperIF& timeStamper);
|
TmStoreHelper(uint16_t defaultApid, StorageManagerIF& tmStore, TimeStamperIF& timeStamper);
|
||||||
|
|
||||||
|
void disableCrcCalculation();
|
||||||
|
[[nodiscard]] bool crcCalculationEnabled() const;
|
||||||
|
|
||||||
ReturnValue_t preparePacket(uint8_t service, uint8_t subservice, uint16_t counter);
|
ReturnValue_t preparePacket(uint8_t service, uint8_t subservice, uint16_t counter);
|
||||||
|
|
||||||
PusTmCreator& getCreatorRef();
|
PusTmCreator& getCreatorRef();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user