MOOS 0.2375
Public Member Functions | Protected Member Functions
CSimpleApp Class Reference

#include <SimpleApp.h>

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

List of all members.

Public Member Functions

 CSimpleApp ()
virtual ~CSimpleApp ()
 CSimpleApp ()
virtual ~CSimpleApp ()

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 ()
void DoRegistrations ()
bool OnVehicleStatus (CMOOSMsg &Msg)
bool OnHeading (CMOOSMsg &Msg)

Detailed Description

Definition at line 8 of file SimpleApp.h.


Constructor & Destructor Documentation

CSimpleApp::CSimpleApp ( )

Definition at line 5 of file SimpleApp.cpp.

CSimpleApp::~CSimpleApp ( ) [virtual]

Definition at line 9 of file SimpleApp.cpp.

CSimpleApp::CSimpleApp ( )
virtual CSimpleApp::~CSimpleApp ( ) [virtual]

Member Function Documentation

void CSimpleApp::DoRegistrations ( ) [protected]

Definition at line 153 of file SimpleApp.cpp.

bool CSimpleApp::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 42 of file SimpleApp.cpp.

bool CSimpleApp::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 CSimpleApp::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 35 of file SimpleApp.cpp.

bool CSimpleApp::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 CSimpleApp::OnHeading ( CMOOSMsg Msg) [protected]

Definition at line 122 of file SimpleApp.cpp.

bool CSimpleApp::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

an alternative OnNewMail using PeekMail and checking for stale messages

Reimplemented from CMOOSApp.

Definition at line 25 of file SimpleApp.cpp.

bool CSimpleApp::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 CSimpleApp::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 50 of file SimpleApp.cpp.

bool CSimpleApp::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 CSimpleApp::OnVehicleStatus ( CMOOSMsg Msg) [protected]

Definition at line 91 of file SimpleApp.cpp.


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