Public Attributes
diagnostic_aggregator::processErrors Struct Reference

GenericAnalyzer is most basic diagnostic Analyzer. More...

#include <corobot_analyzer.h>

List of all members.

Public Attributes

std::string error
int level
std::string processName

Detailed Description

GenericAnalyzer is most basic diagnostic Analyzer.

GenericAnalyzer analyzes a segment of diagnostics data and reports processed diagnostics data. All analyzed status messages are prepended with "Base Path/My Path", where "Base Path" is from the parent of this Analyzer, (ex: 'PR2') and "My Path" is from this analyzer (ex: 'Power System').

The GenericAnalyzer is initialized as a plugin by the diagnostic Aggregator. Following is an example of the necessary parameters of the GenericAnalyzer. See the Aggregator class for more information on loading Analyzer plugins.

 * my_namespace:
 *   type: GenericAnalyzer
 *   path: My Path
 *

Required Parameters:

In the above example, the GenericAnalyzer wouldn't analyze anything. The GenericAnalyzer must be configured to listen to diagnostic status names. To do this, optional parameters, like "contains", will tell the analyzer to analyze an item that contains that value. The GenericAnalyzer looks at the name of the income diagnostic_msgs/DiagnosticStatus messages to determine item matches.

Optional Parameters for Matching:

In some cases, it's possible to clean up the processed diagnostic status names.

The special parameter '''find_and_remove_prefix''' combines "startswith" and "remove_prefix". It can be given as a string or list of strings.

If the number of incoming items under a GenericAnalyzer is known, use '''num_items''' to set an exact value. If the number of items that matches the above parameters is incorrect, the GenericAnalyzer will report an error in the top-level status. This is "-1" by default. Negative values will not cause a check on the number of items.

For tracking stale items, use the "timeout" parameter. Any item that doesn't update within the timeout will be marked as "Stale", and will cause an error in the top-level status. Default is 5.0 seconds. Any value <0 will cause stale items to be ignored.

The GenericAnalyzer can discard stale items. Use the "discard_stale" parameter to remove any items that haven't updated within the timeout. This is "false" by default.

Example configurations:

 * hokuyo:
 *   type: GenericAnalyzer
 *   path: Hokuyo
 *   find_and_remove_prefix: hokuyo_node
 *   num_items: 3
 *
 * power_system:
 *   type: GenericAnalyzer
 *   path: Power System
 *   startswith: [
 *     'Battery',
 *     'IBPS']
 *   expected: Power board 1000
 *   dicard_stale: true
 *

The GenericAnalyzer will report the latest status of any item that is should analyze. It will report a separate diagnostic_msgs/DiagnosticStatus with the name "Base Path/My Path". This "top-level" status will have the error state of the highest of its children.

Stale items are handled differently. A stale child will cause an error in the top-level status, but if all children are stale, the top-level status will be stale.

Example analyzer behavior, using the "Hokuyo" configuration above:

 * Input - (DiagnosticStatus Name, Error State)
 * hokuyo_node: Connection Status, OK
 * hokuyo_node: Frequency Status, Warning
 * hokuyo_node: Driver Status, OK
 *
 * Output - (DiagnosticStatus Name, Error State)
 * Hokuyo, Warning
 * Hokuyo/Connection Status, OK
 * Hokuyo/Frequency Status, Warning
 * Hokuyo/Driver Status, OK
 *

Definition at line 198 of file corobot_analyzer.h.


Member Data Documentation

Definition at line 201 of file corobot_analyzer.h.

Definition at line 202 of file corobot_analyzer.h.

Definition at line 200 of file corobot_analyzer.h.


The documentation for this struct was generated from the following file:


corobot_diagnostics
Author(s):
autogenerated on Wed Aug 26 2015 11:09:34