Main Page   Hardware Class Hierarchy   Hardware API     Mapping Class Hierarchy  Mapping API 

MOS Class Reference

Mobilerobot series Operating System. More...

#include <mos.h>

Inheritance diagram for MOS:

Persistent_Interface

Public Member Functions

 MOS (void)
int query (int *const variable, char *message, WSIM_ID ID)
 Generic query (both prompts for value and stores away) for associated storage ID (note must be valid STORAGE ID).

void query_waypoints ()
 gets waypoints to travel.

void inform (const char *const imessage)

Static Public Member Functions

void run (void)
 start the MOS event loop.

void beep (MIDI_PITCH mp=F5)
 single beep on speaker.

void beep (int, MIDI_PITCH mp=F5)
 beep a number of times.

bool add (foo, int slot)
 Adds a callback function. Returns true for sucess.

bool drop (foo)
 Removes callback from table.

void communicator_check (void)
 Checks for incoming message and handles if there is.


Data Fields

oDialogue MOS_gui

Protected Attributes

void * _speaker
OBJECT _SpeakerType

Static Protected Attributes

foo MOS_FooArray []

Detailed Description

Mobilerobot series Operating System.

A mechanism for providing a command based operating system like DOS.

Operation
Basically, it executes in an endless loop and will wait for a user command. After execution of command, it returns to loop to await further instructions. Motivation for this was so after execution of the mapping episode, I can take the robot back to base and execute another function that will print out the map. Technically, will also allow the downloading of the scenario to internal occupancy grid before starting the mapping episode.
Commands are user generated, and inserted into the function table.
Sample Code
#include <oconsole.h>
#include <m4.h>
#include <persistent.h>
#include <mos.h>
#include "user_functions.h" 
M4 m4(4,5,0,PORT_E,0,2,3,0,PORT_F,1,101,38000,1,1,0); 
Persistent_Interface pi;
oGreenLED green;
oRedLED red;
oConsole console;
pose_list _waypoints;
short  _wplist[9];
int MAIN()
{
  Persistent_Interface::load_configuration(_waypoints,_wplist);
  m4.setup();
  // register routines with OS manager.
  MOS::add(mos_configuration,1);
  MOS::add(mos_ASaJ_Contest,2);
  MOS::add(mos_demo,3);
  MOS::add(mos_linefollower,4);
  MOS::add(mos_exposure,5);
  // main OS entrypoint.
  MOS::run();
}


Constructor & Destructor Documentation

MOS void   ) 
 


Member Function Documentation

bool add foo  ,
int  slot
[static]
 

Adds a callback function. Returns true for sucess.

void beep int  ,
MIDI_PITCH  mp = F5
[static]
 

beep a number of times.

void beep MIDI_PITCH  mp = F5  )  [static]
 

single beep on speaker.

void communicator_check void   )  [static]
 

Checks for incoming message and handles if there is.

bool drop foo   )  [static]
 

Removes callback from table.

void inform const char *const  imessage  )  [inherited]
 

int query int *const  variable,
char *  message,
WSIM_ID  ID
[inherited]
 

Generic query (both prompts for value and stores away) for associated storage ID (note must be valid STORAGE ID).

void query_waypoints  )  [inherited]
 

gets waypoints to travel.

void run void   )  [static]
 

start the MOS event loop.


Field Documentation

void* _speaker [protected, inherited]
 

OBJECT _SpeakerType [protected, inherited]
 

foo MOS_FooArray[] [static, protected]
 

oDialogue MOS_gui [inherited]
 


Generated on Mon Oct 8 19:32:26 2007 for OOMRM Mapping API by doxygen1.3