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 namespace OpenDDS { namespace FaceTSS { namespace config {
00010
00011 class OpenDDS_FACE_Export QosSettings {
00012 public:
00013 QosSettings();
00014
00015 enum QosLevel {
00016 publisher,
00017 subscriber,
00018 datawriter,
00019 datareader
00020 };
00021
00022 int set_qos(QosLevel level, const char* name, const char* value);
00023
00024 void apply_to(DDS::PublisherQos& target) const;
00025 void apply_to(DDS::SubscriberQos& target) const;
00026 void apply_to(DDS::DataWriterQos& target) const;
00027 void apply_to(DDS::DataReaderQos& target) const;
00028
00029 DDS::PublisherQos& publisher_qos() { return publisher_qos_; }
00030 DDS::SubscriberQos& subscriber_qos() { return subscriber_qos_; }
00031 DDS::DataWriterQos& datawriter_qos() { return datawriter_qos_; }
00032 DDS::DataReaderQos& datareader_qos() { return datareader_qos_; }
00033
00034 private:
00035
00036
00037 DDS::PublisherQos publisher_qos_;
00038 DDS::SubscriberQos subscriber_qos_;
00039 DDS::DataWriterQos datawriter_qos_;
00040 DDS::DataReaderQos datareader_qos_;
00041
00042 int set_qos(DDS::PublisherQos& target, const char* name, const char* value);
00043 int set_qos(DDS::SubscriberQos& target, const char* name, const char* value);
00044 int set_qos(DDS::DataWriterQos& target, const char* name, const char* value);
00045 int set_qos(DDS::DataReaderQos& target, const char* name, const char* value);
00046 };
00047
00048 typedef OPENDDS_MAP(OPENDDS_STRING, QosSettings) QosMap;
00049
00050 } } }
00051
00052 #endif