Tekkotsu Homepage
Demos
Overview
Downloads
Dev. Resources
Reference
Credits

WorldState.cc File Reference


Detailed Description

Implements WorldState, maintains information about the robot's environment, namely sensors and power status.

Author:
ejt (Creator)
Author
ejt
Name
Revision
1.45
State
Exp
Date
2007/04/09 22:23:41

Definition in file WorldState.cc.

#include "WorldState.h"
#include "Shared/get_time.h"
#include "Events/EventRouter.h"
#include "ERS210Info.h"
#include "ERS220Info.h"
#include "ERS7Info.h"
#include "Shared/Config.h"
#include <OPENR/core_macro.h>
#include <OPENR/ObjcommTypes.h>
#include <OPENR/OPENR.h>
#include <OPENR/OPENRAPI.h>
#include <OPENR/OPENRMessages.h>
#include <OPENR/OPower.h>

Include dependency graph for WorldState.cc:

Go to the source code of this file.

Defines

#define GETD(cpc)   (((float)sensor.GetData(cpc)->frame[lastFrame].value) / 1.0E6f)
 returns value from OPEN-R, converted from micro in int to base in float
#define GETB(cpc)   ((bool)sensor.GetData(cpc)->frame[lastFrame].value)
 returns value from OPEN-R, as bool
#define GETSENSOR(cpc)   ((float)sensor.GetData(cpc)->frame[lastFrame].value)
 return value from OPEN-R, as int
#define GETSIG(cpc)   ((word)sensor.GetData(cpc)->frame[lastFrame].signal)
 returns signal from OPEN-R as word
#define GETDUTY(cpc)   (((OJointValue*)(void*)&sensor.GetData(cpc)->frame[lastFrame])->pwmDuty/512.0f)
 returns duty cycle from OPEN-R as float; -1 (full reverse) to 0 (idle) to 1 (full forward)

Variables

WorldStatestate = NULL
 the global state object, points into a shared memory region, created by MainObject


Tekkotsu v3.0
Generated Fri May 11 20:07:34 2007 by Doxygen 1.4.7