added test to retrieve pdu config
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit

This commit is contained in:
2022-08-26 14:28:06 +02:00
parent e804d433aa
commit 8c110460a6
24 changed files with 185 additions and 170 deletions

View File

@ -9,6 +9,12 @@
#include <cstdint>
#include "devices/powerSwitcherList.h"
#include "p60acu_hk.h"
#include "p60acu_param.h"
#include "p60dock_hk.h"
#include "p60dock_param.h"
#include "p60pdu_hk.h"
#include "p60pdu_param.h"
namespace GOMSPACE {
@ -22,7 +28,7 @@ enum SpecialRequestTypes {
GET_P60DOCK_CONFIG
};
enum CspPorts: uint8_t {
enum CspPorts : uint8_t {
CSP_PING = 1,
CSP_REBOOT = 4,
P60_PORT_RPARAM_ENUM = 7,
@ -234,24 +240,16 @@ enum SwitchChannels : uint8_t {
GS5V = 12
};
/** Max reply size reached when requesting full hk table */
static const uint16_t MAX_REPLY_LENGTH = 407;
static const uint16_t MAX_CONFIGTABLE_ADDRESS = 408;
static const uint16_t MAX_HKTABLE_ADDRESS = 187;
// Sources:
// GomSpace library lib/p60-dock_client/include/gs/p60-dock/param
static const uint16_t HK_TABLE_SIZE = 188;
static const uint16_t HK_TABLE_SIZE = P60DOCK_HK_SIZE;
static const uint16_t CONFIG_TABLE_SIZE = P60DOCK_PARAM_SIZE;
static const size_t MAX_REPLY_SIZE = CONFIG_TABLE_SIZE;
static const uint16_t CAL_TABLE = 0xAE;
static const uint16_t CONFIG_TABLE_SIZE = 0x19C;
static const uint8_t HK_TABLE_ENTRIES = 100;
/**
* Requesting the full housekeeping table from the P60 dock will generate a reply comprising
* 402 bytes of data.
*/
static const uint16_t HK_TABLE_REPLY_SIZE = 407;
class CoreHkSet : public StaticLocalDataSet<16> {
public:
CoreHkSet(HasLocalDataPoolIF* owner)
@ -377,12 +375,14 @@ class HkTableDataset : public StaticLocalDataSet<32> {
* @brief Constants common for both PDU1 and PDU2.
*/
namespace PDU {
/** When retrieving full configuration parameter table */
static const uint16_t MAX_REPLY_LENGTH = 318;
static const uint16_t MAX_CONFIGTABLE_ADDRESS = 316;
static const uint16_t MAX_HKTABLE_ADDRESS = 141;
/** The size of the csp reply containing the housekeeping table data */
static const uint16_t HK_TABLE_REPLY_SIZE = 303;
static const uint16_t HK_TABLE_SIZE = P60PDU_HK_SIZE;
static const uint16_t CONFIG_TABLE_SIZE = P60PDU_PARAM_SIZE;
/** When retrieving full configuration parameter table */
static const uint16_t MAX_REPLY_SIZE = CONFIG_TABLE_SIZE;
static const uint8_t HK_TABLE_ENTRIES = 73;
static constexpr uint8_t CHANNELS_LEN = 9;
@ -482,13 +482,6 @@ class PduAuxHk : public StaticLocalDataSet<36> {
lp_var_t<uint8_t> csp1WatchdogPingsLeft =
lp_var_t<uint8_t>(sid.objectId, P60System::pool::PDU_WDT_CSP_LEFT2, this);
};
//class HkWrapper {
//public:
// HkWrapper(PduCoreHk& coreHk, PduAuxHk& auxHk) {
//
// }
//};
} // namespace PDU
namespace PDU1 {
@ -591,12 +584,12 @@ class Pdu2AuxHk : public ::PDU::PduAuxHk {
namespace ACU {
/* When receiving full housekeeping (telemetry) table */
static const uint16_t MAX_REPLY_LENGTH = 262;
static const uint16_t MAX_CONFIGTABLE_ADDRESS = 26;
static const uint16_t MAX_HKTABLE_ADDRESS = 120;
static const uint8_t HK_TABLE_ENTRIES = 64;
static const uint16_t HK_TABLE_REPLY_SIZE = 262;
static const uint16_t HK_TABLE_SIZE = P60ACU_HK_SIZE;
static const uint16_t CONFIG_TABLE_SIZE = P60ACU_PARAM_SIZE;
static const size_t MAX_REPLY_SIZE = HK_TABLE_SIZE;
class CoreHk : public StaticLocalDataSet<14> {
public: