Main Page | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | Directories | File List | Namespace Members | Data Fields | Globals

RobotFlow::Grasp Class Reference

Inheritance diagram for RobotFlow::Grasp:

Inheritance graph
[legend]
Collaboration diagram for RobotFlow::Grasp:

Collaboration graph
[legend]

Public Member Functions

 Grasp (string nodeName, ParameterSet params)
void calculate (int output_id, int count, Buffer &out)
void calculate_behavior (int output_id, int count, Buffer &out)
int get_behavior_id ()
virtual ObjectRef getOutput (int output_id, int count)
virtual void request (int outputID, const ParameterSet &req)
virtual void initialize ()
virtual void reset ()
virtual int addOutput (const std::string &outputName)
virtual int addInput (const std::string &inputName)
virtual void initializeBuffers ()
virtual void performRequests ()
virtual ObjectRef getOutputNamed (const std::string &outputName, int count)
virtual void connectToNode (std::string in, Node *inputNode, std::string out)
virtual bool hasOutput (int output_id) const
ObjectRef getInput (int inputID, int count)
virtual void stop ()
virtual void cleanupNotify ()
std::string getName ()
virtual void verifyConnect ()
void printOn (std::ostream &out=std::cout) const
void setUINode (UINode *_uinode)
void ref ()
void unref ()
int unique ()
virtual void destroy ()
virtual void serialize (std::ostream &out) const
virtual void unserialize (std::istream &in)
virtual void doesNotUnderstand (std::string method)
virtual bool isNil () const
virtual void prettyPrint (std::ostream &out=std::cout) const
virtual void readFrom (std::istream &in=std::cin)
virtual ObjectRef clone ()
virtual std::string className () const

Static Public Member Functions

static int register_behavior (const std::string &name)
static int find_behavior (const std::string &name)
static bool behavior_exists (const std::string &name)
static int get_behavior_size ()
static FD::Vector< std::string > & get_behaviors ()
static void remove_behavior (const std::string &name)
static int addFactory (const std::string &factoryName, _NodeFactory *const factory)
static int addXPM (const std::string &nodeName, char **XPMData)
static char ** getXPM (const std::string &nodeName)
static _NodeFactory * getFactoryNamed (const std::string &name)
static std::map< std::string,
_NodeFactory * > & 
factoryDictionary ()
static std::vector< std::string > & nodeInfo ()
static std::map< std::string,
char ** > & 
XPMDictionary ()
static int addNodeInfo (const std::string &info)
static ObjectRef newObject (const std::string &objType)
static int addObjectType (const std::string &objType, _ObjectFactory *factory)
static std::map< std::string,
_ObjectFactory * > & 
ObjectFactoryDictionary ()
static TypeMap< _ObjectFactory * > & TypeidDictionary ()

Protected Member Functions

virtual void connectToNode (unsigned int in, Node *inputNode, unsigned int out)
virtual std::vector< NodeInput > & getInputs ()
virtual int translateInput (std::string inputName)
virtual int translateOutput (std::string inputName)
virtual void rt_assert (bool cond, std::string message="", char *_file="unknown", int _line=0)
virtual void construct_assert (bool cond, std::string message="", char *_file="unknown", int _line=0)
virtual void throw_error (bool send_ptr, std::string message, char *_file, int _line)

Protected Attributes

int m_activationID
int m_exploitationID
int m_last_exploitation
int m_behaviorID
FD::ObjectRef m_exploitationValue
int processCount
std::vector< OutputCacheInfo > outputs
std::vector< InputCacheInfo > inputsCache
bool inOrder
std::string name
std::vector< NodeInput > inputs
std::vector< std::string > outputNames
ParameterSet parameters
UINode * uinode
AtomicCounter ref_count

Private Attributes

int m_GripperStateID
int m_xPosID
int m_yPosID
int m_headingID
int m_gripperCommandID
int m_velocityID
int m_rotationID
int m_GraspStateID
int m_translational_velocity
int m_rotational_velocity
int m_backup_distance
long m_msToMoveAway
bool m_bIsActivated
unsigned char m_ucState
timespec m_tCommandSent
timespec m_tStartOperation

Static Private Attributes

static const unsigned char PADDLES_NOT_FULLY_OPENED = 1
static const unsigned char LIFT_NOT_FULLY_UP_OR_DOWN = 2
static const unsigned char OUTER_BREAKBEAM_OBSTRUCTED = 4
static const unsigned char INNER_BREAKBEAM_OBSTRUCTED = 8
static const unsigned char LEFT_PADDLE_FREE = 16
static const unsigned char RIGHT_PADDLE_FREE = 32
static const unsigned char LIFT_MOVING = 64
static const unsigned char GRIPPER_MOVING = 128

Friends

friend std::ostream & operator<< (std::ostream &out, const Object &obj)

Constructor & Destructor Documentation

RobotFlow::Grasp::Grasp string  nodeName,
ParameterSet  params
[inline]
 


Member Function Documentation

