本文整理汇总了C++中CVariable::getValue方法的典型用法代码示例。如果您正苦于以下问题:C++ CVariable::getValue方法的具体用法?C++ CVariable::getValue怎么用?C++ CVariable::getValue使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CVariable
的用法示例。
在下文中一共展示了CVariable::getValue方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: strHost
//.........这里部分代码省略.........
"%s: Unable to get dl entry for VSCPWebPageupdate.",
pDevItem->m_strName.c_str());
return NULL;
}
if (pCtrlObj->m_debugFlags[0] & VSCP_DEBUG1_DRIVER) {
syslog(LOG_DEBUG,
"%s: Discovered all methods\n",
pDevItem->m_strName.c_str());
}
// Username, password, host and port can be set in configuration file.
// Read in them here if they are.
std::string strHost("127.0.0.1");
short port = 9598;
std::deque<std::string> tokens;
vscp_split(tokens, pDevItem->m_strParameter, ";");
if (false == tokens.empty()) {
CVariable variable;
// Get prefix
std::string prefix = tokens.front();
tokens.pop_front();
// Check if username is specified in the configuration file
CUserItem *pAdminUser =
pDevItem->m_pCtrlObject->m_userList.getUser(USER_ID_ADMIN);
if (pCtrlObj->m_variables.find(
pDevItem->m_strName + "_username", pAdminUser, variable)) {
std::string str;
if (VSCP_DAEMON_VARIABLE_CODE_STRING == variable.getType()) {
str = variable.getValue();
pCtrlObj->m_driverUsername = str;
}
}
// Check if password is specified in the configuration file
if (pCtrlObj->m_variables.find(
pDevItem->m_strName + "_password", pAdminUser, variable)) {
std::string str;
if (VSCP_DAEMON_VARIABLE_CODE_STRING == variable.getType()) {
str = variable.getValue();
pCtrlObj->m_driverPassword = str;
}
}
// Check if host is specified in the configuration file
if (pCtrlObj->m_variables.find(
pDevItem->m_strName + "_host", pAdminUser, variable)) {
std::string str;
if (VSCP_DAEMON_VARIABLE_CODE_STRING == variable.getType()) {
str = variable.getValue();
strHost = str;
}
}
// Check if host is specified in the configuration file
if (pCtrlObj->m_variables.find(
pDevItem->m_strName + "_port", pAdminUser, variable)) {
std::string str;
if (VSCP_DAEMON_VARIABLE_CODE_INTEGER == variable.getType()) {
str = variable.getValue();
port = vscp_readStringValue(str);
}