anyKode Marilou
ContentsIndexHome
PreviousUpNext
RobotPHX::QueryDeviceMotor

QueryDeviceMotor searches and return a motor device from the list of the PHX's devices.

C++
DeviceMotor * QueryDeviceMotor(const xkode::lib::String& Name);
Parameters 
Description 
const xkode::lib::String& Name 
[in] Relative name of the device engine:
Ex: hinge0/axis1/motor 

Pointer to the instance of the required device motor. The function returns NULL if the device were not found.

//Visual .net 2005 Managed C++ syntax

//...
Moda::DeviceMotor ^pLeftMotor=robot->QueryDeviceMotor("jl/a/m");
Moda::DeviceMotor ^pRightMotor=robot->QueryDeviceMotor("jr/a/m");
pLeftMotor->SetVelocityDPS(360);
pRightMotor->SetVelocityDPS(360);
//...
Documentation v4.7 (18/01/2015), Copyright (c) 2015 anyKode. All rights reserved.
What do you think about this topic? Send feedback!