mirror of
https://github.com/FairRootGroup/FairMQ.git
synced 2025-10-13 08:41:16 +00:00
SDK: Require DDS 2.5.20
* Use the new interface: CTopology::getName * Enhance Example.DDS
This commit is contained in:
parent
7d1ee82c6b
commit
de4fca177e
|
@ -75,7 +75,7 @@ if(BUILD_NANOMSG_TRANSPORT)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(BUILD_SDK)
|
if(BUILD_SDK)
|
||||||
set(required_dds_version 2.5.7)
|
set(required_dds_version 2.5.20)
|
||||||
else()
|
else()
|
||||||
set(required_dds_version 2.4)
|
set(required_dds_version 2.4)
|
||||||
endif()
|
endif()
|
||||||
|
|
|
@ -41,8 +41,13 @@ dds-info --wait-for-idle-agents ${requiredNofAgents}
|
||||||
|
|
||||||
topologyFile=@DATA_DIR@/ex-dds-topology.xml
|
topologyFile=@DATA_DIR@/ex-dds-topology.xml
|
||||||
echo "TOPOLOGY FILE: ${topologyFile}"
|
echo "TOPOLOGY FILE: ${topologyFile}"
|
||||||
|
# TODO Uncomment once DDS 2.6 is released
|
||||||
|
# echo "TOPOLOGY NAME: $(dds-topology --disable-validation --topology-name ${topologyFile})"
|
||||||
|
|
||||||
|
# TODO Uncomment once DDS 2.6 is released
|
||||||
|
# dds-info --active-topology
|
||||||
dds-topology --disable-validation --activate ${topologyFile}
|
dds-topology --disable-validation --activate ${topologyFile}
|
||||||
|
# dds-info --active-topology
|
||||||
|
|
||||||
echo "------------------------"
|
echo "------------------------"
|
||||||
echo "...waiting for Topology to finish..."
|
echo "...waiting for Topology to finish..."
|
||||||
|
@ -54,7 +59,10 @@ echo "...waiting for ${requiredNofAgents} idle agents..."
|
||||||
dds-info --wait-for-idle-agents ${requiredNofAgents}
|
dds-info --wait-for-idle-agents ${requiredNofAgents}
|
||||||
echo "------------------------"
|
echo "------------------------"
|
||||||
|
|
||||||
|
# TODO Uncomment once DDS 2.6 is released
|
||||||
|
# dds-info --active-topology
|
||||||
dds-topology --stop
|
dds-topology --stop
|
||||||
|
# dds-info --active-topology
|
||||||
|
|
||||||
dds-agent-cmd getlog -a
|
dds-agent-cmd getlog -a
|
||||||
logDir="${wrkDir}/logs"
|
logDir="${wrkDir}/logs"
|
||||||
|
|
|
@ -227,7 +227,6 @@ void DDSSession::StartDDSService() { fImpl->fDDSService.start(fImpl->fId); }
|
||||||
|
|
||||||
void DDSSession::SubscribeToCommands(std::function<void(const std::string& msg, const std::string& condition, uint64_t senderId)> cb)
|
void DDSSession::SubscribeToCommands(std::function<void(const std::string& msg, const std::string& condition, uint64_t senderId)> cb)
|
||||||
{
|
{
|
||||||
fImpl->fSession.unsubscribe(); // TODO REMOVE THIS HACK!!!!
|
|
||||||
fImpl->fDDSCustomCmd.subscribe(cb);
|
fImpl->fDDSCustomCmd.subscribe(cb);
|
||||||
// fImpl->fDDSCustomCmd.subscribeOnReply([](const std::string& reply) {
|
// fImpl->fDDSCustomCmd.subscribeOnReply([](const std::string& reply) {
|
||||||
// LOG(debug) << reply;
|
// LOG(debug) << reply;
|
||||||
|
|
|
@ -82,13 +82,13 @@ std::vector<uint64_t> DDSTopology::GetDeviceList()
|
||||||
return taskIDs;
|
return taskIDs;
|
||||||
}
|
}
|
||||||
|
|
||||||
// auto DDSTopology::GetName() const -> std::string { return fImpl->fTopo.getName(); }
|
auto DDSTopology::GetName() const -> std::string { return fImpl->fTopo.getName(); }
|
||||||
|
|
||||||
auto operator<<(std::ostream& os, const DDSTopology& t) -> std::ostream&
|
auto operator<<(std::ostream& os, const DDSTopology& t) -> std::ostream&
|
||||||
try {
|
try {
|
||||||
return os << "DDS topology: " /*<< t.GetName() <<*/ " (loaded from " << t.GetTopoFile() << ")";
|
return os << "DDS topology: " << t.GetName() << " (loaded from " << t.GetTopoFile() << ")";
|
||||||
} catch (std::runtime_error&) {
|
} catch (std::runtime_error&) {
|
||||||
return os << "DDS topology: " /*<< t.GetName()*/;
|
return os << "DDS topology: " << t.GetName();
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace sdk
|
} // namespace sdk
|
||||||
|
|
|
@ -50,7 +50,7 @@ class DDSTopology
|
||||||
std::vector<uint64_t> GetDeviceList();
|
std::vector<uint64_t> GetDeviceList();
|
||||||
|
|
||||||
/// @brief Get the name of the topology
|
/// @brief Get the name of the topology
|
||||||
// auto GetName() const -> std::string;
|
auto GetName() const -> std::string;
|
||||||
|
|
||||||
friend auto operator<<(std::ostream&, const DDSTopology&) -> std::ostream&;
|
friend auto operator<<(std::ostream&, const DDSTopology&) -> std::ostream&;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user