00001
00002
00003
00004
00005
00006
00007
00008 #ifndef OPENDDS_DCPS_FEATURE_DISABLED_QOS_CHECK_H
00009 #define OPENDDS_DCPS_FEATURE_DISABLED_QOS_CHECK_H
00010
00011 #include "dds/DCPS/Qos_Helper.h"
00012
00013 #ifdef OPENDDS_NO_OWNERSHIP_PROFILE
00014 #define OPENDDS_NO_OWNERSHIP_PROFILE_COMPATIBILITY_CHECK(qos, error_rtn_value) \
00015 if (qos.history.kind == ::DDS::KEEP_ALL_HISTORY_QOS || qos.history.depth > 1) { \
00016 ACE_ERROR((LM_ERROR, \
00017 ACE_TEXT("(%P|%t) ERROR: ") \
00018 ACE_TEXT("Feature ownership_profile disabled, ") \
00019 ACE_TEXT("therefore history must be KEEP_LAST, depth 1.\n"))); \
00020 return error_rtn_value; \
00021 }
00022 #else
00023 #define OPENDDS_NO_OWNERSHIP_PROFILE_COMPATIBILITY_CHECK(qos, error_rtn_value)
00024 #endif
00025
00026 #ifdef OPENDDS_NO_OWNERSHIP_KIND_EXCLUSIVE
00027 #define OPENDDS_NO_OWNERSHIP_KIND_EXCLUSIVE_COMPATIBILITY_CHECK(qos, error_rtn_value) \
00028 if (qos.ownership.kind == ::DDS::EXCLUSIVE_OWNERSHIP_QOS) { \
00029 ACE_ERROR((LM_ERROR, \
00030 ACE_TEXT("(%P|%t) ERROR: ") \
00031 ACE_TEXT("Feature ownership_kind_exclusive disabled, ") \
00032 ACE_TEXT("therefore ownership kind must be SHARED. \n"))); \
00033 return error_rtn_value; \
00034 }
00035 #define OPENDDS_NO_OWNERSHIP_STRENGTH_COMPATIBILITY_CHECK(qos, error_rtn_value) \
00036 if (qos.ownership_strength.value != 0) { \
00037 ACE_ERROR((LM_ERROR, \
00038 ACE_TEXT("(%P|%t) ERROR: ") \
00039 ACE_TEXT("Feature ownership_kind_exclusive disabled, ") \
00040 ACE_TEXT("therefore ownership strength must be the default. \n"))); \
00041 return error_rtn_value; \
00042 }
00043 #else
00044 #define OPENDDS_NO_OWNERSHIP_KIND_EXCLUSIVE_COMPATIBILITY_CHECK(qos, error_rtn_value)
00045 #define OPENDDS_NO_OWNERSHIP_STRENGTH_COMPATIBILITY_CHECK(qos, error_rtn_value)
00046 #endif
00047
00048 #ifdef OPENDDS_NO_OBJECT_MODEL_PROFILE
00049 #define OPENDDS_NO_OBJECT_MODEL_PROFILE_COMPATIBILITY_CHECK(qos, error_rtn_value) \
00050 if (qos.presentation.access_scope == ::DDS::GROUP_PRESENTATION_QOS) { \
00051 ACE_ERROR((LM_ERROR, \
00052 ACE_TEXT("(%P|%t) ERROR: ") \
00053 ACE_TEXT("Feature object_model_profile disabled, ") \
00054 ACE_TEXT("therefore presentation access scope cannot be GROUP. \n"))); \
00055 return error_rtn_value; \
00056 } \
00057 if (qos.presentation.access_scope == ::DDS::TOPIC_PRESENTATION_QOS) { \
00058 ACE_ERROR((LM_ERROR, \
00059 ACE_TEXT("(%P|%t) ERROR: ") \
00060 ACE_TEXT("Feature object_model_profile disabled. ") \
00061 ACE_TEXT("Although not part of the profile, currently ") \
00062 ACE_TEXT("this means presentation access scope cannot be TOPIC. \n"))); \
00063 return error_rtn_value; \
00064 }
00065 #else
00066 #define OPENDDS_NO_OBJECT_MODEL_PROFILE_COMPATIBILITY_CHECK(qos, error_rtn_value)
00067 #endif
00068
00069 #ifdef OPENDDS_NO_PERSISTENCE_PROFILE
00070
00071 #define OPENDDS_NO_DURABILITY_SERVICE_COMPATIBILITY_CHECK(qos, error_rtn_value) \
00072 if (qos.durability_service != TheServiceParticipant->initial_DurabilityServiceQosPolicy()) { \
00073 ACE_ERROR((LM_ERROR, \
00074 ACE_TEXT("(%P|%t) ERROR: ") \
00075 ACE_TEXT("Feature persistence_profile disabled, ") \
00076 ACE_TEXT("therefore durability service must be the default. \n"))); \
00077 return error_rtn_value; \
00078 }
00079
00080 #define OPENDDS_NO_DURABILITY_KIND_TRANSIENT_PERSISTENT_COMPATIBILITY_CHECK(qos, error_rtn_value) \
00081 if (qos.durability.kind == ::DDS::TRANSIENT_DURABILITY_QOS || \
00082 qos.durability.kind == ::DDS::PERSISTENT_DURABILITY_QOS) { \
00083 ACE_ERROR((LM_ERROR, \
00084 ACE_TEXT("(%P|%t) ERROR: ") \
00085 ACE_TEXT("Feature persistence_profile disabled, ") \
00086 ACE_TEXT("therefore durability kind must not ") \
00087 ACE_TEXT("be TRANSIENT_DURABILITY_QOS or PERSISTENT_DURABILITY_QOS. \n"))); \
00088 return error_rtn_value; \
00089 }
00090
00091 #else
00092
00093 #define OPENDDS_NO_DURABILITY_SERVICE_COMPATIBILITY_CHECK(qos, error_rtn_value)
00094 #define OPENDDS_NO_DURABILITY_KIND_TRANSIENT_PERSISTENT_COMPATIBILITY_CHECK(qos, error_rtn_value)
00095
00096 #endif
00097
00098 #endif