Homepage Demos Overview Downloads Tutorials Reference
Credits
Main Page | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Namespace Members | Compound Members | File Members | Related Pages | Search

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_4_1
Revision
1.15
State
Exp
Date
2003/06/12 04:16:44

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)
 
Returns:
value from OPEN-R, converted from micro in int to base in float


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


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


#define GETDUTY(cpc)   ((float)((OJointValue*)&sensor.GetData(cpc)->frame[0])->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, is a shared memory region, created by MainObject


Define Documentation

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

Returns:
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)
 

Returns:
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)
 

Returns:
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)
 

Returns:
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.4
Generated Sat Jul 19 00:08:45 2003 by Doxygen 1.3.2