v1.15.0 #311

Merged
muellerr merged 107 commits from develop into main 2022-10-27 11:28:49 +02:00
3 changed files with 26 additions and 34 deletions
Showing only changes of commit e781da1be4 - Show all commits

View File

@ -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 {

View File

@ -103,17 +103,9 @@ namespace P60System {
enum class BatteryModes : uint8_t { CRITICAL = 1, SAFE = 2, NORMAL = 3, FULL = 4 };
enum class SetIds : uint32_t {
PDU_1_CORE = 1,
PDU_1_AUX = 2,
PDU_2_CORE = 3,
PDU_2_AUX = 4,
P60_CORE = 5,
P60_AUX = 6,
ACU_CORE = 7,
ACU_AUX = 8,
PDU_1_CONFIG = 9,
PDU_2_CONFIG = 10
CORE = 1,
AUX = 2,
CONFIG = 3
};
} // namespace P60System
@ -217,10 +209,10 @@ static const uint8_t HK_TABLE_ENTRIES = 100;
class CoreHkSet : public StaticLocalDataSet<16> {
public:
CoreHkSet(HasLocalDataPoolIF* owner)
: StaticLocalDataSet(owner, static_cast<uint32_t>(::P60System::SetIds::P60_CORE)) {}
: StaticLocalDataSet(owner, static_cast<uint32_t>(::P60System::SetIds::CORE)) {}
CoreHkSet(object_id_t objectId)
: StaticLocalDataSet(sid_t(objectId, static_cast<uint32_t>(::P60System::SetIds::P60_CORE))) {}
: StaticLocalDataSet(sid_t(objectId, static_cast<uint32_t>(::P60System::SetIds::CORE))) {}
/** Measured output currents */
lp_vec_t<int16_t, P60Dock::hk::Index::CHNLS_LEN> currents =
@ -254,10 +246,10 @@ class CoreHkSet : public StaticLocalDataSet<16> {
class HkTableDataset : public StaticLocalDataSet<32> {
public:
HkTableDataset(HasLocalDataPoolIF* owner)
: StaticLocalDataSet(owner, static_cast<uint32_t>(::P60System::SetIds::P60_AUX)) {}
: StaticLocalDataSet(owner, static_cast<uint32_t>(::P60System::SetIds::AUX)) {}
HkTableDataset(object_id_t objectId)
: StaticLocalDataSet(sid_t(objectId, static_cast<uint32_t>(::P60System::SetIds::P60_AUX))) {}
: StaticLocalDataSet(sid_t(objectId, static_cast<uint32_t>(::P60System::SetIds::AUX))) {}
/** Number of detected latchups on each output channel */
lp_vec_t<uint16_t, P60Dock::hk::Index::CHNLS_LEN> latchups =
@ -545,25 +537,25 @@ static const uint16_t CONFIG_ADDRESS_OUT_EN_CHANNEL8 = 0x50;
class Pdu1CoreHk : public ::PDU::PduCoreHk {
public:
Pdu1CoreHk(HasLocalDataPoolIF* owner)
: PduCoreHk(owner, static_cast<uint32_t>(::P60System::SetIds::PDU_1_CORE)) {}
: PduCoreHk(owner, static_cast<uint32_t>(::P60System::SetIds::CORE)) {}
Pdu1CoreHk(object_id_t objectId)
: PduCoreHk(objectId, static_cast<uint32_t>(::P60System::SetIds::PDU_1_CORE)) {}
: PduCoreHk(objectId, static_cast<uint32_t>(::P60System::SetIds::CORE)) {}
};
class Pdu1AuxHk : public ::PDU::PduAuxHk {
public:
Pdu1AuxHk(HasLocalDataPoolIF* owner)
: PduAuxHk(owner, static_cast<uint32_t>(::P60System::SetIds::PDU_1_AUX)) {}
: PduAuxHk(owner, static_cast<uint32_t>(::P60System::SetIds::AUX)) {}
Pdu1AuxHk(object_id_t objectId)
: PduAuxHk(objectId, static_cast<uint32_t>(::P60System::SetIds::PDU_1_AUX)) {}
: PduAuxHk(objectId, static_cast<uint32_t>(::P60System::SetIds::AUX)) {}
};
class Pdu1Config : public ::PDU::PduConfig {
public:
Pdu1Config(HasLocalDataPoolIF* owner)
: PduConfig(owner, static_cast<uint32_t>(::P60System::SetIds::PDU_1_CONFIG)) {}
: PduConfig(owner, static_cast<uint32_t>(::P60System::SetIds::CONFIG)) {}
};
} // namespace PDU1
@ -600,25 +592,25 @@ static const uint16_t CONFIG_ADDRESS_OUT_EN_PAYLOAD_CAMERA = 0x50;
class Pdu2CoreHk : public ::PDU::PduCoreHk {
public:
Pdu2CoreHk(HasLocalDataPoolIF* owner)
: PduCoreHk(owner, static_cast<uint32_t>(::P60System::SetIds::PDU_2_CORE)) {}
: PduCoreHk(owner, static_cast<uint32_t>(::P60System::SetIds::CORE)) {}
Pdu2CoreHk(object_id_t objectId)
: PduCoreHk(objectId, static_cast<uint32_t>(::P60System::SetIds::PDU_2_CORE)) {}
: PduCoreHk(objectId, static_cast<uint32_t>(::P60System::SetIds::CORE)) {}
};
class Pdu2AuxHk : public ::PDU::PduAuxHk {
public:
Pdu2AuxHk(HasLocalDataPoolIF* owner)
: PduAuxHk(owner, static_cast<uint32_t>(::P60System::SetIds::PDU_2_AUX)) {}
: PduAuxHk(owner, static_cast<uint32_t>(::P60System::SetIds::AUX)) {}
Pdu2AuxHk(object_id_t objectId)
: PduAuxHk(objectId, static_cast<uint32_t>(::P60System::SetIds::PDU_2_AUX)) {}
: PduAuxHk(objectId, static_cast<uint32_t>(::P60System::SetIds::AUX)) {}
};
class Pdu2Config : public ::PDU::PduConfig {
public:
Pdu2Config(HasLocalDataPoolIF* owner)
: PduConfig(owner, static_cast<uint32_t>(::P60System::SetIds::PDU_2_CONFIG)) {}
: PduConfig(owner, static_cast<uint32_t>(::P60System::SetIds::CONFIG)) {}
};
} // namespace PDU2
@ -661,10 +653,10 @@ static const size_t MAX_REPLY_SIZE = HK_TABLE_SIZE;
class CoreHk : public StaticLocalDataSet<14> {
public:
CoreHk(HasLocalDataPoolIF* owner)
: StaticLocalDataSet(owner, static_cast<uint32_t>(::P60System::SetIds::ACU_CORE)) {}
: StaticLocalDataSet(owner, static_cast<uint32_t>(::P60System::SetIds::CORE)) {}
CoreHk(object_id_t objectId)
: StaticLocalDataSet(sid_t(objectId, static_cast<uint32_t>(::P60System::SetIds::ACU_CORE))) {}
: StaticLocalDataSet(sid_t(objectId, static_cast<uint32_t>(::P60System::SetIds::CORE))) {}
lp_var_t<uint8_t> mpptMode = lp_var_t<uint8_t>(sid.objectId, pool::ACU_MPPT_MODE, this);
@ -694,10 +686,10 @@ class CoreHk : public StaticLocalDataSet<14> {
class AuxHk : public StaticLocalDataSet<12> {
public:
AuxHk(HasLocalDataPoolIF* owner)
: StaticLocalDataSet(owner, static_cast<uint32_t>(::P60System::SetIds::ACU_AUX)) {}
: StaticLocalDataSet(owner, static_cast<uint32_t>(::P60System::SetIds::AUX)) {}
AuxHk(object_id_t objectId)
: StaticLocalDataSet(sid_t(objectId, static_cast<uint32_t>(::P60System::SetIds::ACU_AUX))) {}
: StaticLocalDataSet(sid_t(objectId, static_cast<uint32_t>(::P60System::SetIds::AUX))) {}
lp_vec_t<uint8_t, 3> dacEnables = lp_vec_t<uint8_t, 3>(sid.objectId, pool::ACU_DAC_ENABLES, this);

2
tmtc

@ -1 +1 @@
Subproject commit 8655f0c9e6158c460e1f8bc02e73a9310e33b18f
Subproject commit 9171f23d9373fcba6b75d2f75d1b4764180bb7b5