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

 

         

orcasystemstatusutil::StatusConsumerImpl Class Reference

#include <statusconsumerImpl.h>

Inherits ConsumerImpl< orca::Status, orca::StatusConsumer, orca::StatusData >.

Inherited by systemstatus::StatusConsumerImpl.

List of all members.

Public Member Functions

 StatusConsumerImpl (const orca::FQComponentName &fqCompName, const Config &config, const orcaice::Context &context)
 Platform and component names are different from the ones in the context!
void subscribe ()
 Contains remote calls. Thread-safe.
void checkStatus ()
orca::EstimatedComponentStatus estimatedStatus () const
orca::FQComponentName name () const
virtual void dataEvent (const orca::StatusData &data)

Protected Member Functions

virtual void statusRecievedEvent (const orca::FQComponentName &name, const orca::StatusData &)
 This event handler is called every time status is received.
virtual void estimateChangedEvent (const orca::EstimatedComponentStatus &)
virtual void resubscribeRequestedEvent (const orca::EstimatedComponentStatus &)
 This event handler is called every time a resubscription is needed.

Detailed Description

Generic implementation of StatusConsumer which receives updates from the component, analyses data but leaves it up to the derived class to take action.

This implementation provides an event-driven interface. The derived class reimplements the *Event functions which are called when someting happens.

Entry { enteredInactiveEvent( estimatedState ); }
Inactive
{
    received
    Reporting
    { receivedEvent( estimatedState ); }
}

Entry { enteredReportingEvent( estimatedState ); }
Reporting
{
    timedOut
    Stale
    { timedOutEvent( estimatedState ); }

    received
    nil
    { receivedEvent( estimatedState ); }
}

Entry { enteredStaleEvent( estimatedState ); }
Stale
{
    received
    Reporting
    { receivedEvent( estimatedState ); }

    gaveUp
    Inactive
    { gaveUpEvent( estimatedState ); }
}

Member Function Documentation

void orcasystemstatusutil::StatusConsumerImpl::checkStatus (  ) 

This function must be called periodically to detect staleness of component status information. sends internal events if the status becomes stale.

Contains remote calls. does not block until the next status update but can decide to resubscribe. Thread-safe.

void orcasystemstatusutil::StatusConsumerImpl::dataEvent ( const orca::StatusData &  data  )  [virtual]

This function is called when new data arrives to the consumer. Default implementation does nothing. Re-implement this callback in the derived class.

Reimplemented from orcaifaceimpl::ConsumerImpl< orca::Status, orca::StatusConsumer, orca::StatusData >.

References statusRecievedEvent().

virtual void orcasystemstatusutil::StatusConsumerImpl::estimateChangedEvent ( const orca::EstimatedComponentStatus &   )  [inline, protected, virtual]

This event handler is called every time status is received and estimated state has changed.

orca::EstimatedComponentStatus orcasystemstatusutil::StatusConsumerImpl::estimatedStatus (  )  const

Non-blocking local calls only. Simply returns the current estimate. Thread-safe. Do not call from event handlers!

orca::FQComponentName orcasystemstatusutil::StatusConsumerImpl::name (  )  const

Returns the name of the component which is being monitored. Thread-safe. Do not call from event handlers!


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