9 #ifndef FAIR_MQ_SDK_DDSSESSION_H 10 #define FAIR_MQ_SDK_DDSSESSION_H 12 #include <fairmq/sdk/DDSEnvironment.h> 13 #include <fairmq/sdk/DDSInfo.h> 14 #include <fairmq/sdk/DDSTask.h> 16 #include <boost/filesystem.hpp> 35 enum class DDSRMSPlugin
40 auto operator<<(std::ostream& os, DDSRMSPlugin plugin) -> std::ostream&;
41 auto operator>>(std::istream& is, DDSRMSPlugin& plugin) -> std::istream&;
49 using Id = std::uint64_t;
59 using Id = std::string;
60 using Quantity = std::uint32_t;
61 using Path = boost::filesystem::path;
69 explicit DDSSession(std::shared_ptr<dds::tools_api::CSession> nativeSession,
DDSEnv env = {});
72 auto GetId()
const -> Id;
73 auto GetRMSPlugin()
const -> DDSRMSPlugin;
74 auto SetRMSPlugin(DDSRMSPlugin) -> void;
75 auto GetRMSConfig()
const -> Path;
76 auto SetRMSConfig(Path)
const -> void;
77 auto IsStoppedOnDestruction()
const -> bool;
78 auto StopOnDestruction(
bool stop =
true) -> void;
79 auto IsRunning()
const -> bool;
80 auto SubmitAgents(Quantity agents) -> void;
84 Quantity executing = 0;
87 auto RequestAgentInfo() -> std::vector<DDSAgent>;
88 auto RequestTaskInfo() -> std::vector<DDSTask>;
91 std::string activeTopologyName;
94 auto WaitForIdleAgents(Quantity) -> void;
95 auto WaitForOnlyIdleAgents() -> void;
96 auto WaitForExecutingAgents(Quantity) -> void;
97 auto ActivateTopology(
const Path& topoFile) -> void;
101 void StartDDSService();
102 void SubscribeToCommands(std::function<
void(
const std::string& msg,
const std::string& condition, uint64_t senderId)>);
103 void UnsubscribeFromCommands();
104 void SendCommand(
const std::string&,
const std::string& =
"");
105 void SendCommand(
const std::string&, DDSChannel::Id);
106 auto GetTaskId(DDSChannel::Id)
const -> DDSTask::Id;
108 friend auto operator<<(std::ostream& os,
const DDSSession& session) -> std::ostream&;
112 std::shared_ptr<Impl> fImpl;
Represents a DDS session.
Definition: DDSSession.h:56
Definition: DDSSession.cxx:58
Definition: DDSSession.h:46
Definition: DDSSession.h:81
Tools for interfacing containers to the transport via polymorphic allocators.
Definition: DeviceRunner.h:23
Definition: DDSSession.h:89
Sets up the DDS environment (object helper)
Definition: DDSEnvironment.h:24
Represents a DDS topology.
Definition: DDSTopology.h:29