updated print commands for PDUs
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
This commit is contained in:
@ -1,7 +1,7 @@
|
||||
#include <fsfw/datapool/PoolReadGuard.h>
|
||||
#include "OBSWConfig.h"
|
||||
#include "PDU1Handler.h"
|
||||
#include <mission/devices/devicedefinitions/GomSpacePackets.h>
|
||||
#include <OBSWConfig.h>
|
||||
|
||||
#include <fsfw/datapool/PoolReadGuard.h>
|
||||
|
||||
PDU1Handler::PDU1Handler(object_id_t objectId, object_id_t comIF, CookieIF * comCookie) :
|
||||
GomspaceDeviceHandler(objectId, comIF, comCookie, PDU::MAX_CONFIGTABLE_ADDRESS,
|
||||
@ -72,27 +72,6 @@ void PDU1Handler::letChildHandleHkReply(DeviceCommandId_t id, const uint8_t *pac
|
||||
#endif
|
||||
}
|
||||
|
||||
void PDU1Handler::printOutputSwitchStates() {
|
||||
sif::info << "PDU1 TCS Board switch: " <<
|
||||
static_cast<unsigned int>(pdu1HkTableDataset.outEnabledTCSBoard3V3.value) << std::endl;
|
||||
sif::info << "PDU1 Syrlinks switch: " <<
|
||||
static_cast<unsigned int>(pdu1HkTableDataset.outEnabledSyrlinks.value) << std::endl;
|
||||
sif::info << "PDU1 star tracker switch: " <<
|
||||
static_cast<unsigned int>(pdu1HkTableDataset.outEnabledStarTracker.value) << std::endl;
|
||||
sif::info << "PDU1 MGT switch: " <<
|
||||
static_cast<unsigned int>(pdu1HkTableDataset.outEnabledMGT.value) << std::endl;
|
||||
sif::info << "PDU1 SUS nominal switch: " <<
|
||||
static_cast<unsigned int>(pdu1HkTableDataset.outEnabledSUSNominal.value) << std::endl;
|
||||
sif::info << "PDU1 solar cell experiment switch: " <<
|
||||
static_cast<unsigned int>(pdu1HkTableDataset.outEnabledSolarCellExp.value) << std::endl;
|
||||
sif::info << "PDU1 PLOC switch: " <<
|
||||
static_cast<unsigned int>(pdu1HkTableDataset.outEnabledPLOC.value) << std::endl;
|
||||
sif::info << "PDU1 ACS Side A switch: " <<
|
||||
static_cast<unsigned int>(pdu1HkTableDataset.outEnabledAcsBoardSideA.value) << std::endl;
|
||||
sif::info << "PDU1 channel 8 switch: " <<
|
||||
static_cast<unsigned int>(pdu1HkTableDataset.outEnabledChannel8.value) << std::endl;
|
||||
}
|
||||
|
||||
void PDU1Handler::parseHkTableReply(const uint8_t *packet) {
|
||||
uint16_t dataOffset = 0;
|
||||
PoolReadGuard pg(&pdu1HkTableDataset);
|
||||
@ -356,14 +335,14 @@ ReturnValue_t PDU1Handler::initializeLocalDataPool(
|
||||
|
||||
ReturnValue_t PDU1Handler::printStatus(DeviceCommandId_t cmd) {
|
||||
switch(cmd) {
|
||||
case(GOMSPACE::PRINT_OUT_ENB_STATUS): {
|
||||
case(GOMSPACE::PRINT_HK_TABLE): {
|
||||
PoolReadGuard pg(&pdu1HkTableDataset);
|
||||
ReturnValue_t readResult = pg.getReadResult();
|
||||
if(readResult != HasReturnvaluesIF::RETURN_OK) {
|
||||
sif::warning << "Reading PDU1 HK table failed!" << std::endl;
|
||||
return HasReturnvaluesIF::RETURN_FAILED;
|
||||
}
|
||||
printOutputSwitchStates();
|
||||
printHkTable();
|
||||
return HasReturnvaluesIF::RETURN_OK;
|
||||
}
|
||||
default: {
|
||||
@ -371,3 +350,53 @@ ReturnValue_t PDU1Handler::printStatus(DeviceCommandId_t cmd) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void PDU1Handler::printHkTable() {
|
||||
sif::info << "PDU1 Info: SwitchState, Voltages [mV], Currents [mA]" << std::endl;
|
||||
sif::info << std::setw(30) << std::left << "TCS Board" << std::dec << "| " <<
|
||||
unsigned(pdu1HkTableDataset.outEnabledTCSBoard3V3.value) << ", " <<
|
||||
std::setw(4) << std::right <<
|
||||
pdu1HkTableDataset.currentOutTCSBoard3V3.value << ", " << std::setw(4) <<
|
||||
pdu1HkTableDataset.voltageOutTCSBoard3V3.value << std::endl;
|
||||
sif::info << std::setw(30) << std::left << "Syrlinks" << std::dec << "| " <<
|
||||
unsigned(pdu1HkTableDataset.outEnabledSyrlinks.value) << ", " <<
|
||||
std::setw(4) << std::right <<
|
||||
pdu1HkTableDataset.currentOutSyrlinks.value << ", " << std::setw(4) <<
|
||||
pdu1HkTableDataset.currentOutSyrlinks.value << std::endl;
|
||||
sif::info << std::setw(30) << std::left << "Star Tracker" << std::dec << "| " <<
|
||||
static_cast<unsigned int>(pdu1HkTableDataset.outEnabledStarTracker.value) << ", " <<
|
||||
std::setw(4) << std::right <<
|
||||
pdu1HkTableDataset.currentOutStarTracker.value << ", " << std::setw(4) <<
|
||||
pdu1HkTableDataset.voltageOutStarTracker.value << std::endl;
|
||||
sif::info << std::setw(30) << std::left << "MGT" << std::dec << "| " <<
|
||||
static_cast<unsigned int>(pdu1HkTableDataset.outEnabledMGT.value) << ", " <<
|
||||
std::setw(4) << std::right <<
|
||||
pdu1HkTableDataset.currentOutMGT.value << ", " << std::setw(4) <<
|
||||
pdu1HkTableDataset.voltageOutMGT.value << std::endl;
|
||||
sif::info << std::setw(30) << std::left << "SuS nominal" << std::dec << "| " <<
|
||||
static_cast<unsigned int>(pdu1HkTableDataset.outEnabledSUSNominal.value) << ", " <<
|
||||
std::setw(4) << std::right <<
|
||||
pdu1HkTableDataset.currentOutSUSNominal.value << ", " << std::setw(4) <<
|
||||
pdu1HkTableDataset.voltageOutSUSNominal.value << std::endl;
|
||||
sif::info << std::setw(30) << std::left << "Solar Cell Experiment" << std::dec << "| " <<
|
||||
static_cast<unsigned int>(pdu1HkTableDataset.outEnabledSolarCellExp.value) << ", " <<
|
||||
std::setw(4) << std::right <<
|
||||
pdu1HkTableDataset.currentOutSolarCellExp.value << ", " << std::setw(4) <<
|
||||
pdu1HkTableDataset.voltageOutSolarCellExp.value << std::endl;
|
||||
sif::info << std::setw(30) << std::left << "PLOC" << std::dec << "| " <<
|
||||
static_cast<unsigned int>(pdu1HkTableDataset.outEnabledPLOC.value) << ", " <<
|
||||
std::setw(4) << std::right <<
|
||||
pdu1HkTableDataset.currentOutPLOC.value << ", " << std::setw(4) <<
|
||||
pdu1HkTableDataset.voltageOutPLOC.value << std::endl;
|
||||
sif::info << std::setw(30) << std::left << "ACS Side A" << std::dec << "| " <<
|
||||
static_cast<unsigned int>(pdu1HkTableDataset.outEnabledAcsBoardSideA.value) << ", " <<
|
||||
std::setw(4) << std::right <<
|
||||
pdu1HkTableDataset.currentOutACSBoardSideA.value << ", " << std::setw(4) <<
|
||||
pdu1HkTableDataset.voltageOutACSBoardSideA.value << std::endl;
|
||||
sif::info << std::setw(30) << std::left << "Channel 8" << std::dec << "| " <<
|
||||
static_cast<unsigned int>(pdu1HkTableDataset.outEnabledChannel8.value) << ", " <<
|
||||
std::setw(4) << std::right <<
|
||||
pdu1HkTableDataset.currentOutChannel8.value << ", " << std::setw(4) <<
|
||||
pdu1HkTableDataset.voltageOutChannel8.value << std::right << std::endl;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user