ALBehaviorManager API

NAOqi Core - Overview | API


Namespace : AL

#include <alproxies/albehaviormanagerproxy.h>

Methods

void ALBehaviorManagerProxy::addDefaultBehavior(const std::string& prefixedBehavior)

Set the given behavior as default

Parameters:
  • behavior – Behavior name.
std::vector<std::string> ALBehaviorManagerProxy::getBehaviorNames()

Warning

DEPRECATED: use ALBehaviorManagerProxy::getInstalledBehaviors() instead

Get behaviors

Returns:Returns the list of behaviors prefixed by their type (User/ or System/).
std::vector<std::string> ALBehaviorManagerProxy::getDefaultBehaviors()

Get default behaviors

Returns:Return default behaviors
std::vector<std::string> ALBehaviorManagerProxy::getInstalledBehaviors()
Returns:Returns the behaviors list
std::vector<std::string> ALBehaviorManagerProxy::getRunningBehaviors()

Get running behaviors

Returns:Return running behaviors
std::vector<std::string> ALBehaviorManagerProxy::getSystemBehaviorNames()

Get system behaviors

Returns:Returns the list of system behaviors prefixed by System/.
std::vector<std::string> ALBehaviorManagerProxy::getUserBehaviorNames()

Get user’s behaviors

Warning

DEPRECATED: use ALBehaviorManagerProxy::getInstalledBehaviors() instead

Returns:Returns the list of user’s behaviors prefixed by User/.
bool ALBehaviorManagerProxy::isBehaviorInstalled(const std::string& name)
Parameters:
  • name – The behavior directory name
Returns:

Returns true if it is a valid behavior

bool ALBehaviorManagerProxy::isBehaviorPresent(const std::string& prefixedBehavior)

Warning

DEPRECATED: use :cpp:func: ALBehaviorManagerProxy::isBehaviorInstalled(const std::string& name) instead

Tell if the supplied name corresponds to an existing behavior.

Parameters:
  • prefixedBehavior – Prefixed behavior.
Returns:

Returns true if it is an existing behavior

bool ALBehaviorManagerProxy::isBehaviorRunning(const std::string& name)

Tell if supplied name corresponds to a running behavior

Parameters:
  • name – Behavior name.
Returns:

Returns true if the name supplied is a running behavior

void ALBehaviorManagerProxy::playDefaultProject()

Play default behaviors

bool ALBehaviorManagerProxy::preloadBehavior(const std::string& name)

Load a behavior

Parameters:
  • name – Behavior name.
Returns:

Returns true if it was successfully loaded.

bool ALBehaviorManagerProxy::removeBehavior(const std::string& name)

Remove a behavior from the filesystem

Parameters:
  • name – Behavior name.
Returns:

Return true if succeeded, else false

void ALBehaviorManagerProxy::removeDefaultBehavior(const std::string& name)

Remove the given behavior from the default behaviors

Parameters:
  • name – Behavior name.
void ALBehaviorManagerProxy::runBehavior(const std::string& name)

Run a behavior

Parameters:
  • name – Behavior name.
void ALBehaviorManagerProxy::stopAllBehaviors()

Stop all behaviors

void ALBehaviorManagerProxy::stopBehavior(const std::string& name)

Stop a behavior

Parameters:
  • name – Behavior name.

Events

Event: "BehaviorsRun"
callback(std::string eventName, const std::vector<std::string> runningBehaviorList, std::string subscriberIdentifier)

Raised when the list of running behaviors change.

Parameters:
  • eventName (std::string) – “BehaviorsRun”
  • runningBehaviorList – list of all running behaviors
  • subscriberIdentifier (std::string) –
Event: "BehaviorListChanged"
callback(std::string eventName, std::string subscriberIdentifier)

Internal event, do not use.