FRIComm Class Reference

#include <FRIComm.hh>

List of all members.

Public Member Functions

void close ()
 closes the UDP connection
RobotCommand cmd ()
void configureNetwork (int local_port, std::string remote_address, int remote_port)
 set network parameters
RobotData data ()
 FRIComm ()
FRIChecklimitChecker ()
bool open ()
 opens the UDP connection
bool postCommand (int iData[16], float rData[16])
bool receive ()
 receives a UDP measurement packet.
void respond ()
 sends the response packet.
bool runstop ()
void setCmd (RobotCommand cmd)
void setRunstop (bool stopped)
RobotStatus status ()
 ~FRIComm ()

Static Public Member Functions

static const char * printStatus (char *buffer, RobotData data, RobotCommand cmd, RobotStatus status)

Public Attributes

tFriCmdData fri_cmd_
tFriMsrData fri_msr_

Private Member Functions

void processCommand ()
 processes running command requests from postCommand() ( called from respond() )
void stateHandler ()
 watches the current robot state and posts commands if necessary
void tick ()
void tock ()

Private Attributes

CartesianImpedance cartesianImpedanceCmd_
bool closing_
int duration_max
int duration_max_published
int duration_mean_published
int duration_num
long long duration_sum
float krl_time_
struct timeval last_tick
int local_port_
struct sockaddr_in remote_addr_
std::string remote_address_
int remote_port_
bool runstop_
unsigned int seq_
int socket_
bool useCartesianImpedance_

Static Private Attributes

static const float KRL_GUARD_TIME = 0.8
static const float KRL_TIMEOUT = 4.5

Detailed Description

Definition at line 60 of file FRIComm.hh.

Constructor & Destructor Documentation

FRIComm::FRIComm (  ) 

Definition at line 93 of file FRIComm.cc.

FRIComm::~FRIComm (  ) 

Definition at line 127 of file FRIComm.cc.

Member Function Documentation

void FRIComm::close (  ) 

closes the UDP connection

When the connection is in command mode, it switches to monitor mode and keeps the read() / respond() loop running until that switch has happened.

It is your resonsibility to decelerate the arm before closing!

Definition at line 177 of file FRIComm.cc.

RobotCommand FRIComm::cmd (  ) 

Definition at line 485 of file FRIComm.cc.

void FRIComm::configureNetwork ( int  local_port,
std::string  remote_address,
int  remote_port 

set network parameters

Definition at line 120 of file FRIComm.cc.

RobotData FRIComm::data (  ) 

Definition at line 463 of file FRIComm.cc.

FRICheck* FRIComm::limitChecker (  )  [inline]

Definition at line 72 of file FRIComm.hh.

bool FRIComm::open (  ) 

opens the UDP connection

Definition at line 135 of file FRIComm.cc.

bool FRIComm::postCommand ( int  iData[16],
float  rData[16] 

Definition at line 363 of file FRIComm.cc.

const char * FRIComm::printStatus ( char *  buffer,
RobotData  data,
RobotCommand  cmd,
RobotStatus  status 
) [static]

Definition at line 425 of file FRIComm.cc.

void FRIComm::processCommand (  )  [private]

processes running command requests from postCommand() ( called from respond() )

Definition at line 379 of file FRIComm.cc.

bool FRIComm::receive (  ) 

receives a UDP measurement packet.

Waits up to 0.1s for new data.

true if a valid packet was received

Definition at line 237 of file FRIComm.cc.

void FRIComm::respond (  ) 

sends the response packet.

The position increment is limited before sending so as to not exceed velocity, acceleration and joint angle limits. This commanded position is rememered and used for subsequent calls to setCmd().

Definition at line 271 of file FRIComm.cc.

bool FRIComm::runstop (  ) 

Definition at line 451 of file FRIComm.cc.

void FRIComm::setCmd ( RobotCommand  cmd  ) 

Definition at line 504 of file FRIComm.cc.

void FRIComm::setRunstop ( bool  stopped  ) 

Definition at line 457 of file FRIComm.cc.

void FRIComm::stateHandler (  )  [private]

watches the current robot state and posts commands if necessary

Called from respond.

Definition at line 407 of file FRIComm.cc.

RobotStatus FRIComm::status (  ) 

Definition at line 519 of file FRIComm.cc.

void FRIComm::tick (  )  [private]

Definition at line 565 of file FRIComm.cc.

void FRIComm::tock (  )  [private]

Definition at line 570 of file FRIComm.cc.

Member Data Documentation

Definition at line 117 of file FRIComm.hh.

Definition at line 115 of file FRIComm.hh.

bool FRIComm::closing_ [private]

Definition at line 106 of file FRIComm.hh.

int FRIComm::duration_max [private]

Definition at line 123 of file FRIComm.hh.

Definition at line 125 of file FRIComm.hh.

Definition at line 124 of file FRIComm.hh.

int FRIComm::duration_num [private]

Definition at line 122 of file FRIComm.hh.

long long FRIComm::duration_sum [private]

Definition at line 121 of file FRIComm.hh.

tFriCmdData FRIComm::fri_cmd_

Definition at line 94 of file FRIComm.hh.

tFriMsrData FRIComm::fri_msr_

Definition at line 93 of file FRIComm.hh.

const float FRIComm::KRL_GUARD_TIME = 0.8 [static, private]

Definition at line 97 of file FRIComm.hh.

float FRIComm::krl_time_ [private]

Definition at line 98 of file FRIComm.hh.

const float FRIComm::KRL_TIMEOUT = 4.5 [static, private]

Definition at line 96 of file FRIComm.hh.

struct timeval FRIComm::last_tick [private]

Definition at line 120 of file FRIComm.hh.

int FRIComm::local_port_ [private]

Definition at line 109 of file FRIComm.hh.

struct sockaddr_in FRIComm::remote_addr_ [private]

Definition at line 112 of file FRIComm.hh.

std::string FRIComm::remote_address_ [private]

Definition at line 110 of file FRIComm.hh.

int FRIComm::remote_port_ [private]

Definition at line 109 of file FRIComm.hh.

bool FRIComm::runstop_ [private]

Definition at line 107 of file FRIComm.hh.

Definition at line 103 of file FRIComm.hh.

Definition at line 102 of file FRIComm.hh.

unsigned int FRIComm::seq_ [private]

Definition at line 105 of file FRIComm.hh.

int FRIComm::socket_ [private]

Definition at line 111 of file FRIComm.hh.

Definition at line 114 of file FRIComm.hh.

The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines

Author(s): Ingo Kresse, Alexis Maldonado
autogenerated on Tue Dec 4 09:02:46 2012