SoftBank Robotics documentation What's new in NAOqi 2.5?

ALDiagnosis API

Overview | API


Namespace : AL

#include <alproxies/aldiagnosisproxy.h>

Method list

As any module, this module inherits methods from ALModule API. It also has the following specific methods:

class ALDiagnosisProxy

Methods

AL::ALValue ALDiagnosisProxy::getActiveDiagnosis()

Return the actual state of the active diagnosis. Only the highest level of failure is returned.

Returns:An ALValue with the actual active diagnosis result with the following form:

[ int Level of failure severity, [AL::ALValue The list of device in failure] ]

Where:

Example: [1, [“LArm”, “Sonar”]]

AL::ALValue ALDiagnosisProxy::getDiagnosisStatus()

Return the actual state of the active and passive diagnosis. Only the highest level of failure is returned.

Returns:An ALValue with the summary of active and passive diagnosis result with the following form:

[ int Level of failure severity, [AL::ALValue The list of device in failure] ]

Where:

Example: [1, [“LArm”, “Sonar”]]

AL::ALValue ALDiagnosisProxy::getPassiveDiagnosis()

Return the actual state of the passive diagnosis. Only the highest level of failure is returned.

Returns:An ALValue containing the actual passive diagnosis result with the following form:

[ int Level of failure severity, [AL::ALValue The list of device in failure] ]

Where:

Example: [1, [“LArm”, “Sonar”]]

bool ALDiagnosisProxy::isNotificationEnabled()

Get notification status. Returns true if notification is active.

Returns:Return true if notification is active.
void ALDiagnosisProxy::setEnableNotification(bool enable)

Enable / Disable passive diagnosis notification.

Parameters:
  • enable – If true enables passive diagnosis notification.

Events

Event: "ActiveDiagnosisErrorChanged"
callback(std::string eventName, AL::ALValue activeDiagnosis, std::string subscriberIdentifier)

Raised when the active diagnosis status has changed.

Parameters:
  • eventName (std::string) – “ActiveDiagnosisErrorChanged”
  • activeDiagnosis – The same return ALValue as the API ALDiagnosisProxy::getActiveDiagnosis
  • subscriberIdentifier (std::string) –
Event: "ALDiagnosis/DiagnosisErrorChanged"
callback(std::string eventName, AL::ALValue diagnosis, std::string subscriberIdentifier)

Raised when the active or passive diagnosis status has changed.

Parameters:
  • eventName (std::string) – “ALDiagnosis/DiagnosisErrorChanged”
  • diagnosis – The same return ALValue as the API ALDiagnosisProxy::getDiagnosisStatus
  • subscriberIdentifier (std::string) –
Event: "PassiveDiagnosisErrorChanged"
callback(std::string eventName, AL::ALValue passiveDiagnosis, std::string subscriberIdentifier)

Raised when the passive diagnosis status has changed.

Parameters:
  • eventName (std::string) – “PassiveDiagnosisErrorChanged”
  • passiveDiagnosis – The same return ALValue as the API ALDiagnosisProxy::getPassiveDiagnosis
  • subscriberIdentifier (std::string) –
Event: "ALDiagnosis/RobotIsReady"
callback(std::string eventName, AL::ALValue robotIsReady, std::string subscriberIdentifier)

Raised when the active diagnosis, automatically launched after the NAOqi startup, is finished.

Parameters:
  • eventName (std::string) – “ALDiagnosis/RobotIsReady”
  • robotIsReady – True if no critical error is detected at start-up diagnosis.
  • subscriberIdentifier (std::string) –
Event: "ALDiagnosis/ActiveDiagnosisFinished"
callback(std::string eventName, AL::ALValue type, std::string subscriberIdentifier)

Raised when an active diagnosis is finished.

Parameters:
  • eventName (std::string) – “ALDiagnosis/ActiveDiagnosisFinished”
  • type – “wakeUp” when active diagnosis at wakeUp finished. “rest” when active diagnosis at rest finished.
  • subscriberIdentifier (std::string) –