Skip to content

Commit b292d72

Browse files
Brought in cf_utils for list traversals
1 parent 0eb9b65 commit b292d72

11 files changed

Lines changed: 997 additions & 157 deletions

File tree

Svc/Ccsds/CfdpManager/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ register_fprime_library(
2323
"${CMAKE_CURRENT_LIST_DIR}/cf_cfdp_s.cpp"
2424
"${CMAKE_CURRENT_LIST_DIR}/cf_chunk.cpp"
2525
"${CMAKE_CURRENT_LIST_DIR}/cf_clist.cpp"
26+
"${CMAKE_CURRENT_LIST_DIR}/cf_utils.cpp"
2627
"${CMAKE_CURRENT_LIST_DIR}/CfeStubs.hpp"
2728
"${CMAKE_CURRENT_LIST_DIR}/CfdpTimer.cpp"
2829
# TODO This should be moved to the F' config directory

Svc/Ccsds/CfdpManager/CfdpManager.cpp

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ void CfdpManager ::TODO_cmdHandler(FwOpcodeType opCode, U32 cmdSeq) {
7070
// differences between F' and cFE
7171
// ----------------------------------------------------------------------
7272

73-
CfdpStatus::T CfdpManager ::cfdpGetPduBuffer(CF_Logical_PduBuffer_t* pduPtr, U8* msgPtr, U8 channelNum, FwSizeType size)
73+
CfdpStatus::T CfdpManager ::getPduBuffer(CF_Logical_PduBuffer_t* pduPtr, U8* msgPtr, U8 channelNum, FwSizeType size)
7474
{
7575
// FwIndexType portNum;
7676

@@ -86,6 +86,9 @@ CfdpStatus::T CfdpManager ::cfdpGetPduBuffer(CF_Logical_PduBuffer_t* pduPtr, U8*
8686
FW_ASSERT(pduPtr == NULL);
8787
FW_ASSERT(msgPtr == NULL);
8888

89+
// TODO Add output throtteling and guards here
90+
// CF implemented this in CF_CFDP_MsgOutGet()
91+
8992
for(U32 i = 0; i < CFDP_MANAGER_NUM_BUFFERS; i++)
9093
{
9194
if(this->pduBuffers[i].inUse == false)
@@ -109,7 +112,7 @@ CfdpStatus::T CfdpManager ::cfdpGetPduBuffer(CF_Logical_PduBuffer_t* pduPtr, U8*
109112

110113
// TODO call this from reset
111114
// Check for other escape routes
112-
void CfdpManager ::cfdpReturnPduBuffer(U8 channelNum, CF_Logical_PduBuffer_t * pdu)
115+
void CfdpManager ::returnPduBuffer(U8 channelNum, CF_Logical_PduBuffer_t * pdu)
113116
{
114117
// FwIndexType portNum;
115118

@@ -125,7 +128,7 @@ void CfdpManager ::cfdpReturnPduBuffer(U8 channelNum, CF_Logical_PduBuffer_t * p
125128
this->returnBufferHelper(pdu);
126129
}
127130

128-
void CfdpManager ::cfdpSendPduBuffer(U8 channelNum, CF_Logical_PduBuffer_t * pdu, const U8* msgPtr)
131+
void CfdpManager ::sendPduBuffer(U8 channelNum, CF_Logical_PduBuffer_t * pdu, const U8* msgPtr)
129132
{
130133
FwIndexType portNum;
131134
FwSizeType msgSize;

Svc/Ccsds/CfdpManager/CfdpManager.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,11 @@ class CfdpManager final : public CfdpManagerComponentBase {
5151
// ----------------------------------------------------------------------
5252

5353
// Equivelent of CF_CFDP_MsgOutGet
54-
CfdpStatus::T cfdpGetPduBuffer(CF_Logical_PduBuffer_t* pduPtr, U8* msgPtr, U8 channelNum, FwSizeType size);
54+
CfdpStatus::T getPduBuffer(CF_Logical_PduBuffer_t* pduPtr, U8* msgPtr, U8 channelNum, FwSizeType size);
5555
// Not sure there is an equivelent
56-
void cfdpReturnPduBuffer(U8 channelNum, CF_Logical_PduBuffer_t *);
56+
void returnPduBuffer(U8 channelNum, CF_Logical_PduBuffer_t *);
5757
// Equivelent of CF_CFDP_Send
58-
void cfdpSendPduBuffer(U8 channelNum, CF_Logical_PduBuffer_t * pdu, const U8* msgPtr);
58+
void sendPduBuffer(U8 channelNum, CF_Logical_PduBuffer_t * pdu, const U8* msgPtr);
5959

6060
private:
6161
// ----------------------------------------------------------------------

0 commit comments

Comments
 (0)