MOOS 0.2375
Public Member Functions | Protected Member Functions | Protected Attributes
CSimulator Class Reference

#include <Simulator.h>

Inheritance diagram for CSimulator:
Inheritance graph
[legend]
Collaboration diagram for CSimulator:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 CSimulator ()
virtual ~CSimulator ()
 CSimulator ()
virtual ~CSimulator ()

Protected Member Functions

bool OnNewMail (MOOSMSG_LIST &NewMail)
bool Iterate ()
bool OnConnectToServer ()
bool OnStartUp ()
bool OnNewMail (MOOSMSG_LIST &NewMail)
bool Iterate ()
bool OnConnectToServer ()
bool OnStartUp ()

Protected Attributes

double m_dfBatteryVoltage
double m_dfHeading
std::string m_sBilge
std::string m_sVehicleName

Detailed Description

Definition at line 8 of file Simulator.h.


Constructor & Destructor Documentation

CSimulator::CSimulator ( )

Definition at line 6 of file Simulator.cpp.

CSimulator::~CSimulator ( ) [virtual]

Definition at line 11 of file Simulator.cpp.

CSimulator::CSimulator ( )
virtual CSimulator::~CSimulator ( ) [virtual]

Member Function Documentation

bool CSimulator::Iterate ( ) [protected, virtual]

Called by the base class periodically. This is where you place code which does the work of the application

Reimplemented from CMOOSApp.

Definition at line 44 of file Simulator.cpp.

bool CSimulator::Iterate ( ) [protected, virtual]

called when the application should iterate. Overload this function in a derived class and within it write all the application specific code. It will be called at approximately nFreq = 1/AppTick Hz

Reimplemented from CMOOSApp.

bool CSimulator::OnConnectToServer ( ) [protected, virtual]

Called when the class has succesully connected to the server. Overload this function and place use it to register for notification when variables of interest change

Reimplemented from CMOOSApp.

bool CSimulator::OnConnectToServer ( ) [protected, virtual]

called by the base class when the application has made contact with the MOOSDB and a channel has been opened. Place code to specify what notifications you want to receive here.

Reimplemented from CMOOSApp.

Definition at line 37 of file Simulator.cpp.

bool CSimulator::OnNewMail ( MOOSMSG_LIST NewMail) [protected, virtual]

called when new mail has arrived. Overload this method in a derived class to process new mail. It will be called at approximately 1/CommsTick Hz. In this function you'll most likely interate over the collection of mail message received or call a m_Comms::PeekMail() to look for a specific named message.

Parameters:
NewMaila list of new mail messages

Reimplemented from CMOOSApp.

bool CSimulator::OnNewMail ( MOOSMSG_LIST NewMail) [protected, virtual]

Called by base class whenever new mail has arrived. Place your code for handling mail (notifications that something has changed in the MOOSDB in this function

Parameters: NewMail : std::list<CMOOSMsg> reference

Return values: return true if everything went OK return false if there was problem

Reimplemented from CMOOSApp.

Definition at line 27 of file Simulator.cpp.

bool CSimulator::OnStartUp ( ) [protected, virtual]

called just before the main app loop is entered. Specific initialisation code can be written in an overloaded version of this function

over load this if you want to do something fancy at statup...

Reimplemented from CMOOSApp.

bool CSimulator::OnStartUp ( ) [protected, virtual]

called by the base class before the first ::Iterate is called. Place startup code here - especially code which reads configuration data from the mission file

Reimplemented from CMOOSApp.

Definition at line 75 of file Simulator.cpp.


Member Data Documentation

double CSimulator::m_dfBatteryVoltage [protected]

Definition at line 27 of file Simulator.h.

double CSimulator::m_dfHeading [protected]

Definition at line 28 of file Simulator.h.

std::string CSimulator::m_sBilge [protected]

Definition at line 29 of file Simulator.h.

std::string CSimulator::m_sVehicleName [protected]

Definition at line 30 of file Simulator.h.


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