Homepage Demos Overview Downloads Tutorials 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
tekkotsu-1_5
Revision
1.16
State
Rel
Date
2003/09/25 15:31:53

Definition in file WorldState.cc.

#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 "WorldState.h"
#include "Shared/get_time.h"
#include "Events/EventRouter.h"
#include "ERS210Info.h"
#include "ERS220Info.h"

Include dependency graph for WorldState.cc:

Include dependency graph

Go to the source code of this file.

Defines

#define GETD(cpc)   (((float)sensor.GetData(cpc)->frame[0].value) / 1.0E6f)
 value from OPEN-R, converted from micro in int to base in float

#define GETB(cpc)   ((bool)sensor.GetData(cpc)->frame[0].value)
 value from OPEN-R, as bool

#define GETSIG(cpc)   ((word)sensor.GetData(cpc)->frame[0].signal)
 signal from OPEN-R as word

#define GETDUTY(cpc)   ((float)((OJointValue*)&sensor.GetData(cpc)->frame[0])->pwmDuty/512.0f)
 duty cycle from OPEN-R as float; -1 (full reverse) to 0 (idle) to 1 (full forward)


Variables

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


Define Documentation

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

value from OPEN-R, as bool

Definition at line 17 of file WorldState.cc.

#define GETD cpc   )     (((float)sensor.GetData(cpc)->frame[0].value) / 1.0E6f)
 

value from OPEN-R, converted from micro in int to base in float

Definition at line 16 of file WorldState.cc.

#define GETDUTY cpc   )     ((float)((OJointValue*)&sensor.GetData(cpc)->frame[0])->pwmDuty/512.0f)
 

duty cycle from OPEN-R as float; -1 (full reverse) to 0 (idle) to 1 (full forward)

Definition at line 19 of file WorldState.cc.

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

signal from OPEN-R as word

Definition at line 18 of file WorldState.cc.


Variable Documentation

WorldState* state = NULL
 

the global state object, is a shared memory region, created by MainObject

Definition at line 24 of file WorldState.cc.


Tekkotsu v1.5
Generated Fri Oct 10 15:54:46 2003 by Doxygen 1.3.4