10 #ifndef WRENCH_FILETRANSFERTHREADMESSAGE_H
11 #define WRENCH_FILETRANSFERTHREADMESSAGE_H
15 #include "wrench/services/ServiceMessage.h"
16 #include "wrench/failure_causes/FailureCause.h"
17 #include "wrench/services/file_registry/FileRegistryService.h"
18 #include "wrench/simulation/SimulationTimestampTypes.h"
19 #include "wrench/simulation/Simulation.h"
20 #include "wrench/simulation/SimulationOutput.h"
21 #include "wrench/services/storage/storage_helpers/FileTransferThread.h"
32 class FileTransferThreadMessage :
public ServiceMessage {
39 FileTransferThreadMessage(
double payload) :
40 ServiceMessage(payload) {}
47 class FileTransferThreadNotificationMessage :
public FileTransferThreadMessage {
64 FileTransferThreadNotificationMessage(std::shared_ptr<FileTransferThread> file_transfer_thread,
65 std::shared_ptr<DataFile>file,
66 simgrid::s4u::Mailbox *src_mailbox,
67 std::shared_ptr<FileLocation> src_location,
68 simgrid::s4u::Mailbox *dst_mailbox,
69 std::shared_ptr<FileLocation> dst_location,
70 simgrid::s4u::Mailbox *answer_mailbox_if_read,
71 simgrid::s4u::Mailbox *answer_mailbox_if_write,
72 simgrid::s4u::Mailbox *answer_mailbox_if_copy,
73 bool success, std::shared_ptr<FailureCause> failure_cause) :
74 FileTransferThreadMessage(0),
75 file_transfer_thread(file_transfer_thread),
77 src_mailbox(src_mailbox), src_location(src_location),
78 dst_mailbox(dst_mailbox), dst_location(dst_location),
79 answer_mailbox_if_read(answer_mailbox_if_read),
80 answer_mailbox_if_write(answer_mailbox_if_write),
81 answer_mailbox_if_copy(answer_mailbox_if_copy),
83 failure_cause(failure_cause) {}
86 std::shared_ptr<FileTransferThread> file_transfer_thread;
88 std::shared_ptr<DataFile>file;
91 simgrid::s4u::Mailbox *src_mailbox;
93 std::shared_ptr<FileLocation> src_location;
96 simgrid::s4u::Mailbox *dst_mailbox;
98 std::shared_ptr<FileLocation> dst_location;
101 simgrid::s4u::Mailbox *answer_mailbox_if_read;
103 simgrid::s4u::Mailbox *answer_mailbox_if_write;
105 simgrid::s4u::Mailbox *answer_mailbox_if_copy;
109 std::shared_ptr<FailureCause> failure_cause;
120 #endif //WRENCH_FILETRANSFERTHREADMESSAGE_H