self_test::TestRunner Class Reference

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

#include <self_test.h>

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 66 of file self_test.h.


Constructor & Destructor Documentation

self_test::TestRunner::TestRunner ( ros::NodeHandle  h = ros::NodeHandle()  )  [inline]

Constructs a dispatcher.

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

Definition at line 87 of file self_test.h.


Member Function Documentation

void self_test::TestRunner::checkTest (  )  [inline]

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

Definition at line 102 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 125 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 116 of file self_test.h.


Member Data Documentation

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

Definition at line 72 of file self_test.h.

ros::NodeHandle self_test::TestRunner::node_handle_ [private]

Definition at line 71 of file self_test.h.

ros::CallbackQueue self_test::TestRunner::self_test_queue_ [private]

Definition at line 70 of file self_test.h.

ros::ServiceServer self_test::TestRunner::service_server_ [private]

Definition at line 69 of file self_test.h.

Definition at line 74 of file self_test.h.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables


self_test
Author(s): Jeremy Leibs and Blaise Gassend
autogenerated on Fri Jan 11 09:35:20 2013