mirror of
https://github.com/FairRootGroup/FairMQ.git
synced 2025-10-15 09:31:45 +00:00
(WIP) SDK: Implement Topology::ChangeState
This commit is contained in:
committed by
Dennis Klein
parent
499ffcd300
commit
18dc536f3d
@@ -9,18 +9,11 @@
|
||||
#ifndef FAIR_MQ_SDK_DDSTOPOLOGY_H
|
||||
#define FAIR_MQ_SDK_DDSTOPOLOGY_H
|
||||
|
||||
#include <fairmq/sdk/DDSInfo.h>
|
||||
#include <boost/filesystem.hpp>
|
||||
#include <fairmq/sdk/DDSEnvironment.h>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
namespace dds {
|
||||
namespace topology_api {
|
||||
|
||||
class CTopology;
|
||||
|
||||
} // namespace topology_api
|
||||
} // namespace dds
|
||||
|
||||
namespace fair {
|
||||
namespace mq {
|
||||
namespace sdk {
|
||||
@@ -29,23 +22,44 @@ namespace sdk {
|
||||
* @class DDSTopology DDSTopology.h <fairmq/sdk/DDSTopology.h>
|
||||
* @brief Represents a DDS topology
|
||||
*/
|
||||
class DDSSession
|
||||
class DDSTopology
|
||||
{
|
||||
public:
|
||||
using CSessionPtr = std::shared_ptr<dds::tools_api::CSession>;
|
||||
using Path = boost::filesystem::path;
|
||||
|
||||
explicit DDSSession();
|
||||
explicit DDSSession(std::string existing_session_id);
|
||||
DDSTopology() = delete;
|
||||
|
||||
/// @brief Construct from file
|
||||
/// @param topoFile DDS topology xml file
|
||||
/// @param env DDS environment
|
||||
explicit DDSTopology(Path topoFile, DDSEnvironment env = DDSEnvironment());
|
||||
|
||||
/// @brief Get associated DDS environment
|
||||
auto GetEnv() const -> DDSEnvironment;
|
||||
|
||||
/// @brief Get path to DDS topology xml, if it is known
|
||||
/// @throw std::runtime_error
|
||||
auto GetTopoFile() const -> Path;
|
||||
|
||||
void CreateTopology(Path);
|
||||
|
||||
/// @brief Get number of required agents for this topology
|
||||
int GetNumRequiredAgents();
|
||||
|
||||
/// @brief Get list of devices
|
||||
std::vector<uint64_t> GetDeviceList();
|
||||
|
||||
/// @brief Get the name of the topology
|
||||
// auto GetName() const -> std::string;
|
||||
|
||||
friend auto operator<<(std::ostream&, const DDSTopology&) -> std::ostream&;
|
||||
|
||||
auto GetId() const -> const std::string&;
|
||||
auto IsRunning() const -> bool;
|
||||
private:
|
||||
CSessionPtr fSession;
|
||||
const std::string fId;
|
||||
struct Impl;
|
||||
std::shared_ptr<Impl> fImpl;
|
||||
};
|
||||
|
||||
auto LoadDDSEnv(const std::string& config_home = "", const std::string& prefix = DDSInstallPrefix)
|
||||
-> void;
|
||||
using DDSTopo = DDSTopology;
|
||||
|
||||
} // namespace sdk
|
||||
} // namespace mq
|
||||
|
Reference in New Issue
Block a user