getPrefix
对所有器件和子器件,返回ALMemory的基名。
/** * @return Return the ALMemory base name for all device/sensors (1st string in the array) * and all devices (2nd string in the array) */ ALValue DCM::getPrefix(void)
至此,您得到的是一个带有字符串“Device/SubDeviceList/”和“Device/DeviceList/”的数组。
Python语言范例
import naoqi from naoqi import ALProxy dcm = ALProxy("DCM","127.0.0.1",9559) print dcm.getPrefix(0)
这个程序返回:
['Device/SubDeviceList/', 'Device/DeviceList/']
C++语言范例
// Program running in a module. Do not forget the #include "dcmproxy.h" try { DCMProxy* dcm = new DCMProxy(pBroker); cout << dcm->getPrefix().toString() << endl; } AL_CATCH_ERR(return false;);