metadata recvd indication
This commit is contained in:
parent
b1bd631322
commit
26ea6606bf
@ -169,5 +169,14 @@ ReturnValue_t cfdp::DestHandler::startTransaction(MetadataPduReader& reader, Met
|
|||||||
return FAILED;
|
return FAILED;
|
||||||
}
|
}
|
||||||
step = TransactionStep::RECEIVING_FILE_DATA_PDUS;
|
step = TransactionStep::RECEIVING_FILE_DATA_PDUS;
|
||||||
|
MetadataRecvdParams params;
|
||||||
|
params.sourceId = tp.pduConf.sourceId;
|
||||||
|
params.fileSize = tp.fileSize.getSize();
|
||||||
|
params.destFileName = tp.destName.data();
|
||||||
|
params.sourceFileName = tp.sourceName.data();
|
||||||
|
params.id = tp.transactionId;
|
||||||
|
params.msgsToUserArray = dynamic_cast<MessageToUserTlv*>(userTlvVec.data());
|
||||||
|
params.msgsToUserLen = info.getOptionsLen();
|
||||||
|
dp.user.metadataRecvdIndication(params);
|
||||||
return OK;
|
return OK;
|
||||||
}
|
}
|
||||||
|
@ -29,10 +29,11 @@ struct TransactionFinishedParams {
|
|||||||
struct MetadataRecvdParams {
|
struct MetadataRecvdParams {
|
||||||
TransactionId id;
|
TransactionId id;
|
||||||
EntityId sourceId;
|
EntityId sourceId;
|
||||||
size_t fileSize;
|
uint64_t fileSize;
|
||||||
const char* sourceFileName;
|
const char* sourceFileName = "";
|
||||||
const char* destFileName;
|
const char* destFileName = "";
|
||||||
std::vector<MessageToUserTlv*> msgsToUser;
|
size_t msgsToUserLen = 0;
|
||||||
|
const MessageToUserTlv* msgsToUserArray = nullptr;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct FileSegmentRecvdParams {
|
struct FileSegmentRecvdParams {
|
||||||
@ -63,6 +64,16 @@ class UserBase {
|
|||||||
virtual void transactionIndication(TransactionId id) = 0;
|
virtual void transactionIndication(TransactionId id) = 0;
|
||||||
virtual void eofSentIndication(TransactionId id) = 0;
|
virtual void eofSentIndication(TransactionId id) = 0;
|
||||||
virtual void transactionFinishedIndication(TransactionFinishedParams params) = 0;
|
virtual void transactionFinishedIndication(TransactionFinishedParams params) = 0;
|
||||||
|
/**
|
||||||
|
* Will be called if metadata was received.
|
||||||
|
*
|
||||||
|
* IMPORTANT: The passed struct contains the messages to the user in form of a raw C array.
|
||||||
|
* The TLVs in these arrays are zero-copy types, which means that they point to the raw data
|
||||||
|
* inside the metadata packet directly. The metadata packet will be deleted from the TC store
|
||||||
|
* shortly after it was processed. If some of the data is to be cached and/or used after the
|
||||||
|
* function call, it needs to be copied into another user-provided buffer.
|
||||||
|
* @param params
|
||||||
|
*/
|
||||||
virtual void metadataRecvdIndication(MetadataRecvdParams params) = 0;
|
virtual void metadataRecvdIndication(MetadataRecvdParams params) = 0;
|
||||||
virtual void fileSegmentRecvdIndication(FileSegmentRecvdParams params) = 0;
|
virtual void fileSegmentRecvdIndication(FileSegmentRecvdParams params) = 0;
|
||||||
virtual void reportIndication(TransactionId id, StatusReportIF& report) = 0;
|
virtual void reportIndication(TransactionId id, StatusReportIF& report) = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user