#include <ConnectionSettings.h>
Public Member Functions | |
ConnectionSettings () | |
int | set (const char *name, const char *value) |
const char * | datawriter_qos_name () const |
const char * | datareader_qos_name () const |
const char * | publisher_qos_name () const |
const char * | subscriber_qos_name () const |
const char * | config_name () const |
bool | datawriter_qos_set () const |
bool | datareader_qos_set () const |
bool | publisher_qos_set () const |
bool | subscriber_qos_set () const |
bool | config_set () const |
Public Attributes | |
char | topic_name_ [ALLOWABLE_NAME_LEN] |
char | datawriter_qos_name_ [ALLOWABLE_NAME_LEN] |
char | datareader_qos_name_ [ALLOWABLE_NAME_LEN] |
char | publisher_qos_name_ [ALLOWABLE_NAME_LEN] |
char | subscriber_qos_name_ [ALLOWABLE_NAME_LEN] |
FACE::CONNECTION_ID_TYPE | connection_id_ |
FACE::CONNECTION_DIRECTION_TYPE | direction_ |
int | domain_id_ |
int | participant_id_ |
char | config_name_ [ALLOWABLE_NAME_LEN] |
Static Public Attributes | |
static const size_t | ALLOWABLE_NAME_LEN = 64 |
Definition at line 13 of file ConnectionSettings.h.
OpenDDS::FaceTSS::config::ConnectionSettings::ConnectionSettings | ( | ) |
Definition at line 13 of file ConnectionSettings.cpp.
References config_name_, datareader_qos_name_, datawriter_qos_name_, publisher_qos_name_, subscriber_qos_name_, and topic_name_.
00014 : connection_id_(0), 00015 direction_(FACE::SOURCE), 00016 domain_id_(0), 00017 participant_id_(0) 00018 { 00019 std::strcpy(topic_name_, ""); 00020 std::strcpy(datawriter_qos_name_, ""); 00021 std::strcpy(datareader_qos_name_, ""); 00022 std::strcpy(publisher_qos_name_, ""); 00023 std::strcpy(subscriber_qos_name_, ""); 00024 std::strcpy(config_name_, ""); 00025 }
const char * OpenDDS::FaceTSS::config::ConnectionSettings::config_name | ( | ) | const |
Definition at line 140 of file ConnectionSettings.cpp.
References config_name_.
Referenced by OpenDDS::FaceTSS::config::Parser::parse().
00141 { 00142 return config_name_; 00143 }
bool OpenDDS::FaceTSS::config::ConnectionSettings::config_set | ( | ) | const |
Definition at line 170 of file ConnectionSettings.cpp.
References config_name_.
Referenced by OpenDDS::FaceTSS::config::Parser::parse().
00171 { 00172 return config_name_[0]; 00173 }
const char * OpenDDS::FaceTSS::config::ConnectionSettings::datareader_qos_name | ( | ) | const |
Definition at line 122 of file ConnectionSettings.cpp.
References datareader_qos_name_.
Referenced by OpenDDS::FaceTSS::config::Parser::find_qos(), and OpenDDS::FaceTSS::config::Parser::parse().
00123 { 00124 return datareader_qos_name_; 00125 }
bool OpenDDS::FaceTSS::config::ConnectionSettings::datareader_qos_set | ( | ) | const |
Definition at line 152 of file ConnectionSettings.cpp.
References datareader_qos_name_.
Referenced by OpenDDS::FaceTSS::config::Parser::find_qos(), and OpenDDS::FaceTSS::config::Parser::parse().
00153 { 00154 return datareader_qos_name_[0]; 00155 }
const char * OpenDDS::FaceTSS::config::ConnectionSettings::datawriter_qos_name | ( | ) | const |
Definition at line 116 of file ConnectionSettings.cpp.
References datawriter_qos_name_.
Referenced by OpenDDS::FaceTSS::config::Parser::find_qos(), and OpenDDS::FaceTSS::config::Parser::parse().
00117 { 00118 return datawriter_qos_name_; 00119 }
bool OpenDDS::FaceTSS::config::ConnectionSettings::datawriter_qos_set | ( | ) | const |
Definition at line 146 of file ConnectionSettings.cpp.
References datawriter_qos_name_.
Referenced by OpenDDS::FaceTSS::config::Parser::find_qos(), and OpenDDS::FaceTSS::config::Parser::parse().
00147 { 00148 return datawriter_qos_name_[0]; 00149 }
const char * OpenDDS::FaceTSS::config::ConnectionSettings::publisher_qos_name | ( | ) | const |
Definition at line 128 of file ConnectionSettings.cpp.
References publisher_qos_name_.
Referenced by OpenDDS::FaceTSS::config::Parser::find_qos(), and OpenDDS::FaceTSS::config::Parser::parse().
00129 { 00130 return publisher_qos_name_; 00131 }
bool OpenDDS::FaceTSS::config::ConnectionSettings::publisher_qos_set | ( | ) | const |
Definition at line 158 of file ConnectionSettings.cpp.
References publisher_qos_name_.
Referenced by OpenDDS::FaceTSS::config::Parser::find_qos(), and OpenDDS::FaceTSS::config::Parser::parse().
00159 { 00160 return publisher_qos_name_[0]; 00161 }
int OpenDDS::FaceTSS::config::ConnectionSettings::set | ( | const char * | name, | |
const char * | value | |||
) |
Definition at line 28 of file ConnectionSettings.cpp.
References ACE_TEXT(), ALLOWABLE_NAME_LEN, atoi(), config_name_, connection_id_, datareader_qos_name_, datawriter_qos_name_, direction_, domain_id_, LM_ERROR, participant_id_, publisher_qos_name_, status, subscriber_qos_name_, and topic_name_.
Referenced by OpenDDS::FaceTSS::config::Parser::parse_connection().
00029 { 00030 int status = 0; 00031 if (!std::strcmp(name, "id")) { 00032 connection_id_ = atoi(value); 00033 } else if (!std::strcmp(name, "participantid")) { 00034 participant_id_ = atoi(value); 00035 } else if (!std::strcmp(name, "domain")) { 00036 domain_id_ = atoi(value); 00037 } else if (!std::strcmp(name, "topic")) { 00038 if (std::strlen(value) >= ALLOWABLE_NAME_LEN) { 00039 ACE_ERROR((LM_ERROR, ACE_TEXT("topic name %C exceeds allowable length," 00040 "must be < %B \n"), value, ALLOWABLE_NAME_LEN)); 00041 status = 1; 00042 } else { 00043 std::strncpy(topic_name_, value, sizeof(topic_name_)); 00044 } 00045 } else if (!std::strcmp(name, "datawriterqos")) { 00046 if (std::strlen(value) >= ALLOWABLE_NAME_LEN) { 00047 ACE_ERROR((LM_ERROR, ACE_TEXT("datawriterqos name %C exceeds allowable length," 00048 "must be < %B \n"), value, ALLOWABLE_NAME_LEN)); 00049 status = 1; 00050 } else { 00051 std::strncpy(datawriter_qos_name_, value, sizeof(datawriter_qos_name_)); 00052 } 00053 } else if (!std::strcmp(name, "datareaderqos")) { 00054 if (std::strlen(value) >= ALLOWABLE_NAME_LEN) { 00055 ACE_ERROR((LM_ERROR, ACE_TEXT("datareaderqos name %C exceeds allowable length," 00056 "must be < %B \n"), value, ALLOWABLE_NAME_LEN)); 00057 status = 1; 00058 } else { 00059 std::strncpy(datareader_qos_name_, value, sizeof(datareader_qos_name_)); 00060 } 00061 } else if (!std::strcmp(name, "publisherqos")) { 00062 if (std::strlen(value) >= ALLOWABLE_NAME_LEN) { 00063 ACE_ERROR((LM_ERROR, ACE_TEXT("publisherqos name %C exceeds allowable length," 00064 "must be < %B \n"), value, ALLOWABLE_NAME_LEN)); 00065 status = 1; 00066 } else { 00067 std::strncpy(publisher_qos_name_, value, sizeof(publisher_qos_name_)); 00068 } 00069 } else if (!std::strcmp(name, "subscriberqos")) { 00070 if (std::strlen(value) >= ALLOWABLE_NAME_LEN) { 00071 ACE_ERROR((LM_ERROR, ACE_TEXT("subscriberqos name %C exceeds allowable length," 00072 "must be < %B \n"), value, ALLOWABLE_NAME_LEN)); 00073 status = 1; 00074 } else { 00075 std::strncpy(subscriber_qos_name_, value, sizeof(subscriber_qos_name_)); 00076 } 00077 } else if (!std::strcmp(name, "direction")) { 00078 if (!std::strcmp(value, "source") || 00079 !std::strcmp(value, "one_way_request_source") || 00080 !std::strcmp(value, "two_way_request_synchronous_source") || 00081 !std::strcmp(value, "two_way_request_reply_asynchronous_source")) { 00082 direction_ = FACE::SOURCE; 00083 } else if (!std::strcmp(value, "destination") || 00084 !std::strcmp(value, "one_way_request_destination") || 00085 !std::strcmp(value, "two_way_request_synchronous_destination") || 00086 !std::strcmp(value, "two_way_request_reply_asynchronous_destination")) { 00087 direction_ = FACE::DESTINATION; 00088 } else if (!std::strcmp(value, "bi_directional") || 00089 !std::strcmp(value, "not_defined_connection_direction_type")) { 00090 ACE_ERROR((LM_ERROR, ACE_TEXT("Direction not supported: %C\n"), value)); 00091 status = 1; 00092 } else { 00093 ACE_ERROR((LM_ERROR, ACE_TEXT("Don't know of direction %C\n"), value)); 00094 status = 1; 00095 } 00096 } else if (!std::strcmp(name, "config")) { 00097 // Guarantee that value will fit in config_name_ and still be null terminated 00098 // config_name_ is sized to ALLOWABLE_NAME_LEN 00099 if (std::strlen(value) >= sizeof(config_name_)) { 00100 ACE_ERROR((LM_ERROR, ACE_TEXT("config name %C exceeds allowable length," 00101 "must be < %B \n"), value, ALLOWABLE_NAME_LEN)); 00102 status = 1; 00103 } else { 00104 std::strncpy(config_name_, value, sizeof(config_name_)); 00105 } 00106 } else { 00107 // no match 00108 ACE_ERROR((LM_ERROR, ACE_TEXT("Don't know of setting %C\n"), name)); 00109 status = 1; 00110 } 00111 00112 return status; 00113 }
const char * OpenDDS::FaceTSS::config::ConnectionSettings::subscriber_qos_name | ( | ) | const |
Definition at line 134 of file ConnectionSettings.cpp.
References subscriber_qos_name_.
Referenced by OpenDDS::FaceTSS::config::Parser::find_qos(), and OpenDDS::FaceTSS::config::Parser::parse().
00135 { 00136 return subscriber_qos_name_; 00137 }
bool OpenDDS::FaceTSS::config::ConnectionSettings::subscriber_qos_set | ( | ) | const |
Definition at line 164 of file ConnectionSettings.cpp.
References subscriber_qos_name_.
Referenced by OpenDDS::FaceTSS::config::Parser::find_qos(), and OpenDDS::FaceTSS::config::Parser::parse().
00165 { 00166 return subscriber_qos_name_[0]; 00167 }
const size_t OpenDDS::FaceTSS::config::ConnectionSettings::ALLOWABLE_NAME_LEN = 64 [static] |
Definition at line 15 of file ConnectionSettings.h.
Referenced by set().
Definition at line 42 of file ConnectionSettings.h.
Referenced by config_name(), config_set(), ConnectionSettings(), FACE::TS::Create_Connection(), and set().
FACE::CONNECTION_ID_TYPE OpenDDS::FaceTSS::config::ConnectionSettings::connection_id_ |
Definition at line 38 of file ConnectionSettings.h.
Referenced by FACE::TS::Create_Connection(), FACE::TS::Get_Connection_Parameters(), OpenDDS::FaceTSS::config::Parser::parse(), and set().
Definition at line 35 of file ConnectionSettings.h.
Referenced by ConnectionSettings(), datareader_qos_name(), datareader_qos_set(), and set().
Definition at line 34 of file ConnectionSettings.h.
Referenced by ConnectionSettings(), datawriter_qos_name(), datawriter_qos_set(), and set().
FACE::CONNECTION_DIRECTION_TYPE OpenDDS::FaceTSS::config::ConnectionSettings::direction_ |
Definition at line 39 of file ConnectionSettings.h.
Referenced by FACE::TS::Create_Connection(), OpenDDS::FaceTSS::config::Parser::find_qos(), OpenDDS::FaceTSS::config::Parser::parse(), and set().
Definition at line 40 of file ConnectionSettings.h.
Referenced by FACE::TS::Create_Connection(), OpenDDS::FaceTSS::config::Parser::parse(), and set().
Definition at line 41 of file ConnectionSettings.h.
Referenced by FACE::TS::Create_Connection(), and set().
Definition at line 36 of file ConnectionSettings.h.
Referenced by ConnectionSettings(), publisher_qos_name(), publisher_qos_set(), and set().
Definition at line 37 of file ConnectionSettings.h.
Referenced by ConnectionSettings(), set(), subscriber_qos_name(), and subscriber_qos_set().
Definition at line 33 of file ConnectionSettings.h.
Referenced by ConnectionSettings(), FACE::TS::Create_Connection(), OpenDDS::FaceTSS::config::Parser::parse(), and set().