#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_ [64] |
char | datawriter_qos_name_ [64] |
char | datareader_qos_name_ [64] |
char | publisher_qos_name_ [64] |
char | subscriber_qos_name_ [64] |
FACE::CONNECTION_ID_TYPE | connection_id_ |
FACE::CONNECTION_DIRECTION_TYPE | direction_ |
int | domain_id_ |
int | participant_id_ |
char | config_name_ [64] |
Definition at line 10 of file ConnectionSettings.h.
OpenDDS::FaceTSS::config::ConnectionSettings::ConnectionSettings | ( | ) |
Definition at line 11 of file ConnectionSettings.cpp.
References config_name_, datareader_qos_name_, datawriter_qos_name_, publisher_qos_name_, subscriber_qos_name_, and topic_name_.
00012 : connection_id_(0), 00013 direction_(FACE::SOURCE), 00014 domain_id_(0), 00015 participant_id_(0) 00016 { 00017 std::strcpy(topic_name_, ""); 00018 std::strcpy(datawriter_qos_name_, ""); 00019 std::strcpy(datareader_qos_name_, ""); 00020 std::strcpy(publisher_qos_name_, ""); 00021 std::strcpy(subscriber_qos_name_, ""); 00022 std::strcpy(config_name_, ""); 00023 }
const char * OpenDDS::FaceTSS::config::ConnectionSettings::config_name | ( | ) | const |
Definition at line 100 of file ConnectionSettings.cpp.
References config_name_.
00101 { 00102 return config_name_; 00103 }
bool OpenDDS::FaceTSS::config::ConnectionSettings::config_set | ( | ) | const |
Definition at line 130 of file ConnectionSettings.cpp.
References config_name_.
00131 { 00132 return config_name_[0]; 00133 }
const char * OpenDDS::FaceTSS::config::ConnectionSettings::datareader_qos_name | ( | ) | const |
Definition at line 82 of file ConnectionSettings.cpp.
References datareader_qos_name_.
Referenced by OpenDDS::FaceTSS::config::Parser::find_qos().
00083 { 00084 return datareader_qos_name_; 00085 }
bool OpenDDS::FaceTSS::config::ConnectionSettings::datareader_qos_set | ( | ) | const |
Definition at line 112 of file ConnectionSettings.cpp.
References datareader_qos_name_.
Referenced by OpenDDS::FaceTSS::config::Parser::find_qos().
00113 { 00114 return datareader_qos_name_[0]; 00115 }
const char * OpenDDS::FaceTSS::config::ConnectionSettings::datawriter_qos_name | ( | ) | const |
Definition at line 76 of file ConnectionSettings.cpp.
References datawriter_qos_name_.
Referenced by OpenDDS::FaceTSS::config::Parser::find_qos().
00077 { 00078 return datawriter_qos_name_; 00079 }
bool OpenDDS::FaceTSS::config::ConnectionSettings::datawriter_qos_set | ( | ) | const |
Definition at line 106 of file ConnectionSettings.cpp.
References datawriter_qos_name_.
Referenced by OpenDDS::FaceTSS::config::Parser::find_qos().
00107 { 00108 return datawriter_qos_name_[0]; 00109 }
const char * OpenDDS::FaceTSS::config::ConnectionSettings::publisher_qos_name | ( | ) | const |
Definition at line 88 of file ConnectionSettings.cpp.
References publisher_qos_name_.
Referenced by OpenDDS::FaceTSS::config::Parser::find_qos().
00089 { 00090 return publisher_qos_name_; 00091 }
bool OpenDDS::FaceTSS::config::ConnectionSettings::publisher_qos_set | ( | ) | const |
Definition at line 118 of file ConnectionSettings.cpp.
References publisher_qos_name_.
Referenced by OpenDDS::FaceTSS::config::Parser::find_qos().
00119 { 00120 return publisher_qos_name_[0]; 00121 }
int OpenDDS::FaceTSS::config::ConnectionSettings::set | ( | const char * | name, | |
const char * | value | |||
) |
Definition at line 26 of file ConnectionSettings.cpp.
References config_name_, connection_id_, datareader_qos_name_, datawriter_qos_name_, direction_, domain_id_, participant_id_, publisher_qos_name_, subscriber_qos_name_, and topic_name_.
Referenced by OpenDDS::FaceTSS::config::Parser::parse_connection().
00027 { 00028 int status = 0; 00029 if (!std::strcmp(name, "id")) { 00030 connection_id_ = atoi(value); 00031 } else if (!std::strcmp(name, "participantid")) { 00032 participant_id_ = atoi(value); 00033 } else if (!std::strcmp(name, "domain")) { 00034 domain_id_ = atoi(value); 00035 } else if (!std::strcmp(name, "topic")) { 00036 std::strncpy(topic_name_, value, sizeof(topic_name_)); 00037 } else if (!std::strcmp(name, "datawriterqos")) { 00038 std::strncpy(datawriter_qos_name_, value, sizeof(datawriter_qos_name_)); 00039 } else if (!std::strcmp(name, "datareaderqos")) { 00040 std::strncpy(datareader_qos_name_, value, sizeof(datareader_qos_name_)); 00041 } else if (!std::strcmp(name, "publisherqos")) { 00042 std::strncpy(publisher_qos_name_, value, sizeof(publisher_qos_name_)); 00043 } else if (!std::strcmp(name, "subscriberqos")) { 00044 std::strncpy(subscriber_qos_name_, value, sizeof(subscriber_qos_name_)); 00045 } else if (!std::strcmp(name, "direction")) { 00046 if (!std::strcmp(value, "source") || 00047 !std::strcmp(value, "one_way_request_source") || 00048 !std::strcmp(value, "two_way_request_synchronous_source") || 00049 !std::strcmp(value, "two_way_request_reply_asynchronous_source")) { 00050 direction_ = FACE::SOURCE; 00051 } else if (!std::strcmp(value, "destination") || 00052 !std::strcmp(value, "one_way_request_destination") || 00053 !std::strcmp(value, "two_way_request_synchronous_destination") || 00054 !std::strcmp(value, "two_way_request_reply_asynchronous_destination")) { 00055 direction_ = FACE::DESTINATION; 00056 } else if (!std::strcmp(value, "bi_directional") || 00057 !std::strcmp(value, "not_defined_connection_direction_type")) { 00058 ACE_ERROR((LM_ERROR, ACE_TEXT("Direction not supported: %C\n"), value)); 00059 status = 1; 00060 } else { 00061 ACE_ERROR((LM_ERROR, ACE_TEXT("Don't know of direction %C\n"), value)); 00062 status = 1; 00063 } 00064 } else if (!std::strcmp(name, "config")) { 00065 std::strncpy(config_name_, value, sizeof(config_name_)); 00066 } else { 00067 // no match 00068 ACE_ERROR((LM_ERROR, ACE_TEXT("Don't know of setting %C\n"), name)); 00069 status = 1; 00070 } 00071 00072 return status; 00073 }
const char * OpenDDS::FaceTSS::config::ConnectionSettings::subscriber_qos_name | ( | ) | const |
Definition at line 94 of file ConnectionSettings.cpp.
References subscriber_qos_name_.
Referenced by OpenDDS::FaceTSS::config::Parser::find_qos().
00095 { 00096 return subscriber_qos_name_; 00097 }
bool OpenDDS::FaceTSS::config::ConnectionSettings::subscriber_qos_set | ( | ) | const |
Definition at line 124 of file ConnectionSettings.cpp.
References subscriber_qos_name_.
Referenced by OpenDDS::FaceTSS::config::Parser::find_qos().
00125 { 00126 return subscriber_qos_name_[0]; 00127 }
Definition at line 37 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 33 of file ConnectionSettings.h.
Referenced by OpenDDS::FaceTSS::config::build_id(), FACE::TS::Create_Connection(), FACE::TS::Get_Connection_Parameters(), and set().
Definition at line 30 of file ConnectionSettings.h.
Referenced by ConnectionSettings(), datareader_qos_name(), datareader_qos_set(), and set().
Definition at line 29 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 34 of file ConnectionSettings.h.
Referenced by OpenDDS::FaceTSS::config::build_id(), FACE::TS::Create_Connection(), OpenDDS::FaceTSS::config::Parser::find_qos(), and set().
Definition at line 35 of file ConnectionSettings.h.
Referenced by OpenDDS::FaceTSS::config::build_id(), FACE::TS::Create_Connection(), and set().
Definition at line 36 of file ConnectionSettings.h.
Referenced by OpenDDS::FaceTSS::config::build_id(), FACE::TS::Create_Connection(), and set().
Definition at line 31 of file ConnectionSettings.h.
Referenced by ConnectionSettings(), publisher_qos_name(), publisher_qos_set(), and set().
Definition at line 32 of file ConnectionSettings.h.
Referenced by ConnectionSettings(), set(), subscriber_qos_name(), and subscriber_qos_set().
Definition at line 28 of file ConnectionSettings.h.
Referenced by ConnectionSettings(), FACE::TS::Create_Connection(), and set().