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
kcomer
Name
tekkotsu-4_0
Revision
1.51
State
Exp
Date
2007/11/15 21:33:04

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 "Motion/PostureEngine.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

WorldStateLookup state
 the global state object, points into a shared memory region, created by MainObject


Define Documentation

#define GETB ( cpc   )     ((bool)sensor.GetData(cpc)->frame[lastFrame].value)

returns value from OPEN-R, as bool

Definition at line 23 of file WorldState.cc.

#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

Definition at line 22 of file WorldState.cc.

#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)

Definition at line 26 of file WorldState.cc.

#define GETSENSOR ( cpc   )     ((float)sensor.GetData(cpc)->frame[lastFrame].value)

return value from OPEN-R, as int

Definition at line 24 of file WorldState.cc.

#define GETSIG ( cpc   )     ((word)sensor.GetData(cpc)->frame[lastFrame].signal)

returns signal from OPEN-R as word

Definition at line 25 of file WorldState.cc.


Variable Documentation


Tekkotsu v4.0
Generated Thu Nov 22 00:58:02 2007 by Doxygen 1.5.4