Public Member Functions | Static Public Attributes

JAUS::Liveness Class Reference

This service provides a means to maintain connection liveness between communicating components. More...

#include <liveness.h>

Inheritance diagram for JAUS::Liveness:
JAUS::Events::Child JAUS::Service

List of all members.

Public Member Functions

 Liveness ()
 Constructor.
 ~Liveness ()
 Destructor.
virtual bool GenerateEvent (const Events::Subscription &info) const
 Generates an event for the given information.
virtual bool IsEventSupported (const Events::Type type, const double requestedPeriodicRate, const Message *queryMessage, double &confirmedPeriodicRate, std::string &errorMessage) const
 Checks if the event is supported by the Service.
virtual bool IsDiscoverable () const
virtual void Receive (const Message *message)
 Processes message received by the Service. If not supported, then message is passed to inheriting services.
virtual MessageCreateMessage (const UShort messageCode) const
 Attempts to create the message desired. Only message supported by this Service can be created by this Service.

Static Public Attributes

static const std::string Name = "urn:jaus:jss:core:Liveness"
 String name of the Service.

Detailed Description

This service provides a means to maintain connection liveness between communicating components.

Definition at line 56 of file liveness.h.


Constructor & Destructor Documentation

Liveness::Liveness (  )

Constructor.

Definition at line 53 of file liveness.cpp.

Liveness::~Liveness (  )

Destructor.

Definition at line 65 of file liveness.cpp.


Member Function Documentation

Message * Liveness::CreateMessage ( const UShort  messageCode ) const [virtual]

Attempts to create the message desired. Only message supported by this Service can be created by this Service.

This Service supports the following message: Query Heartbeat Pulse and Report Heartbeat Pulse.

Parameters:
[in]messageCodeMessage to create.
Returns:
Pointer to newly allocated Message data, NULL if message is not supported by the Service.

Implements JAUS::Service.

Definition at line 173 of file liveness.cpp.

bool Liveness::GenerateEvent ( const Events::Subscription info ) const [virtual]

Generates an event for the given information.

Parameters:
[in]infoThe event information (ID, Sequence #, etc.) for generation.
Returns:
True if event generated, otherwise false.

Implements JAUS::Events::Child.

Definition at line 79 of file liveness.cpp.

virtual bool JAUS::Liveness::IsDiscoverable (  ) const [inline, virtual]

Implements JAUS::Service.

Definition at line 73 of file liveness.h.

bool Liveness::IsEventSupported ( const Events::Type  type,
const double  requestedPeriodicRate,
const Message queryMessage,
double &  confirmedPeriodicRate,
std::string &  errorMessage 
) const [virtual]

Checks if the event is supported by the Service.

Parameters:
[in]typeThe event type (Periodic/EveryChange).
[in]requestedPeriodicRateIf type == Periodic, then this is the desired update rate.
[in]queryMessageThe query message associated with the event.
[out]confirmedPeriodicRateThis is the confirmed periodic rate supported by the Service.
[out]errorMessageIf not supported, this is an optional error message.
Returns:
True if event supported, otherwise false.

Implements JAUS::Events::Child.

Definition at line 107 of file liveness.cpp.

void Liveness::Receive ( const Message message ) [virtual]

Processes message received by the Service. If not supported, then message is passed to inheriting services.

This Service supports the following message: Query Heartbeat Pulse and Report Heartbeat Pulse.

Parameters:
[in]messageMessage data to process.

Reimplemented from JAUS::Service.

Definition at line 134 of file liveness.cpp.


Member Data Documentation

const std::string Liveness::Name = "urn:jaus:jss:core:Liveness" [static]

String name of the Service.

Definition at line 59 of file liveness.h.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines