当前位置: 首页>>代码示例>>C++>>正文


C++ Property::GetValue方法代码示例

本文整理汇总了C++中Property::GetValue方法的典型用法代码示例。如果您正苦于以下问题:C++ Property::GetValue方法的具体用法?C++ Property::GetValue怎么用?C++ Property::GetValue使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Property的用法示例。


在下文中一共展示了Property::GetValue方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1:

bool CNR_7DOFAnalyticInverseKinematicsComp::SetParameter(Property parameter)
{
	onDestroy();

	if(parameter.FindName("UpperArmLength") == false) {
		PrintMessage("ERROR : CNR_6DOFRobotForwardKinematicsComp::SetParameter() -> Can't find the UpperArmLength in property\n");
		return false;
	}
	if(parameter.FindName("LowerArmLength") == false) {
		PrintMessage("ERROR : CNR_6DOFRobotForwardKinematicsComp::SetParameter() -> Can't find the LowerArmLength in property\n");
		return false;
	}
	if(parameter.FindName("ToolLength") == false) {
		PrintMessage("ERROR : CNR_6DOFRobotForwardKinematicsComp::SetParameter() -> Can't find the ToolLength in property\n");
		return false;
	}
	if(parameter.FindName("RedundantValue") == false) {
		PrintMessage("ERROR : CNR_6DOFRobotForwardKinematicsComp::SetParameter() -> Can't find the RedundantValue in property\n");
		return false;
	}

	PrintMessage("UpperArmLength : %.3f\nLowerArmLength : %.3f\nToolLength : %.3f\nRedundantValue : %.3f\n"
		,atof(parameter.GetValue("UpperArmLength").c_str())
		,atof(parameter.GetValue("LowerArmLength").c_str())
		,atof(parameter.GetValue("ToolLength").c_str())  
		,atof(parameter.GetValue("RedundantValue").c_str()));

	this->parameter = parameter;


	return true;
}
开发者ID:opros-wiki,项目名称:OPRoS_v1_Components,代码行数:32,代码来源:CNR_7DOFAnalyticInverseKinematicsComp.cpp

示例2: onInitialize

// Call back Declaration
ReturnType HCILab_PowerSTTVoiceRecComp::onInitialize()
{
	//	XML에 저장된 프라퍼티를 parameter에 저장
	Property parameter;
	std::map<std::string, std::string> temp = getPropertyMap();
	parameter.SetProperty(temp);
	
	if(parameter.FindName("WordList") == false) {
		PrintMessage("ERROR : HCILab_PowerSTTVoiceRecComp::onInitialize() -> Can't find the WordList in property\n");
		return OPROS_FIND_PROPERTY_ERROR;
	}

	SetModulePath();
	int err = power_stt_kor_create(strModulePath);
	if( err != 1 )
		PrintMessage("Error:HCILab_PowerSTTVoiceRecComp::power_stt_kor_create ()\n");

	if( LoadList1((char *)parameter.GetValue("WordList").c_str()) ) {
		PrintMessage("INFO:HCILab_PowerSTTVoiceRecComp::onInitialize() %s -> %s\n", parameter.GetValue("WordList").c_str(), strList1.c_str());
		power_stt_kor_set_vocab((char *)strList1.c_str(), "");
	}

	PrintMessage("Success : HCILab_PowerSTTVoiceRecComp::onInitialize()\n");
	return OPROS_SUCCESS;
}
开发者ID:opros-wiki,项目名称:OPRoS_v1_Components,代码行数:26,代码来源:HCILab_PowerSTTVoiceRecComp.cpp

示例3: parameter

int HyVisionHvr2130Camera::SetParameter(Property parameter)
{
	if (!parameter.FindName("CameraID") || 
		!parameter.FindName("Width") || 
		!parameter.FindName("Height") ||
		!parameter.FindName("PixelBytes") ||
		!parameter.FindName("Flip") )
	{
		if( !parameter.FindName("CameraID") )
			PrintMessage("Error:HyVisionHvr2130Camera::SetParameter()->Can't find parameter CameraID.\n");
		if( !parameter.FindName("Width") )
			PrintMessage("Error:HyVisionHvr2130Camera::SetParameter()->Can't find parameter Width.\n");
		if( !parameter.FindName("Height") )
			PrintMessage("Error:HyVisionHvr2130Camera::SetParameter()->Can't find parameter Height.\n");
		if( !parameter.FindName("PixelBytes") )
			PrintMessage("Error:HyVisionHvr2130Camera::SetParameter()->Can't find parameter PixelBytes.\n");
		if( !parameter.FindName("Flip") )
			PrintMessage("Error:HyVisionHvr2130Camera::SetParameter()->Can't find parameter Flip.\n");

		PrintMessage("Error:HyVisionHvr2130Camera::SetParameter()->Can't find parameter(s) name.\n");
		return API_ERROR;
	}

	_id = atoi( (parameter.GetValue("CameraID")).c_str() );
	_width = atoi( (parameter.GetValue("Width")).c_str() );
	_height = atoi( (parameter.GetValue("Height")).c_str() );
	_pixelByte = atoi( (parameter.GetValue("PixelBytes")).c_str() );
	_flip = atoi( (parameter.GetValue("Flip")).c_str() );
	PrintMessage("SUCCESS:HyVisionHvr2130Camera::SetParameter()->CameraID = %d, Width = %d, Height = %d.\n", _id, _width, _height);

	this->parameter = parameter;

	return API_SUCCESS;
}
开发者ID:OPRoS,项目名称:DeviceAPI,代码行数:34,代码来源:HyVisionHvr2130Camera.cpp

示例4: Initialize

int YujinRobot_iRobiQSpeech::Initialize(Property parameter)
{
	if(SetParameter(parameter) == false) {
		return false;
	}

	if(parameter.FindName("IP") == false) {
		PrintMessage("ERROR : YujinRobot_iRobiQSpeech::initialize() -> Can't find the IP Address\n");
		return false;
	}
	std::string ip = parameter.GetValue("IP");

	if(parameter.FindName("Port") == false) {
		PrintMessage("ERROR : YujinRobot_iRobiQSpeech::initialize() -> Can't find the Port Number\n");
		return false;
	}
	unsigned int port = (unsigned int)atoi(parameter.GetValue("Port").c_str());

	if(parameter.FindName("ServiceID") == false) {
		PrintMessage("ERROR : YujinRobot_iRobiQSpeech::initialize() -> Can't find the Service ID\n");
		return false;
	}
	unsigned short serviceId = (unsigned short)atoi(parameter.GetValue("ServiceID").c_str());

	if(iRobiQ_Initialize() == false) {
		return false;
	}

	if(iRobiQ_Connect(ip, port, serviceId) == false) {
		iRobiQ_Finalize();
	}

	return true;
}
开发者ID:opros-wiki,项目名称:OPRoS_v1_Components,代码行数:34,代码来源:YujinRobot_iRobiQSpeech.cpp

示例5: SetParameter

int Simulator_GyroSensor::SetParameter(Property parameter)
{
	SimulatorIP		= parameter.GetValue("userMessage").c_str();
	deviceName		= parameter.GetValue("GyroName").c_str();
	RobotName		= parameter.GetValue("RobotName").c_str();
	PortNumber		= atoi(parameter.GetValue("Port").c_str());

	this->parameter = parameter;
	return 0;
}
开发者ID:OPRoS,项目名称:DeviceAPI,代码行数:10,代码来源:Simulator_GyroSensor_socket.cpp

示例6: SetParameter

int Simulator_LaserScanner::SetParameter(Property parameter)
{
	maximumStep = atoi(parameter.GetValue("MaximumStep").c_str());
	startStep = atoi(parameter.GetValue("StartStep").c_str());
	endStep = atoi(parameter.GetValue("EndStep").c_str());
	deltaStep = atoi(parameter.GetValue("DeltaStep").c_str());

	SimulatorIP	= parameter.GetValue("userMessage").c_str();
	DeviceName	= parameter.GetValue("deviceName").c_str();
	RobotName	= parameter.GetValue("RobotName").c_str();
	PortNumber	= atoi(parameter.GetValue("Port").c_str());


	if(endStep < 0 || endStep > maximumStep) {
		return API_ERROR;
	}

	if(startStep < 0 || startStep >= endStep || startStep >= endStep) {
		return API_ERROR;
	}

	if(deltaStep <= 0 || deltaStep > MAXIMUM_CLUSTER_SIZE) {
		return API_ERROR;
	}

	scanStepSize = (endStep	- startStep) / deltaStep + 1;
	scannedData.resize(scanStepSize);
	m_ClientSocket.StepSize = scanStepSize;

	this->parameter = parameter;

	return 0;

}
开发者ID:OPRoS,项目名称:DeviceAPI,代码行数:34,代码来源:Simulator_LaserScanner.cpp

示例7:

CEVENT(CMDBoard, _ExitPost)
{
    World* world = World::GetPtr();
    Editor* ed = ((EditorExitedArgs*)args)->editor;
    BoardPost* post = (BoardPost*)ed->GetArg();
    Player* mobile = (Player*)caller;
    BoardManager* bmanager = (BoardManager*)world->GetProperty("boards");
    Property* prop = NULL;
    Board* board = NULL;
    int id = 0;

    if (!bmanager)
        {
            mobile->Message(MSG_ERROR, "Can not access the board system.");
            return;
        }

    prop = mobile->variables.FindProperty("board");
    if (!prop)
        {
            mobile->Message(MSG_ERROR, "No board set.");
            return;
        }

    id = prop->GetValue().GetInt();
    board = bmanager->GetBoardByIndex(id);
    if (!board)
        {
            mobile->Message(MSG_ERROR, "The board you have set does not exist.");
            return;
        }

    board->AddPost(post);
}
开发者ID:renokun,项目名称:Aspen,代码行数:34,代码来源:boardModule.cpp

示例8: Initialize

int SerialCommunication::Initialize(Property parameter)
{
	if(parameter.FindName("PortName") == false)	return API_ERROR;
	string portName = parameter.GetValue("PortName");
	if(parameter.FindName("TimeOut") == false)		return API_ERROR;
	unsigned long timeOut = (unsigned long)atol(parameter.GetValue("TimeOut").c_str());
	if(parameter.FindName("BaudRate") == false)	return API_ERROR;
	unsigned long baudRate = (unsigned long)atol(parameter.GetValue("BaudRate").c_str());
	if(parameter.FindName("DataBits") == false)	return API_ERROR;
	char dataBits = (char)atoi(parameter.GetValue("DataBits").c_str());
	if(parameter.FindName("StopBits") == false)	return API_ERROR;
	char stopBits = (char)atoi(parameter.GetValue("StopBits").c_str());
	if(parameter.FindName("Parity") == false)		return API_ERROR;
	char parity = (char)atoi(parameter.GetValue("Parity").c_str());
	if(parameter.FindName("FlowControl") == false)	return API_ERROR;
	char flowControl = (char)atoi(parameter.GetValue("FlowControl").c_str());

	if(handle != NULL) {
		return 0;
	}

#ifdef WIN32
	handle = new SerialWindows(portName, timeOut, baudRate, dataBits, stopBits, parity, flowControl);
#else
	handle = new SerialLinux(portName, timeOut, baudRate, dataBits, stopBits, parity, flowControl);
#endif

	this->parameter = parameter;

	return API_SUCCESS;
}
开发者ID:OPRoS,项目名称:DeviceAPI,代码行数:31,代码来源:SerialCommunication.cpp

示例9: SetParameter

bool KITECH_MonotoneCubicTrajectoryGenerationComp::SetParameter(Property parameter)
{
	if(parameter.FindName("SamplingTime") == false) {
		PrintMessage("ERROR : KITECH_MonotoneCubicTrajectoryGenerationComp::SetParameter() -> Can't find the SamplingTime in property\n");
		return false;
	}
	samplingTime = atof(parameter.GetValue("SamplingTime").c_str());

	if(parameter.FindName("Monotonicity") == false) {
		PrintMessage("ERROR : KITECH_MonotoneCubicTrajectoryGenerationComp::SetParameter() -> Can't find the Monotonicity in property\n");
		return false;
	}
	monotonicity = atof(parameter.GetValue("Monotonicity").c_str());

	this->parameter = parameter;

	return true;
}
开发者ID:opros-wiki,项目名称:OPRoS_v1_Components,代码行数:18,代码来源:KITECH_MonotoneCubicTrajectoryGenerationComp.cpp

示例10: SetParameter

int DasaRobot_TetraIR::SetParameter(Property parameter)
{
	if (parameter.FindName("Size") == false) return API_ERROR;
	if (parameter.FindName("RobotIP") == false) return API_ERROR;
	if (parameter.FindName("RobotPort") == false) return API_ERROR;
	
	sensorCount = atoi (parameter.GetValue("Size").c_str());
	robotIP = parameter.GetValue("RobotIP");
	robotPort = atoi (parameter.GetValue("RobotPort").c_str());

	PrintMessage("-- DasaRobot_TetraIR Parameter\n");
	PrintMessage("-- Size              : %d\n", sensorCount);
	PrintMessage("-- RobotIP           : %s\n", robotIP.c_str ());
	PrintMessage("-- RobotPort         : %d\n", robotPort);
	PrintMessage("\n");

	this->parameter = parameter;

	return API_SUCCESS;
}
开发者ID:opros-wiki,项目名称:OPRoS_v1_Components,代码行数:20,代码来源:DasaRobot_TetraIR.cpp

示例11: SetParameter

ReturnType KitechCardinalSplineTrajectoryGenerationComp::SetParameter(Property parameter)
{
	if(parameter.FindName("Tension") == false) {
		PrintMessage("ERROR : KitechCardinalSplineTrajectoryGenerationComp::SetParameter() -> Can't find the Tension in property\n");
		return OPROS_BAD_INPUT_PARAMETER;
	}
	_tension = atof(parameter.GetValue("Tension").c_str());

	_parameter = parameter;

	return _errorCode = OPROS_SUCCESS;
}
开发者ID:OPRoS,项目名称:Component,代码行数:12,代码来源:KitechCardinalSplineTrajectoryGenerationComp.cpp

示例12: RefreshContents

 void TypeNameFilter::RefreshContents() {
     Flags.Refresh = false;
     TypeNameFilterArguments* tfa = (TypeNameFilterArguments*)(Arguments->AdditionalArguments);
     RegexMatcher regex(tfa->ComparisonRegex);
     ScopeEnumerator* e = new ScopeEnumerator(*(Arguments->Source),Arguments->Requester);
     if(tfa->IncludeWhenMatches) {
         while (e->MoveNext()) {
             Property* p = e->Current;
             if (regex.Matches(*(p->GetValue()->GetClassTypeInfo()->ClassName))) {
                 Add(*p);
             }
         }
     } else {
         while (e->MoveNext()) {
             Property* p = e->Current;
             if (!regex.Matches(*(p->GetValue()->GetClassTypeInfo()->ClassName))) {
                Add(*p);
             }
         }
     }
     delete e;
 }
开发者ID:dwhobrey,项目名称:MindCausalModellingLibrary,代码行数:22,代码来源:TypeNameFilter.cpp

示例13: List

void CMDBoard::List(Player* mobile)
{
    World* world = World::GetPtr();
    BoardManager* bmanager = (BoardManager*)world->GetProperty("boards");
    Property* prop = NULL;
    int id = 0;
    int i = 0;
    Board* board = NULL;
    std::vector<BoardPost*>* posts;
    std::vector<BoardPost*>::iterator it, itEnd;
    std::stringstream st;

    if (!bmanager)
        {
            mobile->Message(MSG_ERROR, "Can not access the board system.");
            return;
        }

    prop = mobile->variables.FindProperty("board");
    if (!prop)
        {
            mobile->Message(MSG_ERROR, "No board set.");
            mobile->Message(MSG_ERROR, "Use board set to choose a board.");
            return;
        }

    id = prop->GetValue().GetInt();
    board = bmanager->GetBoardByIndex(id);
    if (!board)
        {
            mobile->Message(MSG_ERROR, "The board you have set does not exist.");
            return;
        }

    posts = board->GetPosts();
    if (!posts->size())
        {
            mobile->Message(MSG_INFO, "No messages.");
            return;
        }

    st << left << "#" << setw(12) << "poster" << right << "subject" << endl;
    st << Repete("-", 80) << endl;
    itEnd = posts->end();
    i = 1;
    for (it = posts->begin(); it != itEnd; ++it, ++i)
        {
            st << left << "[" << setw(5) << i << "]" << setw(12) << (*it)->GetPoster() << right << (*it)->GetSubject() << endl;
        }
    mobile->Message(MSG_LIST, st.str());
}
开发者ID:renokun,项目名称:Aspen,代码行数:51,代码来源:boardModule.cpp

