Public Member Functions | Static Public Attributes

JAUS::PrimitiveDriver Class Reference

The Primitive Driver allows for basic platform mobility. More...

#include <primitivedriver.h>

Inheritance diagram for JAUS::PrimitiveDriver:
JAUS::Management::Child JAUS::AccessControl::Child JAUS::Events::Child JAUS::Service

List of all members.

Public Member Functions

 PrimitiveDriver ()
 Constructor.
virtual ~PrimitiveDriver ()
 Destructor.
virtual bool SetWrenchEffort (const JAUS::SetWrenchEffort *command)=0
virtual JAUS::SetWrenchEffort GetCurrentWrenchEffort () const
 Returns the current Wrench Effort command received.
virtual Time GetWrenchEffortTime () const
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 depending on what type of control has been established for the component.
virtual MessageCreateMessage (const UShort messageCode) const
 Attempts to create the message desired. Only message supported by this Service can be created by this Service.
virtual void PrintStatus () const
 Prints the status of the Primitive Driver.

Static Public Attributes

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

Detailed Description

The Primitive Driver allows for basic platform mobility.

wheeled, but describes mobility in six degrees of freedom using a percent of availible effort in each of the directions. Additionally, no power plant (gasoline, diesel, or battery) is implied and the service functions strictly in an open loop manner, i.e., a velocity is not commanded since that requires a speed sensor. Note that the specific actuator commands are not defined by JAUS.

Definition at line 67 of file primitivedriver.h.


Constructor & Destructor Documentation

PrimitiveDriver::PrimitiveDriver (  )

Constructor.

Definition at line 54 of file primitivedriver.cpp.

PrimitiveDriver::~PrimitiveDriver (  ) [virtual]

Destructor.

Definition at line 65 of file primitivedriver.cpp.


Member Function Documentation

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

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

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 221 of file primitivedriver.cpp.

bool PrimitiveDriver::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 105 of file primitivedriver.cpp.

SetWrenchEffort PrimitiveDriver::GetCurrentWrenchEffort (  ) const [virtual]

Returns the current Wrench Effort command received.

Returns:
The current Wrench Effort as a SetWrenchEffort message.

Definition at line 77 of file primitivedriver.cpp.

Time PrimitiveDriver::GetWrenchEffortTime (  ) const [virtual]
Returns:
The time (UTC seconds) that a Set Wrench Effort command was received.

Definition at line 89 of file primitivedriver.cpp.

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

Implements JAUS::Service.

Definition at line 88 of file primitivedriver.h.

bool PrimitiveDriver::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 143 of file primitivedriver.cpp.

void PrimitiveDriver::PrintStatus (  ) const [virtual]

Prints the status of the Primitive Driver.

Reimplemented from JAUS::Service.

Definition at line 248 of file primitivedriver.cpp.

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

Processes message received by the Service. If not supported, then message is passed to inheriting services depending on what type of control has been established for the component.

This Service supports PrimitiveDriver related messages only.

Parameters:
[in]messageMessage data to process.

Reimplemented from JAUS::Service.

Definition at line 170 of file primitivedriver.cpp.

virtual bool JAUS::PrimitiveDriver::SetWrenchEffort ( const JAUS::SetWrenchEffort command ) [pure virtual]

Member Data Documentation

const std::string PrimitiveDriver::Name = "urn:jaus:jss:mobility:PrimitiveDriver" [static]

String name of the Service.

Definition at line 70 of file primitivedriver.h.


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