Files
qt6-migration-pipeline/external/rti_connext_dds-7.7.0/include/rti/cds/detail/CloudDiscoveryServiceImpl.hpp
T
torstenandCopilot 342ffd3e5c Update submodule to latest BUILD_RTI fixes
- HandlerMinelayerData: BUILD_RTI Guards für RTI-Abhängigkeiten
- svcTabCommon: Export-Header-Fix via Fallback-Target
- TrainingAreaBase: Stub-Header für BUILD_RTI=OFF
- ddsfts: Include-Pfad und Dependency-Fixes
- BUILD_RTI=OFF Compilation vollständig unterstützt

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Entire-Checkpoint: 01M0JNZA586SACX1PRZ2DJAE5S
2026-08-21 19:30:20 +02:00

87 lines
2.3 KiB
C++

/**
* (c) Copyright, Real-Time Innovations, 2020. All rights reserved.
*
* No duplications, whole or partial, manual or electronic, may be made
* without express written permission. Any such copies, or
* revisions thereof, must display this notice unaltered.
* This code contains trade secrets of Real-Time Innovations, Inc.
*/
#ifndef RTI_CDS_CLOUD_DISCOVERY_SERVICE_IMPL_HPP_
#define RTI_CDS_CLOUD_DISCOVERY_SERVICE_IMPL_HPP_
#include <dds/core/refmacros.hpp>
#include <rti/core/detail/SelfReference.hpp>
#include <rti/core/Exception.hpp>
#include "clouddiscoveryservice/clouddiscoveryservice_service.h"
#include <rti/cds/ServiceProperty.hpp>
namespace rti { namespace cds {
class CloudDiscoveryServiceImpl
: public rti::core::detail::RetainableType<CloudDiscoveryServiceImpl>
{
public:
explicit CloudDiscoveryServiceImpl(const ServiceProperty& property)
{
native_ = RTI_CDS_Service_new(&property.native());
rti::core::check_create_entity(native_, "CloudDiscoveryService");
}
CloudDiscoveryServiceImpl(const RTI_CDS_Property& property) : native_(NULL)
{
native_ = RTI_CDS_Service_new(&property);
rti::core::check_create_entity(native_, "CloudDiscoveryService");
}
CloudDiscoveryServiceImpl(RTI_CDS_Service *native) : native_(native)
{
rti::core::check_create_entity(native_, "CloudDiscoveryService");
}
~CloudDiscoveryServiceImpl()
{
RTI_CDS_Service_delete(native_);
}
void start()
{
if (!RTI_CDS_Service_start(native_)) {
throw dds::core::Error("Error starting CloudDiscoveryService");
}
}
void stop()
{
if (!RTI_CDS_Service_stop(native_)) {
throw dds::core::Error("Error stopping CloudDiscoveryService");
}
}
bool is_started()
{
return RTI_CDS_Service_is_started(native_);
}
bool update_rtps_psk_secret_passphrase(
const std::string rtps_psk_secret_passphrase)
{
return RTI_CDS_Service_update_rtps_psk_secret_passphrase(
native_,
rtps_psk_secret_passphrase.c_str());
}
RTI_CDS_Service* native() const
{
return native_;
}
private:
RTI_CDS_Service *native_;
};
}}
#endif // RTI_CDS_CLOUD_DISCOVERY_SERVICE_IMPL_HPP_