static bool RobotFlow::Behavior::behavior_exists const std::string &  name  )  [static, inherited]
 

Verifies if a behavior is registered.

Parameters:
name The behavior name that we are looking for.
Return values:
bool Returns true if the behavior name is registered, else returns false.

void RobotFlow::Grasp::calculate int  output_id,
int  count,
Buffer out
[inline, virtual]
 

This function is required by the BufferedNode class. That's the core processing function called by the overflow engine. This function takes care to update the exploitation value and verifies if the Behavior is activated before calling calculate_behavior.

Parameters:
output_id The output identification we are interested in.
count The iteration number we are calculating.
out The output buffer where th put the result.

Reimplemented from RobotFlow::Behavior.

void RobotFlow::Grasp::calculate_behavior int  output_id,
int  count,
Buffer out
[inline, virtual]
 

calculate_behavior is a pure virtual function. It should be implemented in every derived class. Processing of the behaviors is done inside this function.

Parameters:
output_id The output identification we are interested in.
count The iteration number we are calculating.
out The output buffer where th put the result.

Implements RobotFlow::Behavior.

static int RobotFlow::Behavior::find_behavior const std::string &  name  )  [static, inherited]
 

Translation of the behavior name into the behavior identification number.

Parameters:
name The behavior name that we are looking for.
Return values:
int the behavior identification number.

int RobotFlow::Behavior::get_behavior_id  )  [inherited]
 

Get the behavior id

Return values:
int The behavior id

static int RobotFlow::Behavior::get_behavior_size  )  [inline, static, inherited]
 

Returns the number of registered behaviors.

Return values:
int The number of registered behaviors.

Vector< string > & RobotFlow::Behavior::get_behaviors  )  [static, inherited]
 

Returns the data structure containing the registered behavior names. This function should not be used by derived classes.

Return values:
std::vector<std::string>& The data structure containing the registered behavior names.

static int RobotFlow::Behavior::register_behavior const std::string &  name  )  [static, inherited]
 

This function is called by the REGISTER_BEHAVIOR macro. It should not be called from anything else.

Parameters:
name The name of the behavior we want to register.
Return values:
int The identification number of the new behavior.

static void RobotFlow::Behavior::remove_behavior const std::string &  name  )  [static, inherited]
 

Remove the behavior

Parameters:
name The behavior name that we want remove


Field Documentation

const unsigned char RobotFlow::Grasp::GRIPPER_MOVING = 128 [static, private]
 

const unsigned char RobotFlow::Grasp::INNER_BREAKBEAM_OBSTRUCTED = 8 [static, private]
 

const unsigned char RobotFlow::Grasp::LEFT_PADDLE_FREE = 16 [static, private]
 

const unsigned char RobotFlow::Grasp::LIFT_MOVING = 64 [static, private]
 

const unsigned char RobotFlow::Grasp::LIFT_NOT_FULLY_UP_OR_DOWN = 2 [static, private]
 

int RobotFlow::Behavior::m_activationID [protected, inherited]
 

activation vector or bool input

int RobotFlow::Grasp::m_backup_distance [private]
 

int RobotFlow::Behavior::m_behaviorID [protected, inherited]
 

behavior identification number

bool RobotFlow::Grasp::m_bIsActivated [private]
 

int RobotFlow::Behavior::m_exploitationID [protected, inherited]
 

exploitation output

FD::ObjectRef RobotFlow::Behavior::m_exploitationValue [protected, inherited]
 

last exploitation value

int RobotFlow::Grasp::m_GraspStateID [private]
 

int RobotFlow::Grasp::m_gripperCommandID [private]
 

int RobotFlow::Grasp::m_GripperStateID [private]
 

int RobotFlow::Grasp::m_headingID [private]
 

int RobotFlow::Behavior::m_last_exploitation [protected, inherited]
 

last exploitation output id

long RobotFlow::Grasp::m_msToMoveAway [private]
 

int RobotFlow::Grasp::m_rotational_velocity [private]
 

int RobotFlow::Grasp::m_rotationID [private]
 

timespec RobotFlow::Grasp::m_tCommandSent [private]
 

int RobotFlow::Grasp::m_translational_velocity [private]
 

timespec RobotFlow::Grasp::m_tStartOperation [private]
 

unsigned char RobotFlow::Grasp::m_ucState [private]
 

int RobotFlow::Grasp::m_velocityID [private]
 

int RobotFlow::Grasp::m_xPosID [private]
 

int RobotFlow::Grasp::m_yPosID [private]
 

const unsigned char RobotFlow::Grasp::OUTER_BREAKBEAM_OBSTRUCTED = 4 [static, private]
 

const unsigned char RobotFlow::Grasp::PADDLES_NOT_FULLY_OPENED = 1 [static, private]
 

const unsigned char RobotFlow::Grasp::RIGHT_PADDLE_FREE = 32 [static, private]
 


The documentation for this class was generated from the following file:
Generated on Wed Oct 5 14:36:26 2005 for RobotFlow by  doxygen 1.4.4