Public Member Functions | Private Member Functions | Private Attributes
self_test::TestRunner Class Reference

Class to facilitate the creation of component self-tests. More...

#include <self_test.h>

Inheritance diagram for self_test::TestRunner:
Inheritance graph
[legend]

List of all members.

Public Member Functions

void checkTest ()
 Check if a self-test is pending. If so, start it and wait for it to complete.
void setID (std::string id)
 Sets the ID of the part being tested.
 TestRunner (ros::NodeHandle h=ros::NodeHandle())
 Constructs a dispatcher.

Private Member Functions

bool doTest (diagnostic_msgs::SelfTest::Request &req, diagnostic_msgs::SelfTest::Response &res)

Private Attributes

std::string id_
ros::NodeHandle node_handle_
ros::CallbackQueue self_test_queue_
ros::ServiceServer service_server_
bool verbose

Detailed Description

Class to facilitate the creation of component self-tests.

The self_test::TestRunner class advertises the "self_test" service, and maintains a list of pretests and tests. When "self_test" is invoked, TestRunner waits for a suitable time to interrupt the node and run the tests. Results from the tests are collected and returned to the caller.

self_test::TestRunner's is a derived class from diagnostic_updater::DiagnosticTaskVector. For documentation of the add() methods you will have to refer to the base class's documentation.

Definition at line 68 of file self_test.h.


Constructor & Destructor Documentation

Constructs a dispatcher.

Parameters:
ownerClass that owns this dispatcher. This is used as the default class for tests that are member-functions.
hNodeHandle from which to work. (Currently unused?)

Definition at line 89 of file self_test.h.


Member Function Documentation

Check if a self-test is pending. If so, start it and wait for it to complete.

Definition at line 104 of file self_test.h.

bool self_test::TestRunner::doTest ( diagnostic_msgs::SelfTest::Request &  req,
diagnostic_msgs::SelfTest::Response &  res 
) [inline, private]

The service callback for the "self-test" service.

Definition at line 127 of file self_test.h.

void self_test::TestRunner::setID ( std::string  id) [inline]

Sets the ID of the part being tested.

This method is expected to be called by one of the tests during the self-test.

Parameters:
id: String that identifies the piece of hardware being tested.

Definition at line 118 of file self_test.h.


Member Data Documentation

std::string self_test::TestRunner::id_ [private]

Definition at line 74 of file self_test.h.

Definition at line 73 of file self_test.h.

Definition at line 72 of file self_test.h.

Definition at line 71 of file self_test.h.

Definition at line 76 of file self_test.h.


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


self_test
Author(s): Kevin Watts, Brice Rebsamen , Jeremy Leibs and Blaise Gassend
autogenerated on Sun Oct 5 2014 23:27:24