v1.10.0 #220
@ -126,21 +126,19 @@ void PCDUHandler::updateHkTableDataset(store_address_t storeId, LocalPoolDataSet
|
||||
|
||||
HousekeepingSnapshot packetUpdate(reinterpret_cast<uint8_t*>(datasetTimeStamp),
|
||||
sizeof(CCSDSTime::CDS_short), dataset);
|
||||
const uint8_t* packet_ptr = NULL;
|
||||
size_t size;
|
||||
const uint8_t* packet_ptr = nullptr;
|
||||
size_t size = 0;
|
||||
result = IPCStore->getData(storeId, &packet_ptr, &size);
|
||||
if (result != RETURN_OK) {
|
||||
sif::error << "PCDUHandler::updateHkTableDataset: Failed to get data from IPCStore."
|
||||
<< std::endl;
|
||||
}
|
||||
dataset->read();
|
||||
result = packetUpdate.deSerialize(&packet_ptr, &size, SerializeIF::Endianness::MACHINE);
|
||||
if (result != RETURN_OK) {
|
||||
sif::error << "PCDUHandler::updateHkTableDataset: Failed to deserialize received packet "
|
||||
"in hk table dataset"
|
||||
<< std::endl;
|
||||
}
|
||||
dataset->commit();
|
||||
result = IPCStore->deleteData(storeId);
|
||||
if (result != RETURN_OK) {
|
||||
sif::error << "PCDUHandler::updateHkTableDataset: Failed to delete data in IPCStore"
|
||||
@ -153,8 +151,7 @@ void PCDUHandler::updatePdu2SwitchStates() {
|
||||
using namespace PDU2;
|
||||
GOMSPACE::Pdu pdu = GOMSPACE::Pdu::PDU2;
|
||||
PoolReadGuard rg0(&switcherSet);
|
||||
PoolReadGuard rg1(&pdu2CoreHk);
|
||||
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++) {
|
||||
switcherSet.pdu2Switches[idx] = pdu2CoreHk.outputEnables[idx];
|
||||
}
|
||||
@ -189,9 +186,8 @@ void PCDUHandler::updatePdu1SwitchStates() {
|
||||
using namespace pcdu;
|
||||
using namespace PDU1;
|
||||
PoolReadGuard rg0(&switcherSet);
|
||||
PoolReadGuard rg1(&pdu1CoreHk);
|
||||
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++) {
|
||||
switcherSet.pdu1Switches[idx] = pdu1CoreHk.outputEnables[idx];
|
||||
}
|
||||
@ -395,7 +391,7 @@ ReturnValue_t PCDUHandler::initializeLocalDataPool(localpool::DataPool& localDat
|
||||
LocalDataPoolManager& poolManager) {
|
||||
using namespace pcdu;
|
||||
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);
|
||||
return HasReturnvaluesIF::RETURN_OK;
|
||||
}
|
||||
|
2
tmtc
2
tmtc
@ -1 +1 @@
|
||||
Subproject commit 259cd25b6ed7a88790dff58483537eb250036f00
|
||||
Subproject commit c995ca2ddac4b352bce34071366a8cee7724973a
|
Loading…
Reference in New Issue
Block a user