simplify power set ID handling
This commit is contained in:
@ -52,7 +52,7 @@ ReturnValue_t PCDUHandler::initialize() {
|
||||
return returnvalue::FAILED;
|
||||
}
|
||||
result = pdu2Handler->getSubscriptionInterface()->subscribeForSetUpdateMessage(
|
||||
static_cast<uint32_t>(P60System::SetIds::PDU_2_CORE), this->getObjectId(),
|
||||
static_cast<uint32_t>(P60System::SetIds::CORE), this->getObjectId(),
|
||||
commandQueue->getId(), true);
|
||||
if (result != returnvalue::OK) {
|
||||
sif::error << "PCDUHandler::initialize: Failed to subscribe for set update messages from "
|
||||
@ -68,7 +68,7 @@ ReturnValue_t PCDUHandler::initialize() {
|
||||
return returnvalue::FAILED;
|
||||
}
|
||||
result = pdu1Handler->getSubscriptionInterface()->subscribeForSetUpdateMessage(
|
||||
static_cast<uint32_t>(P60System::SetIds::PDU_1_CORE), this->getObjectId(),
|
||||
static_cast<uint32_t>(P60System::SetIds::CORE), this->getObjectId(),
|
||||
commandQueue->getId(), true);
|
||||
if (result != returnvalue::OK) {
|
||||
sif::error << "PCDUHandler::initialize: Failed to subscribe for set update messages from "
|
||||
@ -110,11 +110,11 @@ void PCDUHandler::readCommandQueue() {
|
||||
MessageQueueId_t PCDUHandler::getCommandQueue() const { return commandQueue->getId(); }
|
||||
|
||||
void PCDUHandler::handleChangedDataset(sid_t sid, store_address_t storeId, bool* clearMessage) {
|
||||
if (sid == sid_t(objects::PDU2_HANDLER, static_cast<uint32_t>(P60System::SetIds::PDU_2_CORE))) {
|
||||
if (sid == sid_t(objects::PDU2_HANDLER, static_cast<uint32_t>(P60System::SetIds::CORE))) {
|
||||
updateHkTableDataset(storeId, &pdu2CoreHk, &timeStampPdu2HkDataset);
|
||||
updatePdu2SwitchStates();
|
||||
} else if (sid ==
|
||||
sid_t(objects::PDU1_HANDLER, static_cast<uint32_t>(P60System::SetIds::PDU_1_CORE))) {
|
||||
sid_t(objects::PDU1_HANDLER, static_cast<uint32_t>(P60System::SetIds::CORE))) {
|
||||
updateHkTableDataset(storeId, &pdu1CoreHk, &timeStampPdu1HkDataset);
|
||||
updatePdu1SwitchStates();
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user