some more docs

This commit is contained in:
Robin Müller 2022-08-24 08:44:20 +02:00
parent 26ea6606bf
commit eb29b79467
No known key found for this signature in database
GPG Key ID: 71B58F8A3CDFA9AC
2 changed files with 24 additions and 19 deletions

View File

@ -169,12 +169,10 @@ ReturnValue_t cfdp::DestHandler::startTransaction(MetadataPduReader& reader, Met
return FAILED;
}
step = TransactionStep::RECEIVING_FILE_DATA_PDUS;
MetadataRecvdParams params;
params.sourceId = tp.pduConf.sourceId;
MetadataRecvdParams params(tp.transactionId, 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);

View File

@ -27,9 +27,11 @@ struct TransactionFinishedParams {
};
struct MetadataRecvdParams {
TransactionId id;
EntityId sourceId;
uint64_t fileSize;
MetadataRecvdParams(const TransactionId& id, const EntityId& sourceId):
id(id), sourceId(sourceId) {}
const TransactionId& id;
const EntityId& sourceId;
uint64_t fileSize = 0;
const char* sourceFileName = "";
const char* destFileName = "";
size_t msgsToUserLen = 0;
@ -44,8 +46,6 @@ struct FileSegmentRecvdParams {
std::pair<const uint8_t*, size_t> segmentMetadata;
};
class UserBase {
public:
/**
* @brief Base class which provides a user interface to interact with CFDP handlers.
*
@ -57,8 +57,15 @@ class UserBase {
* handler objects. The base class provides default implementation for the user indication
* primitives specified in the CFDP standard. The user can override these implementations
* to provide custom indication handlers.
*
* Please note that for all indication callbacks, the passed transaction ID reference will
* become invalid shortly after the function has been executed. If the transaction ID is to be
* cached or used, create an own copy of it.
* @param vfs Virtual Filestore Object. Will be used for all file operations
*/
class UserBase {
public:
explicit UserBase(HasFileSystemIF& vfs);
virtual void transactionIndication(TransactionId id) = 0;