INTRODUCTION
Overview
Download and Install
Quick Start
Documentation
Publications

NONFRAMEWORK CODE
Driver Interfaces
Drivers
Libraries
Utilities

FRAMEWORK CODE
Interfaces
Components
Libraries
Utilities

Full Software Listings

DEVELOPER
Tutorials
Examples
Dev Guide
Dashboard

PEOPLE
Contributors
Users

SourceForge.net Logo
Project
Download
Mailing lists

 

         

hydroiceutil::SubsystemThread Class Reference

A class implementing the common subsystem state machine, also catches all. More...

#include <subsystemthread.h>

Inherited by hydrormputil::DriverThread.

List of all members.

Public Member Functions

 SubsystemThread (gbxutilacfr::Tracer &tracer, gbxutilacfr::Status &status, const std::string &subsysName="SubsystemThread", double maxHeartbeatIntervalSec=-1.0)
 Constructor.
gbxutilacfr::Tracer & tracer ()
 Convinient access to the component-wide tracer.
void setMaxHeartbeatInterval (double interval)
 Passes this information to the system Status.
void setSubsystemType (gbxutilacfr::SubsystemType type)
 Passes this information to the system Status.
std::string subsysName () const
 Returns subsystem name assigned to this thread.
gbxutilacfr::SubHealth & health ()
 Convinient for giving somebody else the right to set health of this subsystem.

Detailed Description

A class implementing the common subsystem state machine, also catches all.

possible exceptions and integrates some Status operations.If an exception is caught when the thread is not stopping, a status fault is issued. Then the thread will wait for someone to call stop().

The state machine is defined by gbxutilacfr::Status.

Re-implementation all three functions is optional.

void MyThread::initialise()
{
    while ( !isStopping() )
    {
        // initialise
    }
}

void MyThread::work()
{
    // main loop
    while ( !isStopping() )
    {
        // do something
    }
}
Note:
A similar class defined in libOrcaIce is used much more frequently. It differs from this one in that catches Ice exceptions and should be used in components.

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

Webmaster: Tobias Kaupp (tobasco at users.sourceforge.net)


Generated for Orca Robotics by  doxygen 1.4.5