Create a new group
You can create your own group of devices using the "createGroup" command.
Prototype:
/** * createGroup Creates a named group of LEDs. * @param pGroupName The name of the Group. * @param pLedNames A vector of LED device names */ void createGroup( const std::string& pGroupName, const std::vector<std::string>& pLedNames );
Python:
# Replace "127.0.0.1" with the IP of your NAO leds = ALProxy("ALLeds","127.0.0.1",9559) # Create a new group names = array([ "Face/Led/Red/Left/0Deg/Actuator/Value", "Face/Led/Red/Left/90Deg/Actuator/Value", "Face/Led/Red/Left/180Deg/Actuator/Value", "Face/Led/Red/Left/270Deg/Actuator/Value"]) leds.createGroup("MyGroup",names) # Switch the new group on leds.on("MyGroup")
C++:
ALPtr<ALLedsProxy> leds = ALPtr<ALLedsProxy>(new ALLedsProxy(getParentBroker())); // Create a new group std::vector<std::string> names; names.push_back("Face/Led/Red/Left/0Deg/Actuator/Value"); names.push_back("Face/Led/Red/Left/90Deg/Actuator/Value"); names.push_back("Face/Led/Red/Left/180Deg/Actuator/Value"); names.push_back("Face/Led/Red/Left/270Deg/Actuator/Value"); leds.createGroup("MyGroup",names); // Switch the new group on leds.on("MyGroup");