#include <QOS_Common.h>
Static Public Member Functions | |
static void | get_duration (::DDS::Duration_t &duration, const ACE_TCHAR *sec, const ACE_TCHAR *nsec) |
::CORBA::Long | get_qos_long (const ACE_TCHAR *value) |
static void | get_durability_kind (const ::dds::durabilityKind kind,::DDS::DurabilityQosPolicyKind &dds_kind) |
static void | get_history_kind (const ::dds::historyKind kind,::DDS::HistoryQosPolicyKind &dds_kind) |
static void | get_liveliness_kind (const ::dds::livelinessKind kind,::DDS::LivelinessQosPolicyKind &dds_kind) |
static void | get_realiability_kind (const dds::reliabilityKind kind,::DDS::ReliabilityQosPolicyKind &dds_kind) |
static void | get_destination_order_kind (const ::dds::destinationOrderKind kind,::DDS::DestinationOrderQosPolicyKind &dds_kind) |
static void | get_ownership_kind (::dds::ownershipKind kind,::DDS::OwnershipQosPolicyKind &dds_kind) |
Converting most common QOS XML settings to IDL QOS.
Definition at line 22 of file QOS_Common.h.
void QosCommon::get_destination_order_kind | ( | const ::dds::destinationOrderKind | kind, | |
::DDS::DestinationOrderQosPolicyKind & | dds_kind | |||
) | [static] |
Operations which convert QOS XML kinds to QOS IDL kinds.
Definition at line 140 of file QOS_Common.cpp.
References ACE_TEXT(), DDS::BY_RECEPTION_TIMESTAMP_DESTINATIONORDER_QOS, DDS::BY_SOURCE_TIMESTAMP_DESTINATIONORDER_QOS, and LM_DEBUG.
Referenced by QOS_DwDrTp_Base_T< XML_QOS_TYPE, DDS_QOS_TYPE >::read_qos().
00142 { 00143 switch (kind.integral ()) 00144 { 00145 case ::dds::destinationOrderKind::BY_RECEPTION_TIMESTAMP_DESTINATIONORDER_QOS_l: 00146 dds_kind = ::DDS::BY_RECEPTION_TIMESTAMP_DESTINATIONORDER_QOS; 00147 break; 00148 case ::dds::destinationOrderKind::BY_SOURCE_TIMESTAMP_DESTINATIONORDER_QOS_l: 00149 dds_kind = ::DDS::BY_SOURCE_TIMESTAMP_DESTINATIONORDER_QOS; 00150 break; 00151 default: 00152 ACE_ERROR ((LM_DEBUG, 00153 ACE_TEXT ("QosCommon::get_destination_order_kind - ") 00154 ACE_TEXT ("Unknown destination order kind found <%d>; returning BY_RECEPTION_TIMESTAMP_DESTINATIONORDER_QOS\n"), 00155 kind.integral ())); 00156 dds_kind = ::DDS::BY_RECEPTION_TIMESTAMP_DESTINATIONORDER_QOS; 00157 break; 00158 } 00159 }
OPENDDS_BEGIN_VERSIONED_NAMESPACE_DECL void QosCommon::get_durability_kind | ( | const ::dds::durabilityKind | kind, | |
::DDS::DurabilityQosPolicyKind & | dds_kind | |||
) | [static] |
Operations which convert QOS XML kinds to QOS IDL kinds.
Definition at line 6 of file QOS_Common.cpp.
References ACE_TEXT(), LM_DEBUG, DDS::PERSISTENT_DURABILITY_QOS, DDS::TRANSIENT_DURABILITY_QOS, DDS::TRANSIENT_LOCAL_DURABILITY_QOS, and DDS::VOLATILE_DURABILITY_QOS.
Referenced by QOS_DwDrTp_Base_T< XML_QOS_TYPE, DDS_QOS_TYPE >::read_qos().
00008 { 00009 switch (kind.integral ()) 00010 { 00011 case ::dds::durabilityKind::VOLATILE_DURABILITY_QOS_l: 00012 dds_kind = ::DDS::VOLATILE_DURABILITY_QOS; 00013 break; 00014 case ::dds::durabilityKind::TRANSIENT_LOCAL_DURABILITY_QOS_l: 00015 dds_kind = ::DDS::TRANSIENT_LOCAL_DURABILITY_QOS; 00016 break; 00017 case ::dds::durabilityKind::TRANSIENT_DURABILITY_QOS_l: 00018 dds_kind = ::DDS::TRANSIENT_DURABILITY_QOS; 00019 break; 00020 case ::dds::durabilityKind::PERSISTENT_DURABILITY_QOS_l: 00021 dds_kind = ::DDS::PERSISTENT_DURABILITY_QOS; 00022 break; 00023 default: 00024 ACE_ERROR ((LM_DEBUG, 00025 ACE_TEXT ("QosCommon::get_durability_kind - ") 00026 ACE_TEXT ("Unknown durability kind found <%d>; returning VOLATILE_DURABILITY_QOS\n"), 00027 kind.integral ())); 00028 dds_kind = ::DDS::VOLATILE_DURABILITY_QOS; 00029 break; 00030 } 00031 }
void QosCommon::get_duration | ( | ::DDS::Duration_t & | duration, | |
const ACE_TCHAR * | sec, | |||
const ACE_TCHAR * | nsec | |||
) | [static] |
get_duration
The QOS XML seconds and nano seconds tags may contain text (DURATION_INFINITY, DURATION_INFINITY_SEC, DURATION_INFINITY_NSEC). These values need to be converted to a numeric value.
Definition at line 56 of file QOS_Common.cpp.
References ACE_OS::atoi(), DDS::Duration_t::nanosec, DDS::Duration_t::sec, and ACE_OS::strcmp().
Referenced by QOS_DwTp_Base_T< XML_QOS_TYPE, DDS_QOS_TYPE >::read_qos(), QOS_DwDrTp_Base_T< XML_QOS_TYPE, DDS_QOS_TYPE >::read_qos(), and QOS_DataReader_T< XML_QOS_TYPE, DDS_QOS_TYPE >::read_qos().
00057 { 00058 if (ACE_OS::strcmp (sec, "DURATION_INFINITY") == 0 || 00059 ACE_OS::strcmp (sec, "DURATION_INFINITE_SEC") == 0) 00060 { 00061 duration.sec = 0x7fffffff; 00062 } 00063 else 00064 { 00065 duration.sec = ACE_OS::atoi (sec); 00066 } 00067 00068 if (ACE_OS::strcmp (nsec, "DURATION_INFINITY") == 0 || 00069 ACE_OS::strcmp (nsec, "DURATION_INFINITE_NSEC") == 0) 00070 { 00071 duration.nanosec = 0x7fffffff; 00072 } 00073 else 00074 { 00075 duration.nanosec = ACE_OS::atoi (nsec); 00076 } 00077 }
void QosCommon::get_history_kind | ( | const ::dds::historyKind | kind, | |
::DDS::HistoryQosPolicyKind & | dds_kind | |||
) | [static] |
Operations which convert QOS XML kinds to QOS IDL kinds.
Definition at line 34 of file QOS_Common.cpp.
References ACE_TEXT(), DDS::KEEP_ALL_HISTORY_QOS, DDS::KEEP_LAST_HISTORY_QOS, and LM_DEBUG.
Referenced by QOS_DwTp_Base_T< XML_QOS_TYPE, DDS_QOS_TYPE >::read_qos(), and QOS_DwDrTp_Base_T< XML_QOS_TYPE, DDS_QOS_TYPE >::read_qos().
00036 { 00037 switch (kind.integral ()) 00038 { 00039 case ::dds::historyKind::KEEP_ALL_HISTORY_QOS_l: 00040 dds_kind = ::DDS::KEEP_ALL_HISTORY_QOS; 00041 break; 00042 case ::dds::historyKind::KEEP_LAST_HISTORY_QOS_l: 00043 dds_kind = ::DDS::KEEP_LAST_HISTORY_QOS; 00044 break; 00045 default: 00046 ACE_ERROR ((LM_DEBUG, 00047 ACE_TEXT ("QosCommon::get_history_kind - ") 00048 ACE_TEXT ("Unknown history kind found <%d>; returning KEEP_ALL_HISTORY_QOS\n"), 00049 kind.integral ())); 00050 dds_kind = ::DDS::KEEP_ALL_HISTORY_QOS; 00051 break; 00052 } 00053 }
void QosCommon::get_liveliness_kind | ( | const ::dds::livelinessKind | kind, | |
::DDS::LivelinessQosPolicyKind & | dds_kind | |||
) | [static] |
Operations which convert QOS XML kinds to QOS IDL kinds.
Definition at line 93 of file QOS_Common.cpp.
References ACE_TEXT(), DDS::AUTOMATIC_LIVELINESS_QOS, LM_DEBUG, DDS::MANUAL_BY_PARTICIPANT_LIVELINESS_QOS, and DDS::MANUAL_BY_TOPIC_LIVELINESS_QOS.
Referenced by QOS_DwDrTp_Base_T< XML_QOS_TYPE, DDS_QOS_TYPE >::read_qos().
00095 { 00096 switch (kind.integral ()) 00097 { 00098 case ::dds::livelinessKind::AUTOMATIC_LIVELINESS_QOS_l: 00099 dds_kind = ::DDS::AUTOMATIC_LIVELINESS_QOS; 00100 break; 00101 case ::dds::livelinessKind::MANUAL_BY_PARTICIPANT_LIVELINESS_QOS_l: 00102 dds_kind = ::DDS::MANUAL_BY_PARTICIPANT_LIVELINESS_QOS; 00103 break; 00104 case ::dds::livelinessKind::MANUAL_BY_TOPIC_LIVELINESS_QOS_l: 00105 dds_kind = ::DDS::MANUAL_BY_TOPIC_LIVELINESS_QOS; 00106 break; 00107 default: 00108 ACE_ERROR ((LM_DEBUG, 00109 ACE_TEXT ("QosCommon::get_liveliness_kind - ") 00110 ACE_TEXT ("Unknown liveliness kind found <%d>; returning AUTOMATIC_LIVELINESS_QOS\n"), 00111 kind.integral ())); 00112 dds_kind = ::DDS::AUTOMATIC_LIVELINESS_QOS; 00113 break; 00114 } 00115 }
void QosCommon::get_ownership_kind | ( | ::dds::ownershipKind | kind, | |
::DDS::OwnershipQosPolicyKind & | dds_kind | |||
) | [static] |
Operations which convert QOS XML kinds to QOS IDL kinds.
Definition at line 162 of file QOS_Common.cpp.
References ACE_TEXT(), DDS::EXCLUSIVE_OWNERSHIP_QOS, LM_DEBUG, and DDS::SHARED_OWNERSHIP_QOS.
Referenced by QOS_DwDrTp_Base_T< XML_QOS_TYPE, DDS_QOS_TYPE >::read_qos().
00164 { 00165 switch (kind.integral ()) 00166 { 00167 case ::dds::ownershipKind::SHARED_OWNERSHIP_QOS_l: 00168 dds_kind = ::DDS::SHARED_OWNERSHIP_QOS; 00169 break; 00170 case ::dds::ownershipKind::EXCLUSIVE_OWNERSHIP_QOS_l: 00171 dds_kind = ::DDS::EXCLUSIVE_OWNERSHIP_QOS; 00172 break; 00173 default: 00174 ACE_ERROR ((LM_DEBUG, 00175 ACE_TEXT ("QosCommon::get_ownership_kind - ") 00176 ACE_TEXT ("Unknown ownership kind found <%d>; returning SHARED_OWNERSHIP_QOS\n"), 00177 kind.integral ())); 00178 dds_kind = ::DDS::SHARED_OWNERSHIP_QOS; 00179 break; 00180 } 00181 }
CORBA::Long QosCommon::get_qos_long | ( | const ACE_TCHAR * | value | ) | [static] |
get_qos_long
The QOS XML integer tags may contain text (LENGTH_UNLIMITED). This value need to be converted to a numeric value.
Definition at line 80 of file QOS_Common.cpp.
References atoi(), and ACE_OS::strcmp().
Referenced by QOS_DwTp_Base_T< XML_QOS_TYPE, DDS_QOS_TYPE >::read_qos(), and QOS_DwDrTp_Base_T< XML_QOS_TYPE, DDS_QOS_TYPE >::read_qos().
00081 { 00082 if (ACE_OS::strcmp (value, "LENGTH_UNLIMITED") == 0) 00083 { 00084 return -1; 00085 } 00086 else 00087 { 00088 return atoi (value); 00089 } 00090 }
static void QosCommon::get_realiability_kind | ( | const dds::reliabilityKind | kind, | |
::DDS::ReliabilityQosPolicyKind & | dds_kind | |||
) | [static] |
Operations which convert QOS XML kinds to QOS IDL kinds.
Referenced by QOS_DwDrTp_Base_T< XML_QOS_TYPE, DDS_QOS_TYPE >::read_qos().