basic structure for ILH PLOC control
This commit is contained in:
@ -8,8 +8,8 @@
|
||||
/**
|
||||
* @brief This is the device handler for the PLOC.
|
||||
*
|
||||
* @details The PLOC uses the space packet protocol for communication. On each command the PLOC
|
||||
* answers at least with one acknowledgment and one execution report.
|
||||
* @details The PLOC uses the space packet protocol for communication. To each command the PLOC
|
||||
* answers with at least one acknowledgment and one execution report.
|
||||
*
|
||||
* @author J. Meier
|
||||
*/
|
||||
@ -53,7 +53,6 @@ private:
|
||||
static const ReturnValue_t RECEIVED_ACK_FAILURE = MAKE_RETURN_CODE(0xA1); //!> Received ACK failure reply from PLOC
|
||||
static const ReturnValue_t RECEIVED_EXE_FAILURE = MAKE_RETURN_CODE(0xA2); //!> Received execution failure reply from PLOC
|
||||
static const ReturnValue_t INVALID_APID = MAKE_RETURN_CODE(0xA3); //!> Received space packet with invalid APID from PLOC
|
||||
static const ReturnValue_t SUBSEQUENCE_COUNT_FAILURE = MAKE_RETURN_CODE(0xA4); //!> The packet sequence count does not match the expected packet sequence count. There may be one packet lost.
|
||||
|
||||
static const uint8_t SUBSYSTEM_ID = SUBSYSTEM_ID::PLOC_HANDLER;
|
||||
|
||||
@ -63,7 +62,7 @@ private:
|
||||
static const Event CRC_FAILURE_EVENT = MAKE_EVENT(4, severity::LOW); //!> PLOC reply has invalid crc
|
||||
|
||||
static const uint16_t APID_MASK = 0x7FF;
|
||||
static const unit16_t PACKET_SEQUENCE_COUNT_MASK = 0x3FFF;
|
||||
static const uint16_t PACKET_SEQUENCE_COUNT_MASK = 0x3FFF;
|
||||
|
||||
uint8_t commandBuffer[PLOC::MAX_COMMAND_SIZE];
|
||||
|
||||
@ -184,14 +183,19 @@ private:
|
||||
void disableExeReportReply();
|
||||
|
||||
/**
|
||||
* @brief This function checks the subsequence count of a received space packet to detect
|
||||
* lost packets.
|
||||
* @brief This function checks and increments the packet sequence count of a received space
|
||||
* packet.
|
||||
*
|
||||
* @param data Pointer to a space packet.
|
||||
*
|
||||
* @return RETURN_OK if successful, else SUBSEQUENCE_COUNT_FAILURE
|
||||
* @return RETURN_OK if successful
|
||||
*
|
||||
* @details There should be never a case in which a wrong packet sequence count is received
|
||||
* because the communication scheme between PLOC and OBC always follows a strict
|
||||
* procedure. Thus this function mainly serves for debugging purposes to detected an
|
||||
* invalid handling of the packet sequence count.
|
||||
*/
|
||||
ReturnValue_t checkSubsequenceCount(const uint8_t* data);
|
||||
ReturnValue_t checkPacketSequenceCount(const uint8_t* data);
|
||||
};
|
||||
|
||||
#endif /* MISSION_DEVICES_PLOCHANDLER_H_ */
|
||||
|
Reference in New Issue
Block a user