some more minor fixes
This commit is contained in:
parent
356d778743
commit
4e571e5082
@ -263,7 +263,8 @@ void CommandingServiceBase::handleRequestQueue() {
|
|||||||
object_id_t objectId;
|
object_id_t objectId;
|
||||||
for (result = requestQueue->receiveMessage(&message); result == RETURN_OK;
|
for (result = requestQueue->receiveMessage(&message); result == RETURN_OK;
|
||||||
result = requestQueue->receiveMessage(&message)) {
|
result = requestQueue->receiveMessage(&message)) {
|
||||||
result = setUpTcReader(message.getStorageId());
|
address = message.getStorageId();
|
||||||
|
result = setUpTcReader(address);
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != HasReturnvaluesIF::RETURN_OK) {
|
||||||
// TODO: Warning?
|
// TODO: Warning?
|
||||||
rejectPacket(tcverif::START_FAILURE, address, result);
|
rejectPacket(tcverif::START_FAILURE, address, result);
|
||||||
|
@ -140,12 +140,15 @@ void PusServiceBase::setErrorReporter(InternalErrorReporterIF& errReporter_) {
|
|||||||
psbParams.errReporter = &errReporter_;
|
psbParams.errReporter = &errReporter_;
|
||||||
}
|
}
|
||||||
|
|
||||||
void PusServiceBase::initializeTmHelpers(TmSendHelper& tmSendHelper, TmStoreHelper& tmStoreHelper) {
|
ReturnValue_t PusServiceBase::initializeTmHelpers(TmSendHelper& tmSendHelper, TmStoreHelper& tmStoreHelper) {
|
||||||
initializeTmSendHelper(tmSendHelper);
|
ReturnValue_t result = initializeTmSendHelper(tmSendHelper);
|
||||||
initializeTmStoreHelper(tmStoreHelper);
|
if(result != HasReturnvaluesIF::RETURN_OK) {
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
return initializeTmStoreHelper(tmStoreHelper);
|
||||||
}
|
}
|
||||||
|
|
||||||
void PusServiceBase::initializeTmSendHelper(TmSendHelper& tmSendHelper) {
|
ReturnValue_t PusServiceBase::initializeTmSendHelper(TmSendHelper& tmSendHelper) {
|
||||||
if (psbParams.reqQueue != nullptr) {
|
if (psbParams.reqQueue != nullptr) {
|
||||||
tmSendHelper.setMsgQueue(*psbParams.reqQueue);
|
tmSendHelper.setMsgQueue(*psbParams.reqQueue);
|
||||||
tmSendHelper.setDefaultDestination(psbParams.reqQueue->getDefaultDestination());
|
tmSendHelper.setDefaultDestination(psbParams.reqQueue->getDefaultDestination());
|
||||||
@ -160,16 +163,29 @@ void PusServiceBase::initializeTmSendHelper(TmSendHelper& tmSendHelper) {
|
|||||||
} else {
|
} else {
|
||||||
tmSendHelper.setInternalErrorReporter(*psbParams.errReporter);
|
tmSendHelper.setInternalErrorReporter(*psbParams.errReporter);
|
||||||
}
|
}
|
||||||
|
return RETURN_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
void PusServiceBase::initializeTmStoreHelper(TmStoreHelper& tmStoreHelper) const {
|
ReturnValue_t PusServiceBase::initializeTmStoreHelper(TmStoreHelper& tmStoreHelper) const {
|
||||||
tmStoreHelper.setApid(psbParams.apid);
|
tmStoreHelper.setApid(psbParams.apid);
|
||||||
|
if(tmStoreHelper.getTmStore() == nullptr) {
|
||||||
|
auto* tmStore = ObjectManager::instance()->get<StorageManagerIF>(objects::TM_STORE);
|
||||||
|
if(tmStore == nullptr) {
|
||||||
|
return ObjectManagerIF::CHILD_INIT_FAILED;
|
||||||
|
}
|
||||||
|
tmStoreHelper.setTmStore(*tmStore);
|
||||||
|
}
|
||||||
|
|
||||||
if (psbParams.timeStamper == nullptr) {
|
if (psbParams.timeStamper == nullptr) {
|
||||||
auto timerStamper = ObjectManager::instance()->get<TimeStamperIF>(objects::TIME_STAMPER);
|
auto timerStamper = ObjectManager::instance()->get<TimeStamperIF>(objects::TIME_STAMPER);
|
||||||
if (timerStamper != nullptr) {
|
if (timerStamper != nullptr) {
|
||||||
tmStoreHelper.setTimeStamper(*timerStamper);
|
tmStoreHelper.setTimeStamper(*timerStamper);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// Generally, all TM packets will pass through a layer where the sequence count is set.
|
||||||
|
// This avoids duplicate calculation of the CRC16
|
||||||
|
tmStoreHelper.disableCrcCalculation();
|
||||||
|
return RETURN_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
void PusServiceBase::setVerificationReporter(VerificationReporterIF& reporter) {
|
void PusServiceBase::setVerificationReporter(VerificationReporterIF& reporter) {
|
||||||
|
@ -132,19 +132,19 @@ class PusServiceBase : public ExecutableObjectIF,
|
|||||||
* Helper methods if the implementing class wants to send telemetry
|
* Helper methods if the implementing class wants to send telemetry
|
||||||
* @param tmSendHelper
|
* @param tmSendHelper
|
||||||
*/
|
*/
|
||||||
void initializeTmSendHelper(TmSendHelper& tmSendHelper);
|
ReturnValue_t initializeTmSendHelper(TmSendHelper& tmSendHelper);
|
||||||
/**
|
/**
|
||||||
* Helper methods if the implementing class wants to store telemetry. It will set the correct APID
|
* Helper methods if the implementing class wants to store telemetry. It will set the correct APID
|
||||||
* and it will also attempt to set a valid time stamper. If the manually specified time stamper is
|
* and it will also attempt to set a valid time stamper. If the manually specified time stamper is
|
||||||
* null, it will attempt to find a suitable one using @objects::TIME_STAMPER
|
* null, it will attempt to find a suitable one using @objects::TIME_STAMPER
|
||||||
* @param tmSendHelper
|
* @param tmSendHelper
|
||||||
*/
|
*/
|
||||||
void initializeTmStoreHelper(TmStoreHelper& tmStoreHelper) const;
|
ReturnValue_t initializeTmStoreHelper(TmStoreHelper& tmStoreHelper) const;
|
||||||
/**
|
/**
|
||||||
* Helper methods if the implementing class wants to both send and store telemetry
|
* Helper methods if the implementing class wants to both send and store telemetry
|
||||||
* @param tmSendHelper
|
* @param tmSendHelper
|
||||||
*/
|
*/
|
||||||
void initializeTmHelpers(TmSendHelper& tmSendHelper, TmStoreHelper& tmStoreHelper);
|
ReturnValue_t initializeTmHelpers(TmSendHelper& tmSendHelper, TmStoreHelper& tmStoreHelper);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief The handleRequest method shall handle any kind of Telecommand
|
* @brief The handleRequest method shall handle any kind of Telecommand
|
||||||
|
Loading…
Reference in New Issue
Block a user