v1.10.0 #220

Merged
meierj merged 592 commits from develop into main 2022-04-22 07:42:20 +02:00
2 changed files with 6 additions and 10 deletions
Showing only changes of commit 2529ed905c - Show all commits

View File

@ -126,21 +126,19 @@ void PCDUHandler::updateHkTableDataset(store_address_t storeId, LocalPoolDataSet
HousekeepingSnapshot packetUpdate(reinterpret_cast<uint8_t*>(datasetTimeStamp), HousekeepingSnapshot packetUpdate(reinterpret_cast<uint8_t*>(datasetTimeStamp),
sizeof(CCSDSTime::CDS_short), dataset); sizeof(CCSDSTime::CDS_short), dataset);
const uint8_t* packet_ptr = NULL; const uint8_t* packet_ptr = nullptr;
size_t size; size_t size = 0;
result = IPCStore->getData(storeId, &packet_ptr, &size); result = IPCStore->getData(storeId, &packet_ptr, &size);
if (result != RETURN_OK) { if (result != RETURN_OK) {
sif::error << "PCDUHandler::updateHkTableDataset: Failed to get data from IPCStore." sif::error << "PCDUHandler::updateHkTableDataset: Failed to get data from IPCStore."
<< std::endl; << std::endl;
} }
dataset->read();
result = packetUpdate.deSerialize(&packet_ptr, &size, SerializeIF::Endianness::MACHINE); result = packetUpdate.deSerialize(&packet_ptr, &size, SerializeIF::Endianness::MACHINE);
if (result != RETURN_OK) { if (result != RETURN_OK) {
sif::error << "PCDUHandler::updateHkTableDataset: Failed to deserialize received packet " sif::error << "PCDUHandler::updateHkTableDataset: Failed to deserialize received packet "
"in hk table dataset" "in hk table dataset"
<< std::endl; << std::endl;
} }
dataset->commit();
result = IPCStore->deleteData(storeId); result = IPCStore->deleteData(storeId);
if (result != RETURN_OK) { if (result != RETURN_OK) {
sif::error << "PCDUHandler::updateHkTableDataset: Failed to delete data in IPCStore" sif::error << "PCDUHandler::updateHkTableDataset: Failed to delete data in IPCStore"
@ -153,8 +151,7 @@ void PCDUHandler::updatePdu2SwitchStates() {
using namespace PDU2; using namespace PDU2;
GOMSPACE::Pdu pdu = GOMSPACE::Pdu::PDU2; GOMSPACE::Pdu pdu = GOMSPACE::Pdu::PDU2;
PoolReadGuard rg0(&switcherSet); PoolReadGuard rg0(&switcherSet);
PoolReadGuard rg1(&pdu2CoreHk); if (rg0.getReadResult() == RETURN_OK) {
if (rg0.getReadResult() == RETURN_OK and rg1.getReadResult() == RETURN_OK) {
for (uint8_t idx = 0; idx < PDU::CHANNELS_LEN; idx++) { for (uint8_t idx = 0; idx < PDU::CHANNELS_LEN; idx++) {
switcherSet.pdu2Switches[idx] = pdu2CoreHk.outputEnables[idx]; switcherSet.pdu2Switches[idx] = pdu2CoreHk.outputEnables[idx];
} }
@ -189,9 +186,8 @@ void PCDUHandler::updatePdu1SwitchStates() {
using namespace pcdu; using namespace pcdu;
using namespace PDU1; using namespace PDU1;
PoolReadGuard rg0(&switcherSet); PoolReadGuard rg0(&switcherSet);
PoolReadGuard rg1(&pdu1CoreHk);
GOMSPACE::Pdu pdu = GOMSPACE::Pdu::PDU1; GOMSPACE::Pdu pdu = GOMSPACE::Pdu::PDU1;
if (rg0.getReadResult() == RETURN_OK and rg1.getReadResult() == RETURN_OK) { if (rg0.getReadResult() == RETURN_OK) {
for (uint8_t idx = 0; idx < PDU::CHANNELS_LEN; idx++) { for (uint8_t idx = 0; idx < PDU::CHANNELS_LEN; idx++) {
switcherSet.pdu1Switches[idx] = pdu1CoreHk.outputEnables[idx]; switcherSet.pdu1Switches[idx] = pdu1CoreHk.outputEnables[idx];
} }
@ -395,7 +391,7 @@ ReturnValue_t PCDUHandler::initializeLocalDataPool(localpool::DataPool& localDat
LocalDataPoolManager& poolManager) { LocalDataPoolManager& poolManager) {
using namespace pcdu; using namespace pcdu;
localDataPoolMap.emplace(PoolIds::PDU1_SWITCHES, &pdu1Switches); localDataPoolMap.emplace(PoolIds::PDU1_SWITCHES, &pdu1Switches);
localDataPoolMap.emplace(PoolIds::PDU1_SWITCHES, &pdu2Switches); localDataPoolMap.emplace(PoolIds::PDU2_SWITCHES, &pdu2Switches);
poolManager.subscribeForPeriodicPacket(switcherSet.getSid(), false, 5.0, true); poolManager.subscribeForPeriodicPacket(switcherSet.getSid(), false, 5.0, true);
return HasReturnvaluesIF::RETURN_OK; return HasReturnvaluesIF::RETURN_OK;
} }

2
tmtc

@ -1 +1 @@
Subproject commit 259cd25b6ed7a88790dff58483537eb250036f00 Subproject commit c995ca2ddac4b352bce34071366a8cee7724973a