This commit is contained in:
parent
4aad06469d
commit
0ea993e16b
@ -143,7 +143,7 @@ class TcBase : public ploc::SpTcBase, public MPSoCReturnValuesIF {
|
|||||||
virtual ~TcBase() = default;
|
virtual ~TcBase() = default;
|
||||||
|
|
||||||
// Initial length field of space packet. Will always be updated when packet is created.
|
// Initial length field of space packet. Will always be updated when packet is created.
|
||||||
static const uint16_t INIT_LENGTH = 1;
|
static const uint16_t INIT_LENGTH = 2;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Constructor
|
* @brief Constructor
|
||||||
|
@ -410,7 +410,7 @@ ReturnValue_t PlocMPSoCHandler::prepareTcMemWrite(const uint8_t* commandData,
|
|||||||
sequenceCount--;
|
sequenceCount--;
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
finishTcPrep();
|
finishTcPrep(tcMemWrite.getFullPacketLen());
|
||||||
return RETURN_OK;
|
return RETURN_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -424,7 +424,7 @@ ReturnValue_t PlocMPSoCHandler::prepareTcMemRead(const uint8_t* commandData,
|
|||||||
sequenceCount--;
|
sequenceCount--;
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
finishTcPrep();
|
finishTcPrep(tcMemRead.getFullPacketLen());
|
||||||
tmMemReadReport.rememberRequestedSize = tcMemRead.getMemLen() * 4 + TmMemReadReport::FIX_SIZE;
|
tmMemReadReport.rememberRequestedSize = tcMemRead.getMemLen() * 4 + TmMemReadReport::FIX_SIZE;
|
||||||
return RETURN_OK;
|
return RETURN_OK;
|
||||||
}
|
}
|
||||||
@ -443,7 +443,7 @@ ReturnValue_t PlocMPSoCHandler::prepareTcFlashDelete(const uint8_t* commandData,
|
|||||||
sequenceCount--;
|
sequenceCount--;
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
finishTcPrep();
|
finishTcPrep(tcFlashDelete.getFullPacketLen());
|
||||||
return RETURN_OK;
|
return RETURN_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -457,7 +457,7 @@ ReturnValue_t PlocMPSoCHandler::prepareTcReplayStart(const uint8_t* commandData,
|
|||||||
sequenceCount--;
|
sequenceCount--;
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
finishTcPrep();
|
finishTcPrep(tcReplayStart.getFullPacketLen());
|
||||||
return RETURN_OK;
|
return RETURN_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -470,7 +470,7 @@ ReturnValue_t PlocMPSoCHandler::prepareTcReplayStop() {
|
|||||||
sequenceCount--;
|
sequenceCount--;
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
finishTcPrep();
|
finishTcPrep(tcReplayStop.getFullPacketLen());
|
||||||
return RETURN_OK;
|
return RETURN_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -484,7 +484,7 @@ ReturnValue_t PlocMPSoCHandler::prepareTcDownlinkPwrOn(const uint8_t* commandDat
|
|||||||
sequenceCount--;
|
sequenceCount--;
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
finishTcPrep();
|
finishTcPrep(tcDownlinkPwrOn.getFullPacketLen());
|
||||||
return RETURN_OK;
|
return RETURN_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -497,7 +497,7 @@ ReturnValue_t PlocMPSoCHandler::prepareTcDownlinkPwrOff() {
|
|||||||
sequenceCount--;
|
sequenceCount--;
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
finishTcPrep();
|
finishTcPrep(tcDownlinkPwrOff.getFullPacketLen());
|
||||||
return RETURN_OK;
|
return RETURN_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -511,7 +511,7 @@ ReturnValue_t PlocMPSoCHandler::prepareTcReplayWriteSequence(const uint8_t* comm
|
|||||||
sequenceCount--;
|
sequenceCount--;
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
finishTcPrep();
|
finishTcPrep(tcReplayWriteSeq.getFullPacketLen());
|
||||||
return RETURN_OK;
|
return RETURN_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -524,7 +524,7 @@ ReturnValue_t PlocMPSoCHandler::prepareTcModeReplay() {
|
|||||||
sequenceCount--;
|
sequenceCount--;
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
finishTcPrep();
|
finishTcPrep(tcModeReplay.getFullPacketLen());
|
||||||
return RETURN_OK;
|
return RETURN_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -537,7 +537,7 @@ ReturnValue_t PlocMPSoCHandler::prepareTcModeIdle() {
|
|||||||
sequenceCount--;
|
sequenceCount--;
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
finishTcPrep();
|
finishTcPrep(tcModeIdle.getFullPacketLen());
|
||||||
return RETURN_OK;
|
return RETURN_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -551,17 +551,19 @@ ReturnValue_t PlocMPSoCHandler::prepareTcCamCmdSend(const uint8_t* commandData,
|
|||||||
sequenceCount--;
|
sequenceCount--;
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
finishTcPrep();
|
finishTcPrep(tcCamCmdSend.getFullPacketLen());
|
||||||
nextReplyId = mpsoc::TM_CAM_CMD_RPT;
|
nextReplyId = mpsoc::TM_CAM_CMD_RPT;
|
||||||
return RETURN_OK;
|
return RETURN_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
void PlocMPSoCHandler::finishTcPrep() { nextReplyId = mpsoc::ACK_REPORT; }
|
void PlocMPSoCHandler::finishTcPrep(size_t packetLen) {
|
||||||
|
nextReplyId = mpsoc::ACK_REPORT;
|
||||||
|
rawPacket = commandBuffer;
|
||||||
|
rawPacketLen = packetLen;
|
||||||
|
}
|
||||||
|
|
||||||
ReturnValue_t PlocMPSoCHandler::verifyPacket(const uint8_t* start, size_t foundLen) {
|
ReturnValue_t PlocMPSoCHandler::verifyPacket(const uint8_t* start, size_t foundLen) {
|
||||||
uint16_t receivedCrc = *(start + foundLen - 2) << 8 | *(start + foundLen - 1);
|
if (CRC::crc16ccitt(start, foundLen) != 0) {
|
||||||
uint16_t recalculatedCrc = CRC::crc16ccitt(start, foundLen - 2);
|
|
||||||
if (receivedCrc != recalculatedCrc) {
|
|
||||||
return MPSoCReturnValuesIF::CRC_FAILURE;
|
return MPSoCReturnValuesIF::CRC_FAILURE;
|
||||||
}
|
}
|
||||||
return RETURN_OK;
|
return RETURN_OK;
|
||||||
@ -683,7 +685,7 @@ ReturnValue_t PlocMPSoCHandler::handleCamCmdRpt(const uint8_t* data) {
|
|||||||
reinterpret_cast<const char*>(dataFieldPtr),
|
reinterpret_cast<const char*>(dataFieldPtr),
|
||||||
tmCamCmdRpt.rememberSpacePacketSize - mpsoc::SPACE_PACKET_HEADER_SIZE - sizeof(uint16_t) - 3);
|
tmCamCmdRpt.rememberSpacePacketSize - mpsoc::SPACE_PACKET_HEADER_SIZE - sizeof(uint16_t) - 3);
|
||||||
#if OBSW_DEBUG_PLOC_MPSOC == 1
|
#if OBSW_DEBUG_PLOC_MPSOC == 1
|
||||||
uint8_t ackValue = *(packet.getPacketData() + packet.getPacketDataLength() - 2);
|
uint8_t ackValue = *(packetReader.getPacketData() + packetReader.getPacketDataLen() - 2);
|
||||||
sif::info << "PlocMPSoCHandler: CamCmdRpt message: " << camCmdRptMsg << std::endl;
|
sif::info << "PlocMPSoCHandler: CamCmdRpt message: " << camCmdRptMsg << std::endl;
|
||||||
sif::info << "PlocMPSoCHandler: CamCmdRpt Ack value: 0x" << std::hex
|
sif::info << "PlocMPSoCHandler: CamCmdRpt Ack value: 0x" << std::hex
|
||||||
<< static_cast<unsigned int>(ackValue) << std::endl;
|
<< static_cast<unsigned int>(ackValue) << std::endl;
|
||||||
|
@ -172,7 +172,7 @@ class PlocMPSoCHandler : public DeviceHandlerBase, public CommandsActionsIF {
|
|||||||
ReturnValue_t prepareTcReplayWriteSequence(const uint8_t* commandData, size_t commandDataLen);
|
ReturnValue_t prepareTcReplayWriteSequence(const uint8_t* commandData, size_t commandDataLen);
|
||||||
ReturnValue_t prepareTcCamCmdSend(const uint8_t* commandData, size_t commandDataLen);
|
ReturnValue_t prepareTcCamCmdSend(const uint8_t* commandData, size_t commandDataLen);
|
||||||
ReturnValue_t prepareTcModeIdle();
|
ReturnValue_t prepareTcModeIdle();
|
||||||
void finishTcPrep();
|
void finishTcPrep(size_t packetLen);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief This function checks the crc of the received PLOC reply.
|
* @brief This function checks the crc of the received PLOC reply.
|
||||||
|
@ -55,9 +55,8 @@ class AcsController : public ExtendedControllerBase {
|
|||||||
|
|
||||||
void copyMgmData();
|
void copyMgmData();
|
||||||
|
|
||||||
|
|
||||||
// Sun Sensors
|
// Sun Sensors
|
||||||
std::array<SUS::SusDataset, 12> susSets {
|
std::array<SUS::SusDataset, 12> susSets{
|
||||||
SUS::SusDataset(objects::SUS_0_N_LOC_XFYFZM_PT_XF),
|
SUS::SusDataset(objects::SUS_0_N_LOC_XFYFZM_PT_XF),
|
||||||
SUS::SusDataset(objects::SUS_1_N_LOC_XBYFZM_PT_XB),
|
SUS::SusDataset(objects::SUS_1_N_LOC_XBYFZM_PT_XB),
|
||||||
SUS::SusDataset(objects::SUS_2_N_LOC_XFYBZB_PT_YB),
|
SUS::SusDataset(objects::SUS_2_N_LOC_XFYBZB_PT_YB),
|
||||||
|
@ -8,10 +8,7 @@
|
|||||||
|
|
||||||
namespace acsctrl {
|
namespace acsctrl {
|
||||||
|
|
||||||
enum SetIds : uint32_t {
|
enum SetIds : uint32_t { MGM_SENSOR_DATA, SUS_SENSOR_DATA };
|
||||||
MGM_SENSOR_DATA,
|
|
||||||
SUS_SENSOR_DATA
|
|
||||||
};
|
|
||||||
|
|
||||||
enum PoolIds : lp_id_t {
|
enum PoolIds : lp_id_t {
|
||||||
MGM_0_LIS3_UT,
|
MGM_0_LIS3_UT,
|
||||||
@ -63,11 +60,11 @@ class MgmData : public StaticLocalDataSet<MGM_SET_ENTRIES> {
|
|||||||
private:
|
private:
|
||||||
};
|
};
|
||||||
|
|
||||||
|
class SusData : public StaticLocalDataSet<SUS_SET_ENTRIES> {
|
||||||
class SusData: public StaticLocalDataSet<SUS_SET_ENTRIES> {
|
public:
|
||||||
public:
|
|
||||||
SusData(HasLocalDataPoolIF* hkOwner) : StaticLocalDataSet(hkOwner, SUS_SENSOR_DATA) {}
|
SusData(HasLocalDataPoolIF* hkOwner) : StaticLocalDataSet(hkOwner, SUS_SENSOR_DATA) {}
|
||||||
private:
|
|
||||||
|
private:
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace acsctrl
|
} // namespace acsctrl
|
||||||
|
2
tmtc
2
tmtc
@ -1 +1 @@
|
|||||||
Subproject commit d8b0d81ef3165325284956456138b529f6e9fae0
|
Subproject commit 00e99292cc158a347f485507537fa5b63262243b
|
Loading…
Reference in New Issue
Block a user