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:Return 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] ].

  • Level of failure severity: 0 (NEGLIGIBLE), 1 (SERIOUS) or 2 (CRITICAL).
  • The list of device in failure: a chain name or a sensor name.
  • 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:Return an ALValue with the actual passive diagnosis result with the following form:

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

  • Level of failure severity: 0 (NEGLIGIBLE), 1 (SERIOUS) or 2 (CRITICAL).
  • The list of device in failure: a chain name or a sensor name.
  • 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: "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) –