List Group
You can find the names of all the LED devices in a LED group using the "listGroup" command.
Prototype:
/** * Lists the devices that make up the group * @param pGroupName The name of the group. * @return A vector of device names in the group. */ std::vector<std::string> listGroup( const std::string& pGroupName );
Python:
# Replace "127.0.0.1" with the IP of your NAO leds = ALProxy("ALLeds","127.0.0.1",9559) # Print the names of all the groups print(leds.listGroup("FaceLedsLeftExternal"))
C++:
ALPtr<ALLedsProxy> leds = ALPtr<ALLedsProxy>(new ALLedsProxy(getParentBroker())); // Print the names of all the devices in the group std::vector<std::string> deviceNames = leds.listGroup("FaceLedsLeftExternal"); for(unsigned int i=0; i < deviceNames.size(); i++) { std::cout << deviceNames.at(i) << std::endl; }