示例14: GetProxy

 Property* Alias::GetProxy() {
     if(IsPath) {
         if (mAliasedPath != NULL) {
             Property* p = mAliasedPath->GetProperty(Creator,NULL,PropertyModes::Traversing);
             if (p != NULL) {
                 // Do not cache path value.
                 return p->GetValue();
             }
         }
     } else if (mCachedProperty == NULL && mAliasedProperty != NULL) {
         mCachedProperty = mAliasedProperty->GetValue();
     }
     return mCachedProperty == NULL ? Property::NullProperty : mCachedProperty;
 }
开发者ID:dwhobrey,项目名称:MindCausalModellingLibrary,代码行数:14,代码来源:Alias.cpp

示例15: SetParameter

int Robotis_DynamixelUART::SetParameter(Property parameter)
{
	if(parameter.FindName("MaximumPower") == false)				goto ERROR_Robotis_DynamixelUART_SetParameter;
	_profile.maximumPower = atof(parameter.GetValue("MaximumPower").c_str());

	if(parameter.FindName("LinePerRevolution") == false)		goto ERROR_Robotis_DynamixelUART_SetParameter;
	_profile.linePerRevolution = atof(parameter.GetValue("LinePerRevolution").c_str());
	//	엔코더가 고정되어 있기 때문에 강제로 값을 설정
	_profile.linePerRevolution = 360.0 * 1023.0 / 300.0;

	if(parameter.FindName("ReductionRatio") == false)			goto ERROR_Robotis_DynamixelUART_SetParameter;
	_profile.reductionRatio = atof(parameter.GetValue("ReductionRatio").c_str());

	if(parameter.FindName("MaximumVelocity") == false)			goto ERROR_Robotis_DynamixelUART_SetParameter;
	_profile.maximumVelocity = atof(parameter.GetValue("MaximumVelocity").c_str());

	if(parameter.FindName("Acceleration") == false)				goto ERROR_Robotis_DynamixelUART_SetParameter;
	_profile.acceleration = atof(parameter.GetValue("Acceleration").c_str());

	if(parameter.FindName("MinimumPositionLimit") == false)		goto ERROR_Robotis_DynamixelUART_SetParameter;
	_profile.minimumPositionLimit = atof(parameter.GetValue("MinimumPositionLimit").c_str());

	if(parameter.FindName("MaximumPositionLimit") == false)		goto ERROR_Robotis_DynamixelUART_SetParameter;
	_profile.maximumPositionLimit = atof(parameter.GetValue("MaximumPositionLimit").c_str());

	if(dynamixel == NULL) {
		if(uart == NULL) {
			return API_ERROR;
		}
		dynamixel = new DynamixelUART(uart, 0);
	}

	if(dynamixel->SetTorqueLimit((unsigned short)(_profile.maximumPower)) == false) {
		PrintMessage("ERROR : Robotis_DynamixelUART::SetParameter() -> Occur a error in SetTorqueLimit().\n");
		return API_ERROR;
	}

	if(dynamixel->SetMovingSpeed((unsigned short)(_profile.maximumVelocity * 60 * _profile.reductionRatio / 360.0)) == false) {
		PrintMessage("ERROR : Robotis_DynamixelUART::SetParameter() -> Occur a error in SetMovingSpeed().\n");
		return API_ERROR;
	}
	
	this->parameter = parameter;

	return API_SUCCESS;

ERROR_Robotis_DynamixelUART_SetParameter :
	PrintMessage("ERROR : Faulhaber_MCDC2805::SetParameter() -> Can't find parameters\n");
	return API_ERROR;
}
开发者ID:opros-wiki,项目名称:OPRoS_v1_Components,代码行数:50,代码来源:Robotis_DynamixelUART.cpp


注:本文中的Property::GetValue方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。