fixed merge conflicts
This commit is contained in:
commit
4d4cf3f694
@ -100,10 +100,10 @@ void ObjectFactory::produce(){
|
|||||||
* Setting PCDU devices to mode normal immediately after start up because PCDU is always
|
* Setting PCDU devices to mode normal immediately after start up because PCDU is always
|
||||||
* running.
|
* running.
|
||||||
*/
|
*/
|
||||||
// p60dockhandler->setModeNormal();
|
p60dockhandler->setModeNormal();
|
||||||
pdu1handler->setModeNormal();
|
pdu1handler->setModeNormal();
|
||||||
// pdu2handler->setModeNormal();
|
pdu2handler->setModeNormal();
|
||||||
// acuhandler->setModeNormal();
|
acuhandler->setModeNormal();
|
||||||
#endif
|
#endif
|
||||||
/* Temperature sensors */
|
/* Temperature sensors */
|
||||||
Tmp1075Handler* tmp1075Handler_1 = new Tmp1075Handler(
|
Tmp1075Handler* tmp1075Handler_1 = new Tmp1075Handler(
|
||||||
|
@ -14,9 +14,10 @@ debugging. */
|
|||||||
|
|
||||||
#define TE0720 0
|
#define TE0720 0
|
||||||
|
|
||||||
#define P60DOCK_DEBUG 0
|
#define P60DOCK_DEBUG 0
|
||||||
#define PDU1_DEBUG 0
|
#define PDU1_DEBUG 0
|
||||||
#define PDU2_DEBUG 0
|
#define PDU2_DEBUG 0
|
||||||
|
#define ACU_DEBUG 1
|
||||||
|
|
||||||
#include "OBSWVersion.h"
|
#include "OBSWVersion.h"
|
||||||
|
|
||||||
|
@ -192,8 +192,6 @@ ReturnValue_t CspComIF::cspTransfer(uint8_t cspAddress, uint8_t cspPort,
|
|||||||
memcpy(replyBuffer, reply->data, reply->length);
|
memcpy(replyBuffer, reply->data, reply->length);
|
||||||
expectedSize = expectedSize - reply->length;
|
expectedSize = expectedSize - reply->length;
|
||||||
bytesRead += reply->length;
|
bytesRead += reply->length;
|
||||||
sif::debug << "CspComIF::cspTransfer: Received csp packet has data field with length "
|
|
||||||
<< reply->length << std::endl;
|
|
||||||
csp_buffer_free(reply);
|
csp_buffer_free(reply);
|
||||||
while (expectedSize > 0) {
|
while (expectedSize > 0) {
|
||||||
reply = csp_read(conn, timeout_ms);
|
reply = csp_read(conn, timeout_ms);
|
||||||
@ -211,13 +209,12 @@ ReturnValue_t CspComIF::cspTransfer(uint8_t cspAddress, uint8_t cspPort,
|
|||||||
memcpy(replyBuffer + bytesRead, reply->data, reply->length);
|
memcpy(replyBuffer + bytesRead, reply->data, reply->length);
|
||||||
expectedSize = expectedSize - reply->length;
|
expectedSize = expectedSize - reply->length;
|
||||||
bytesRead += reply->length;
|
bytesRead += reply->length;
|
||||||
sif::debug << "CspComIF::cspTransfer: Received csp packet has data field with length "
|
|
||||||
<< reply->length << std::endl;
|
|
||||||
csp_buffer_free(reply);
|
csp_buffer_free(reply);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(expectedSize != 0){
|
if(expectedSize != 0){
|
||||||
sif::error << "CspComIF::cspTransfer: Received more bytes than requested" << std::endl;
|
sif::error << "CspComIF::cspTransfer: Received more bytes than requested" << std::endl;
|
||||||
|
sif::debug << "CspComIF::cspTransfer: Received bytes: " << bytesRead << std::endl;
|
||||||
csp_close(conn);
|
csp_close(conn);
|
||||||
return RETURN_FAILED;
|
return RETURN_FAILED;
|
||||||
}
|
}
|
||||||
|
@ -40,7 +40,7 @@ public:
|
|||||||
virtual ReturnValue_t pullLow(gpioId_t gpioId) = 0;
|
virtual ReturnValue_t pullLow(gpioId_t gpioId) = 0;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief This function requires a child to implement the functionaliy to read the state of
|
* @brief This function requires a child to implement the functionality to read the state of
|
||||||
* an ouput or input gpio.
|
* an ouput or input gpio.
|
||||||
*
|
*
|
||||||
* @param gpioId A unique number which specifies the GPIO to read.
|
* @param gpioId A unique number which specifies the GPIO to read.
|
||||||
|
@ -1,14 +1,268 @@
|
|||||||
#include "ACUHandler.h"
|
#include "ACUHandler.h"
|
||||||
|
#include "OBSWConfig.h"
|
||||||
|
|
||||||
ACUHandler::ACUHandler(object_id_t objectId, object_id_t comIF, CookieIF * comCookie) :
|
ACUHandler::ACUHandler(object_id_t objectId, object_id_t comIF, CookieIF * comCookie) :
|
||||||
GomspaceDeviceHandler(objectId, comIF, comCookie, ACU::MAX_CONFIGTABLE_ADDRESS,
|
GomspaceDeviceHandler(objectId, comIF, comCookie, ACU::MAX_CONFIGTABLE_ADDRESS,
|
||||||
ACU::MAX_HKTABLE_ADDRESS, ACU::HK_TABLE_SIZE, &acuHkTableDataset), acuHkTableDataset(
|
ACU::MAX_HKTABLE_ADDRESS, ACU::HK_TABLE_REPLY_SIZE, &acuHkTableDataset), acuHkTableDataset(
|
||||||
this) {
|
this) {
|
||||||
}
|
}
|
||||||
|
|
||||||
ACUHandler::~ACUHandler() {
|
ACUHandler::~ACUHandler() {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ReturnValue_t ACUHandler::buildNormalDeviceCommand(
|
||||||
|
DeviceCommandId_t * id) {
|
||||||
|
*id = GOMSPACE::REQUEST_HK_TABLE;
|
||||||
|
return buildCommandFromCommand(*id, NULL, 0);
|
||||||
|
}
|
||||||
|
|
||||||
void ACUHandler::letChildHandleHkReply(DeviceCommandId_t id, const uint8_t *packet) {
|
void ACUHandler::letChildHandleHkReply(DeviceCommandId_t id, const uint8_t *packet) {
|
||||||
|
|
||||||
|
parseHkTableReply(packet);
|
||||||
|
handleDeviceTM(&acuHkTableDataset, id, true);
|
||||||
|
|
||||||
|
#if OBSW_ENHANCED_PRINTOUT == 1 && ACU_DEBUG == 1
|
||||||
|
acuHkTableDataset.read();
|
||||||
|
float temperatureC_1 = acuHkTableDataset.temperature1.value * 0.1;
|
||||||
|
float temperatureC_2 = acuHkTableDataset.temperature2.value * 0.1;
|
||||||
|
float temperatureC_3 = acuHkTableDataset.temperature3.value * 0.1;
|
||||||
|
sif::info << "ACU: Temperature 1: " << temperatureC_1 << " °C" << std::endl;
|
||||||
|
sif::info << "ACU: Temperature 2: " << temperatureC_2 << " °C" << std::endl;
|
||||||
|
sif::info << "ACU: Temperature 3: " << temperatureC_3 << " °C" << std::endl;
|
||||||
|
sif::info << "ACU: Ground Watchdog Timer Count: "
|
||||||
|
<< acuHkTableDataset.wdtCntGnd.value << std::endl;
|
||||||
|
sif::info << "ACU: Ground watchdog timer, seconds left before reboot: "
|
||||||
|
<< acuHkTableDataset.wdtGndLeft.value << std::endl;
|
||||||
|
acuHkTableDataset.commit();
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
void ACUHandler::parseHkTableReply(const uint8_t *packet) {
|
||||||
|
uint16_t dataOffset = 0;
|
||||||
|
acuHkTableDataset.read();
|
||||||
|
dataOffset += 12;
|
||||||
|
acuHkTableDataset.currentInChannel0 = *(packet + dataOffset) << 8 | *(packet + dataOffset + 1);
|
||||||
|
dataOffset += 4;
|
||||||
|
acuHkTableDataset.currentInChannel1 = *(packet + dataOffset) << 8 | *(packet + dataOffset + 1);
|
||||||
|
dataOffset += 4;
|
||||||
|
acuHkTableDataset.currentInChannel2 = *(packet + dataOffset) << 8 | *(packet + dataOffset + 1);
|
||||||
|
dataOffset += 4;
|
||||||
|
acuHkTableDataset.currentInChannel3 = *(packet + dataOffset) << 8 | *(packet + dataOffset + 1);
|
||||||
|
dataOffset += 4;
|
||||||
|
acuHkTableDataset.currentInChannel4 = *(packet + dataOffset) << 8 | *(packet + dataOffset + 1);
|
||||||
|
dataOffset += 4;
|
||||||
|
acuHkTableDataset.currentInChannel5 = *(packet + dataOffset) << 8 | *(packet + dataOffset + 1);
|
||||||
|
dataOffset += 4;
|
||||||
|
|
||||||
|
acuHkTableDataset.voltageInChannel0 = *(packet + dataOffset) << 8 | *(packet + dataOffset + 1);
|
||||||
|
dataOffset += 4;
|
||||||
|
acuHkTableDataset.voltageInChannel1 = *(packet + dataOffset) << 8 | *(packet + dataOffset + 1);
|
||||||
|
dataOffset += 4;
|
||||||
|
acuHkTableDataset.voltageInChannel2 = *(packet + dataOffset) << 8 | *(packet + dataOffset + 1);
|
||||||
|
dataOffset += 4;
|
||||||
|
acuHkTableDataset.voltageInChannel3 = *(packet + dataOffset) << 8 | *(packet + dataOffset + 1);
|
||||||
|
dataOffset += 4;
|
||||||
|
acuHkTableDataset.voltageInChannel4 = *(packet + dataOffset) << 8 | *(packet + dataOffset + 1);
|
||||||
|
dataOffset += 4;
|
||||||
|
acuHkTableDataset.voltageInChannel5 = *(packet + dataOffset) << 8 | *(packet + dataOffset + 1);
|
||||||
|
dataOffset += 4;
|
||||||
|
|
||||||
|
acuHkTableDataset.vcc = *(packet + dataOffset) << 8 | *(packet + dataOffset + 1);
|
||||||
|
dataOffset += 4;
|
||||||
|
acuHkTableDataset.vbat = *(packet + dataOffset) << 8 | *(packet + dataOffset + 1);
|
||||||
|
dataOffset += 4;
|
||||||
|
|
||||||
|
acuHkTableDataset.temperature1 = *(packet + dataOffset) << 8 | *(packet + dataOffset + 1);
|
||||||
|
dataOffset += 4;
|
||||||
|
acuHkTableDataset.temperature2 = *(packet + dataOffset) << 8 | *(packet + dataOffset + 1);
|
||||||
|
dataOffset += 4;
|
||||||
|
acuHkTableDataset.temperature3 = *(packet + dataOffset) << 8 | *(packet + dataOffset + 1);
|
||||||
|
dataOffset += 4;
|
||||||
|
|
||||||
|
acuHkTableDataset.mpptMode = *(packet + dataOffset);
|
||||||
|
dataOffset += 3;
|
||||||
|
|
||||||
|
acuHkTableDataset.vboostInChannel0 = *(packet + dataOffset) << 8 | *(packet + dataOffset + 1);
|
||||||
|
dataOffset += 4;
|
||||||
|
acuHkTableDataset.vboostInChannel1 = *(packet + dataOffset) << 8 | *(packet + dataOffset + 1);
|
||||||
|
dataOffset += 4;
|
||||||
|
acuHkTableDataset.vboostInChannel2 = *(packet + dataOffset) << 8 | *(packet + dataOffset + 1);
|
||||||
|
dataOffset += 4;
|
||||||
|
acuHkTableDataset.vboostInChannel3 = *(packet + dataOffset) << 8 | *(packet + dataOffset + 1);
|
||||||
|
dataOffset += 4;
|
||||||
|
acuHkTableDataset.vboostInChannel4 = *(packet + dataOffset) << 8 | *(packet + dataOffset + 1);
|
||||||
|
dataOffset += 4;
|
||||||
|
acuHkTableDataset.vboostInChannel5 = *(packet + dataOffset) << 8 | *(packet + dataOffset + 1);
|
||||||
|
dataOffset += 4;
|
||||||
|
|
||||||
|
acuHkTableDataset.powerInChannel0 = *(packet + dataOffset) << 8 | *(packet + dataOffset + 1);
|
||||||
|
dataOffset += 4;
|
||||||
|
acuHkTableDataset.powerInChannel1 = *(packet + dataOffset) << 8 | *(packet + dataOffset + 1);
|
||||||
|
dataOffset += 4;
|
||||||
|
acuHkTableDataset.powerInChannel2 = *(packet + dataOffset) << 8 | *(packet + dataOffset + 1);
|
||||||
|
dataOffset += 4;
|
||||||
|
acuHkTableDataset.powerInChannel3 = *(packet + dataOffset) << 8 | *(packet + dataOffset + 1);
|
||||||
|
dataOffset += 4;
|
||||||
|
acuHkTableDataset.powerInChannel4 = *(packet + dataOffset) << 8 | *(packet + dataOffset + 1);
|
||||||
|
dataOffset += 4;
|
||||||
|
acuHkTableDataset.powerInChannel5 = *(packet + dataOffset) << 8 | *(packet + dataOffset + 1);
|
||||||
|
dataOffset += 4;
|
||||||
|
|
||||||
|
acuHkTableDataset.dac0Enable = *(packet + dataOffset);
|
||||||
|
dataOffset += 3;
|
||||||
|
acuHkTableDataset.dac1Enable = *(packet + dataOffset);
|
||||||
|
dataOffset += 3;
|
||||||
|
acuHkTableDataset.dac2Enable = *(packet + dataOffset);
|
||||||
|
dataOffset += 3;
|
||||||
|
|
||||||
|
acuHkTableDataset.dacRawChannelVal0 = *(packet + dataOffset) << 8 | *(packet + dataOffset + 1);
|
||||||
|
dataOffset += 4;
|
||||||
|
acuHkTableDataset.dacRawChannelVal1 = *(packet + dataOffset) << 8 | *(packet + dataOffset + 1);
|
||||||
|
dataOffset += 4;
|
||||||
|
acuHkTableDataset.dacRawChannelVal2 = *(packet + dataOffset) << 8 | *(packet + dataOffset + 1);
|
||||||
|
dataOffset += 4;
|
||||||
|
acuHkTableDataset.dacRawChannelVal3 = *(packet + dataOffset) << 8 | *(packet + dataOffset + 1);
|
||||||
|
dataOffset += 4;
|
||||||
|
acuHkTableDataset.dacRawChannelVal4 = *(packet + dataOffset) << 8 | *(packet + dataOffset + 1);
|
||||||
|
dataOffset += 4;
|
||||||
|
acuHkTableDataset.dacRawChannelVal5 = *(packet + dataOffset) << 8 | *(packet + dataOffset + 1);
|
||||||
|
dataOffset += 4;
|
||||||
|
|
||||||
|
acuHkTableDataset.bootCause = *(packet + dataOffset) << 24 | *(packet + dataOffset + 1) << 16 | *(packet + dataOffset + 2) << 8 | *(packet + dataOffset + 3);
|
||||||
|
dataOffset += 6;
|
||||||
|
acuHkTableDataset.bootcnt = *(packet + dataOffset) << 24 | *(packet + dataOffset + 1) << 16 | *(packet + dataOffset + 2) << 8 | *(packet + dataOffset + 3);
|
||||||
|
dataOffset += 6;
|
||||||
|
acuHkTableDataset.uptime = *(packet + dataOffset) << 24 | *(packet + dataOffset + 1) << 16 | *(packet + dataOffset + 2) << 8 | *(packet + dataOffset + 3);
|
||||||
|
dataOffset += 6;
|
||||||
|
acuHkTableDataset.resetCause = *(packet + dataOffset) << 8 | *(packet + dataOffset + 1);
|
||||||
|
dataOffset += 4;
|
||||||
|
acuHkTableDataset.mpptTime = *(packet + dataOffset) << 8 | *(packet + dataOffset + 1);
|
||||||
|
/* +12 because here starts the second csp packet */
|
||||||
|
dataOffset += 2 + 12;
|
||||||
|
|
||||||
|
acuHkTableDataset.mpptPeriod = *(packet + dataOffset) << 8 | *(packet + dataOffset + 1);
|
||||||
|
dataOffset += 4;
|
||||||
|
|
||||||
|
acuHkTableDataset.device0 = *(packet + dataOffset);
|
||||||
|
dataOffset += 3;
|
||||||
|
acuHkTableDataset.device1 = *(packet + dataOffset);
|
||||||
|
dataOffset += 3;
|
||||||
|
acuHkTableDataset.device2 = *(packet + dataOffset);
|
||||||
|
dataOffset += 3;
|
||||||
|
acuHkTableDataset.device3 = *(packet + dataOffset);
|
||||||
|
dataOffset += 3;
|
||||||
|
acuHkTableDataset.device4 = *(packet + dataOffset);
|
||||||
|
dataOffset += 3;
|
||||||
|
acuHkTableDataset.device5 = *(packet + dataOffset);
|
||||||
|
dataOffset += 3;
|
||||||
|
acuHkTableDataset.device6 = *(packet + dataOffset);
|
||||||
|
dataOffset += 3;
|
||||||
|
acuHkTableDataset.device7 = *(packet + dataOffset);
|
||||||
|
dataOffset += 3;
|
||||||
|
|
||||||
|
acuHkTableDataset.device0Status = *(packet + dataOffset);
|
||||||
|
dataOffset += 3;
|
||||||
|
acuHkTableDataset.device1Status = *(packet + dataOffset);
|
||||||
|
dataOffset += 3;
|
||||||
|
acuHkTableDataset.device2Status = *(packet + dataOffset);
|
||||||
|
dataOffset += 3;
|
||||||
|
acuHkTableDataset.device3Status = *(packet + dataOffset);
|
||||||
|
dataOffset += 3;
|
||||||
|
acuHkTableDataset.device4Status = *(packet + dataOffset);
|
||||||
|
dataOffset += 3;
|
||||||
|
acuHkTableDataset.device5Status = *(packet + dataOffset);
|
||||||
|
dataOffset += 3;
|
||||||
|
acuHkTableDataset.device6Status = *(packet + dataOffset);
|
||||||
|
dataOffset += 3;
|
||||||
|
acuHkTableDataset.device7Status = *(packet + dataOffset);
|
||||||
|
dataOffset += 3;
|
||||||
|
|
||||||
|
acuHkTableDataset.wdtCntGnd = *(packet + dataOffset) << 24 | *(packet + dataOffset + 1) << 16 | *(packet + dataOffset + 2) << 8 | *(packet + dataOffset + 3);
|
||||||
|
dataOffset += 6;
|
||||||
|
acuHkTableDataset.wdtGndLeft = *(packet + dataOffset) << 24 | *(packet + dataOffset + 1) << 16 | *(packet + dataOffset + 2) << 8 | *(packet + dataOffset + 3);
|
||||||
|
dataOffset += 6;
|
||||||
|
|
||||||
|
acuHkTableDataset.commit();
|
||||||
|
}
|
||||||
|
|
||||||
|
ReturnValue_t ACUHandler::initializeLocalDataPool(
|
||||||
|
localpool::DataPool &localDataPoolMap, LocalDataPoolManager &poolManager) {
|
||||||
|
|
||||||
|
localDataPoolMap.emplace(P60System::ACU_CURRENT_IN_CHANNEL0, new PoolEntry<int16_t>( { 0 }));
|
||||||
|
localDataPoolMap.emplace(P60System::ACU_CURRENT_IN_CHANNEL1, new PoolEntry<int16_t>( { 0 }));
|
||||||
|
localDataPoolMap.emplace(P60System::ACU_CURRENT_IN_CHANNEL2, new PoolEntry<int16_t>( { 0 }));
|
||||||
|
localDataPoolMap.emplace(P60System::ACU_CURRENT_IN_CHANNEL3, new PoolEntry<int16_t>( { 0 }));
|
||||||
|
localDataPoolMap.emplace(P60System::ACU_CURRENT_IN_CHANNEL4, new PoolEntry<int16_t>( { 0 }));
|
||||||
|
localDataPoolMap.emplace(P60System::ACU_CURRENT_IN_CHANNEL5, new PoolEntry<int16_t>( { 0 }));
|
||||||
|
|
||||||
|
localDataPoolMap.emplace(P60System::ACU_VOLTAGE_IN_CHANNEL0, new PoolEntry<uint16_t>( { 0 }));
|
||||||
|
localDataPoolMap.emplace(P60System::ACU_VOLTAGE_IN_CHANNEL1, new PoolEntry<uint16_t>( { 0 }));
|
||||||
|
localDataPoolMap.emplace(P60System::ACU_VOLTAGE_IN_CHANNEL2, new PoolEntry<uint16_t>( { 0 }));
|
||||||
|
localDataPoolMap.emplace(P60System::ACU_VOLTAGE_IN_CHANNEL3, new PoolEntry<uint16_t>( { 0 }));
|
||||||
|
localDataPoolMap.emplace(P60System::ACU_VOLTAGE_IN_CHANNEL4, new PoolEntry<uint16_t>( { 0 }));
|
||||||
|
localDataPoolMap.emplace(P60System::ACU_VOLTAGE_IN_CHANNEL5, new PoolEntry<uint16_t>( { 0 }));
|
||||||
|
|
||||||
|
localDataPoolMap.emplace(P60System::ACU_VCC, new PoolEntry<uint16_t>( { 0 }));
|
||||||
|
localDataPoolMap.emplace(P60System::ACU_VBAT, new PoolEntry<uint16_t>( { 0 }));
|
||||||
|
|
||||||
|
localDataPoolMap.emplace(P60System::ACU_TEMPERATURE_1, new PoolEntry<int16_t>( { 0 }));
|
||||||
|
localDataPoolMap.emplace(P60System::ACU_TEMPERATURE_2, new PoolEntry<int16_t>( { 0 }));
|
||||||
|
localDataPoolMap.emplace(P60System::ACU_TEMPERATURE_3, new PoolEntry<int16_t>( { 0 }));
|
||||||
|
|
||||||
|
localDataPoolMap.emplace(P60System::ACU_MPPT_MODE, new PoolEntry<uint8_t>( { 0 }));
|
||||||
|
|
||||||
|
localDataPoolMap.emplace(P60System::ACU_VBOOST_CHANNEL0, new PoolEntry<uint16_t>( { 0 }));
|
||||||
|
localDataPoolMap.emplace(P60System::ACU_VBOOST_CHANNEL1, new PoolEntry<uint16_t>( { 0 }));
|
||||||
|
localDataPoolMap.emplace(P60System::ACU_VBOOST_CHANNEL2, new PoolEntry<uint16_t>( { 0 }));
|
||||||
|
localDataPoolMap.emplace(P60System::ACU_VBOOST_CHANNEL3, new PoolEntry<uint16_t>( { 0 }));
|
||||||
|
localDataPoolMap.emplace(P60System::ACU_VBOOST_CHANNEL4, new PoolEntry<uint16_t>( { 0 }));
|
||||||
|
localDataPoolMap.emplace(P60System::ACU_VBOOST_CHANNEL5, new PoolEntry<uint16_t>( { 0 }));
|
||||||
|
|
||||||
|
localDataPoolMap.emplace(P60System::ACU_POWER_CHANNEL0, new PoolEntry<uint16_t>( { 0 }));
|
||||||
|
localDataPoolMap.emplace(P60System::ACU_POWER_CHANNEL1, new PoolEntry<uint16_t>( { 0 }));
|
||||||
|
localDataPoolMap.emplace(P60System::ACU_POWER_CHANNEL2, new PoolEntry<uint16_t>( { 0 }));
|
||||||
|
localDataPoolMap.emplace(P60System::ACU_POWER_CHANNEL3, new PoolEntry<uint16_t>( { 0 }));
|
||||||
|
localDataPoolMap.emplace(P60System::ACU_POWER_CHANNEL4, new PoolEntry<uint16_t>( { 0 }));
|
||||||
|
localDataPoolMap.emplace(P60System::ACU_POWER_CHANNEL5, new PoolEntry<uint16_t>( { 0 }));
|
||||||
|
|
||||||
|
localDataPoolMap.emplace(P60System::ACU_DAC_EN_0, new PoolEntry<uint8_t>( { 0 }));
|
||||||
|
localDataPoolMap.emplace(P60System::ACU_DAC_EN_1, new PoolEntry<uint8_t>( { 0 }));
|
||||||
|
localDataPoolMap.emplace(P60System::ACU_DAC_EN_2, new PoolEntry<uint8_t>( { 0 }));
|
||||||
|
|
||||||
|
localDataPoolMap.emplace(P60System::ACU_DAC_RAW_0, new PoolEntry<uint16_t>( { 0 }));
|
||||||
|
localDataPoolMap.emplace(P60System::ACU_DAC_RAW_1, new PoolEntry<uint16_t>( { 0 }));
|
||||||
|
localDataPoolMap.emplace(P60System::ACU_DAC_RAW_2, new PoolEntry<uint16_t>( { 0 }));
|
||||||
|
localDataPoolMap.emplace(P60System::ACU_DAC_RAW_3, new PoolEntry<uint16_t>( { 0 }));
|
||||||
|
localDataPoolMap.emplace(P60System::ACU_DAC_RAW_4, new PoolEntry<uint16_t>( { 0 }));
|
||||||
|
localDataPoolMap.emplace(P60System::ACU_DAC_RAW_5, new PoolEntry<uint16_t>( { 0 }));
|
||||||
|
|
||||||
|
localDataPoolMap.emplace(P60System::ACU_BOOTCAUSE, new PoolEntry<uint32_t>( { 0 }));
|
||||||
|
localDataPoolMap.emplace(P60System::ACU_BOOTCNT, new PoolEntry<uint32_t>( { 0 }));
|
||||||
|
localDataPoolMap.emplace(P60System::ACU_UPTIME, new PoolEntry<uint32_t>( { 0 }));
|
||||||
|
localDataPoolMap.emplace(P60System::ACU_RESET_CAUSE, new PoolEntry<uint16_t>( { 0 }));
|
||||||
|
localDataPoolMap.emplace(P60System::ACU_MPPT_TIME, new PoolEntry<uint16_t>( { 0 }));
|
||||||
|
localDataPoolMap.emplace(P60System::ACU_MPPT_PERIOD, new PoolEntry<uint16_t>( { 0 }));
|
||||||
|
|
||||||
|
localDataPoolMap.emplace(P60System::ACU_DEVICE_0, new PoolEntry<uint8_t>( { 0 }));
|
||||||
|
localDataPoolMap.emplace(P60System::ACU_DEVICE_1, new PoolEntry<uint8_t>( { 0 }));
|
||||||
|
localDataPoolMap.emplace(P60System::ACU_DEVICE_2, new PoolEntry<uint8_t>( { 0 }));
|
||||||
|
localDataPoolMap.emplace(P60System::ACU_DEVICE_3, new PoolEntry<uint8_t>( { 0 }));
|
||||||
|
localDataPoolMap.emplace(P60System::ACU_DEVICE_4, new PoolEntry<uint8_t>( { 0 }));
|
||||||
|
localDataPoolMap.emplace(P60System::ACU_DEVICE_5, new PoolEntry<uint8_t>( { 0 }));
|
||||||
|
localDataPoolMap.emplace(P60System::ACU_DEVICE_6, new PoolEntry<uint8_t>( { 0 }));
|
||||||
|
localDataPoolMap.emplace(P60System::ACU_DEVICE_7, new PoolEntry<uint8_t>( { 0 }));
|
||||||
|
|
||||||
|
localDataPoolMap.emplace(P60System::ACU_DEVICE_0_STATUS, new PoolEntry<uint8_t>( { 0 }));
|
||||||
|
localDataPoolMap.emplace(P60System::ACU_DEVICE_1_STATUS, new PoolEntry<uint8_t>( { 0 }));
|
||||||
|
localDataPoolMap.emplace(P60System::ACU_DEVICE_2_STATUS, new PoolEntry<uint8_t>( { 0 }));
|
||||||
|
localDataPoolMap.emplace(P60System::ACU_DEVICE_3_STATUS, new PoolEntry<uint8_t>( { 0 }));
|
||||||
|
localDataPoolMap.emplace(P60System::ACU_DEVICE_4_STATUS, new PoolEntry<uint8_t>( { 0 }));
|
||||||
|
localDataPoolMap.emplace(P60System::ACU_DEVICE_5_STATUS, new PoolEntry<uint8_t>( { 0 }));
|
||||||
|
localDataPoolMap.emplace(P60System::ACU_DEVICE_6_STATUS, new PoolEntry<uint8_t>( { 0 }));
|
||||||
|
localDataPoolMap.emplace(P60System::ACU_DEVICE_7_STATUS, new PoolEntry<uint8_t>( { 0 }));
|
||||||
|
|
||||||
|
localDataPoolMap.emplace(P60System::ACU_WDT_CNT_GND, new PoolEntry<uint32_t>( { 0 }));
|
||||||
|
localDataPoolMap.emplace(P60System::ACU_WDT_GND_LEFT, new PoolEntry<uint32_t>( { 0 }));
|
||||||
|
|
||||||
|
return HasReturnvaluesIF::RETURN_OK;
|
||||||
}
|
}
|
||||||
|
@ -12,13 +12,28 @@ class ACUHandler: public GomspaceDeviceHandler {
|
|||||||
public:
|
public:
|
||||||
ACUHandler(object_id_t objectId, object_id_t comIF, CookieIF * comCookie);
|
ACUHandler(object_id_t objectId, object_id_t comIF, CookieIF * comCookie);
|
||||||
virtual ~ACUHandler();
|
virtual ~ACUHandler();
|
||||||
|
|
||||||
|
virtual ReturnValue_t initializeLocalDataPool(localpool::DataPool& localDataPoolMap,
|
||||||
|
LocalDataPoolManager& poolManager) override;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
virtual void letChildHandleHkReply(DeviceCommandId_t id, const uint8_t *packet) override;
|
virtual void letChildHandleHkReply(DeviceCommandId_t id, const uint8_t *packet) override;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief As soon as the device is in MODE_NORMAL, this function is executed periodically.
|
||||||
|
*/
|
||||||
|
virtual ReturnValue_t buildNormalDeviceCommand(DeviceCommandId_t * id) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
ACU::HkTableDataset acuHkTableDataset;
|
ACU::HkTableDataset acuHkTableDataset;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Function extracts the hk table information from the received csp packet and stores
|
||||||
|
* the values in the acuHkTableDataset.
|
||||||
|
*/
|
||||||
|
void parseHkTableReply(const uint8_t *packet);
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif /* MISSION_DEVICES_ACUHANDLER_H_ */
|
#endif /* MISSION_DEVICES_ACUHANDLER_H_ */
|
||||||
|
@ -15,7 +15,6 @@ ReturnValue_t PDU1Handler::buildNormalDeviceCommand(
|
|||||||
DeviceCommandId_t * id) {
|
DeviceCommandId_t * id) {
|
||||||
*id = GOMSPACE::REQUEST_HK_TABLE;
|
*id = GOMSPACE::REQUEST_HK_TABLE;
|
||||||
return buildCommandFromCommand(*id, NULL, 0);
|
return buildCommandFromCommand(*id, NULL, 0);
|
||||||
return RETURN_OK;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void PDU1Handler::letChildHandleHkReply(DeviceCommandId_t id, const uint8_t *packet) {
|
void PDU1Handler::letChildHandleHkReply(DeviceCommandId_t id, const uint8_t *packet) {
|
||||||
|
@ -318,7 +318,6 @@ namespace P60System {
|
|||||||
ACU_POWER_CHANNEL3,
|
ACU_POWER_CHANNEL3,
|
||||||
ACU_POWER_CHANNEL4,
|
ACU_POWER_CHANNEL4,
|
||||||
ACU_POWER_CHANNEL5,
|
ACU_POWER_CHANNEL5,
|
||||||
ACU_POWER_GROUP,
|
|
||||||
ACU_DAC_EN_0,
|
ACU_DAC_EN_0,
|
||||||
ACU_DAC_EN_1,
|
ACU_DAC_EN_1,
|
||||||
ACU_DAC_EN_2,
|
ACU_DAC_EN_2,
|
||||||
@ -357,10 +356,9 @@ namespace P60System {
|
|||||||
|
|
||||||
|
|
||||||
namespace P60Dock {
|
namespace P60Dock {
|
||||||
/* The maximum size of a reply from the P60 dock. Maximum size is reached
|
|
||||||
* when retrieving the full parameter configuration table. 412 bytes of
|
/** Max reply size reached when requesting full hk table */
|
||||||
* payload data and 12 bytes of CSP header data. */
|
static const uint16_t MAX_REPLY_LENGTH = 407;
|
||||||
static const uint16_t MAX_REPLY_LENGTH = 424;
|
|
||||||
|
|
||||||
static const uint16_t MAX_CONFIGTABLE_ADDRESS = 408;
|
static const uint16_t MAX_CONFIGTABLE_ADDRESS = 408;
|
||||||
static const uint16_t MAX_HKTABLE_ADDRESS = 187;
|
static const uint16_t MAX_HKTABLE_ADDRESS = 187;
|
||||||
@ -1043,11 +1041,11 @@ namespace ACU {
|
|||||||
static const uint32_t HK_TABLE_DATA_SET_ID = 0x4;
|
static const uint32_t HK_TABLE_DATA_SET_ID = 0x4;
|
||||||
|
|
||||||
/* When receiving full housekeeping (telemetry) table */
|
/* When receiving full housekeeping (telemetry) table */
|
||||||
static const uint16_t MAX_REPLY_LENGTH = 124;
|
static const uint16_t MAX_REPLY_LENGTH = 262;
|
||||||
static const uint16_t MAX_CONFIGTABLE_ADDRESS = 26;
|
static const uint16_t MAX_CONFIGTABLE_ADDRESS = 26;
|
||||||
static const uint16_t MAX_HKTABLE_ADDRESS = 120;
|
static const uint16_t MAX_HKTABLE_ADDRESS = 120;
|
||||||
static const uint16_t HK_TABLE_SIZE = 125;
|
|
||||||
static const uint8_t HK_TABLE_ENTRIES = 64;
|
static const uint8_t HK_TABLE_ENTRIES = 64;
|
||||||
|
static const uint16_t HK_TABLE_REPLY_SIZE = 262;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief This class defines a dataset for the hk table of the ACU.
|
* @brief This class defines a dataset for the hk table of the ACU.
|
||||||
@ -1153,8 +1151,6 @@ namespace ACU {
|
|||||||
|
|
||||||
lp_var_t<uint32_t> bootCause = lp_var_t<uint32_t>(sid.objectId,
|
lp_var_t<uint32_t> bootCause = lp_var_t<uint32_t>(sid.objectId,
|
||||||
P60System::ACU_BOOTCAUSE, this);
|
P60System::ACU_BOOTCAUSE, this);
|
||||||
lp_var_t<uint32_t> bootcause = lp_var_t<uint32_t>(sid.objectId,
|
|
||||||
P60System::ACU_BOOTCAUSE, this);
|
|
||||||
lp_var_t<uint32_t> bootcnt = lp_var_t<uint32_t>(sid.objectId,
|
lp_var_t<uint32_t> bootcnt = lp_var_t<uint32_t>(sid.objectId,
|
||||||
P60System::ACU_BOOTCNT, this);
|
P60System::ACU_BOOTCNT, this);
|
||||||
lp_var_t<uint32_t> uptime = lp_var_t<uint32_t>(sid.objectId,
|
lp_var_t<uint32_t> uptime = lp_var_t<uint32_t>(sid.objectId,
|
||||||
|
2
tmtc
2
tmtc
@ -1 +1 @@
|
|||||||
Subproject commit 110ec9644a520af9c6f4cb7f2b5d47f3d34ba256
|
Subproject commit 1d5fe4ebc7165c2a4979c5f9be9cfa0324e366fb
|
Loading…
Reference in New Issue
Block a user