QosSettings.h
Go to the documentation of this file.00001 #ifndef OPENDDS_QOS_SETTINGS_H
00002 #define OPENDDS_QOS_SETTINGS_H
00003
00004 #include "dds/DdsDcpsInfrastructureC.h"
00005 #include "dds/DCPS/Definitions.h"
00006 #include "dds/DCPS/PoolAllocator.h"
00007 #include "FACE/OpenDDS_FACE_Export.h"
00008
00009 OPENDDS_BEGIN_VERSIONED_NAMESPACE_DECL
00010
00011 namespace OpenDDS { namespace FaceTSS { namespace config {
00012
00013 class OpenDDS_FACE_Export QosSettings {
00014 public:
00015 QosSettings();
00016
00017 enum QosLevel {
00018 publisher,
00019 subscriber,
00020 datawriter,
00021 datareader
00022 };
00023
00024 int set_qos(QosLevel level, const char* name, const char* value);
00025
00026 void apply_to(DDS::PublisherQos& target) const;
00027 void apply_to(DDS::SubscriberQos& target) const;
00028 void apply_to(DDS::DataWriterQos& target) const;
00029 void apply_to(DDS::DataReaderQos& target) const;
00030
00031 DDS::PublisherQos& publisher_qos() { return publisher_qos_; }
00032 DDS::SubscriberQos& subscriber_qos() { return subscriber_qos_; }
00033 DDS::DataWriterQos& datawriter_qos() { return datawriter_qos_; }
00034 DDS::DataReaderQos& datareader_qos() { return datareader_qos_; }
00035
00036 private:
00037
00038
00039 DDS::PublisherQos publisher_qos_;
00040 DDS::SubscriberQos subscriber_qos_;
00041 DDS::DataWriterQos datawriter_qos_;
00042 DDS::DataReaderQos datareader_qos_;
00043
00044 int set_qos(DDS::PublisherQos& target, const char* name, const char* value);
00045 int set_qos(DDS::SubscriberQos& target, const char* name, const char* value);
00046 int set_qos(DDS::DataWriterQos& target, const char* name, const char* value);
00047 int set_qos(DDS::DataReaderQos& target, const char* name, const char* value);
00048 };
00049
00050 typedef OPENDDS_MAP(OPENDDS_STRING, QosSettings) QosMap;
00051
00052 } } }
00053
00054 OPENDDS_END_VERSIONED_NAMESPACE_DECL
00055
00056 #endif