Main Page | Modules | Namespace List | Class Hierarchy | Class List | File List | Class Members | File Members

truckd/callbacks.cpp File Reference

#include "callbacks.h"

Go to the source code of this file.

Defines

#define ANGLE_DELTA   5
#define POWER_DELTA   .05f

Functions

void updatePower (float pwrDelta)
 Short Description.
void updateAngle (int angDelta)
 Short Description.
void sendAck (msg &m)
 Short Description.
string EncData ()
int forward (msg &m)
 Short Description.
int back (msg &m)
 Short Description.
int left (msg &m)
 Short Description.
int right (msg &m)
 Short Description.
int stop (msg &m)
 Short Description.
int position (msg &m)
 Short Description.
int encoder (msg &m)
 Short Description.
int servo (msg &m)
 Short Description.
void msg_init (msg &msgSystem)
 Short Description.

Variables

hwInterface truck_hw (1)
static float power = 0
static int angle = 0
SOCKET sock


Define Documentation

#define ANGLE_DELTA   5
 

Definition at line 5 of file callbacks.cpp.

Referenced by Controller::left(), and Controller::right().

#define POWER_DELTA   .05f
 

Definition at line 6 of file callbacks.cpp.

Referenced by back(), Controller::back(), forward(), and Controller::forward().


Function Documentation

int back msg m  ) 
 

Short Description.

Long Description if necessary.

Parameters:
<parameter_name> <parameter_descreption>
Returns:
<information on="" what="" is="" being="" returned>="">
Author:
<author name>="">

Definition at line 61 of file callbacks.cpp.

References POWER_DELTA, sendAck(), and updatePower().

Referenced by GuiClientFrame::GuiClientFrame(), and msg_init().

string EncData  ) 
 

int encoder msg m  ) 
 

Short Description.

Long Description if necessary.

Parameters:
<parameter_name> <parameter_descreption>
Returns:
<information on="" what="" is="" being="" returned>="">
Author:
<author name>="">

int forward msg m  ) 
 

Short Description.

Long Description if necessary.

Parameters:
<parameter_name> <parameter_descreption>
Returns:
<information on="" what="" is="" being="" returned>="">
Author:
<author name>="">

Definition at line 44 of file callbacks.cpp.

References POWER_DELTA, sendAck(), and updatePower().

Referenced by GuiClientFrame::GuiClientFrame(), msg_init(), and EncEstimator::update().

int left msg m  ) 
 

Short Description.

Long Description if necessary.

Parameters:
<parameter_name> <parameter_descreption>
Returns:
<information on="" what="" is="" being="" returned>="">
Author:
<author name>="">

void msg_init msg msgSystem  ) 
 

Short Description.

Long Description if necessary.

Parameters:
<parameter_name> <parameter_descreption>
Returns:
<information on="" what="" is="" being="" returned>="">
Author:
<author name>="">

Definition at line 212 of file callbacks.cpp.

References back(), encoder, forward(), left, right, servo(), and stop().

int position msg m  ) 
 

Short Description.

Long Description if necessary.

Parameters:
<parameter_name> <parameter_descreption>
Returns:
<information on="" what="" is="" being="" returned>="">
Author:
<author name>="">

Definition at line 132 of file callbacks.cpp.

Referenced by main().

int right msg m  ) 
 

Short Description.

Long Description if necessary.

Parameters:
<parameter_name> <parameter_descreption>
Returns:
<information on="" what="" is="" being="" returned>="">
Author:
<author name>="">

void sendAck msg m  ) 
 

Short Description.

Long Description if necessary.

Parameters:
<parameter_name> <parameter_descreption>
Returns:
<information on="" what="" is="" being="" returned>="">
Author:
<author name>="">

Definition at line 232 of file callbacks.cpp.

References endmsg, startmsg(), and msg::type().

Referenced by back(), forward(), and stop().

int servo msg m  ) 
 

Short Description.

Long Description if necessary.

Parameters:
<parameter_name> <parameter_descreption>
Returns:
<information on="" what="" is="" being="" returned>="">
Author:
<author name>="">

Definition at line 167 of file callbacks.cpp.

References endmsg, startmsg(), truck_hw, and msg::type().

Referenced by msg_init().

int stop msg m  ) 
 

Short Description.

Long Description if necessary.

Parameters:
<parameter_name> <parameter_descreption>
Returns:
<information on="" what="" is="" being="" returned>="">
Author:
<author name>="">

Definition at line 115 of file callbacks.cpp.

References power, sendAck(), hwInterface::setSCPower(), truck_hw, and hwInterface::writeControl().

Referenced by GuiClientFrame::GuiClientFrame(), and msg_init().

void updateAngle int  angDelta  ) 
 

Short Description.

Long Description if necessary.

Parameters:
<parameter_name> <parameter_descreption>
Returns:
<information on="" what="" is="" being="" returned>="">
Author:
<author name>="">

Definition at line 197 of file callbacks.cpp.

References hwInterface::setAngle(), truck_hw, and hwInterface::writeControl().

void updatePower float  pwrDelta  ) 
 

Short Description.

Long Description if necessary.

Parameters:
<parameter_name> <parameter_descreption>
Returns:
<information on="" what="" is="" being="" returned>="">
Author:
<author name>="">

Definition at line 181 of file callbacks.cpp.

References power, hwInterface::setSCPower(), truck_hw, and hwInterface::writeControl().

Referenced by back(), and forward().


Variable Documentation

int angle = 0 [static]
 

Definition at line 17 of file callbacks.cpp.

float power = 0 [static]
 

Definition at line 16 of file callbacks.cpp.

Referenced by main(), stop(), and updatePower().

SOCKET sock
 

Definition at line 18 of file callbacks.cpp.

Referenced by GuiClientFrame::GuiClientFrame(), main(), echoFrame::OnClient(), Daemon::processControlServer(), SocketTCP(), SocketUDP(), and testNamedSockets().

hwInterface truck_hw(1)
 

Referenced by servo(), stop(), updateAngle(), and updatePower().


Generated on Fri Sep 1 14:25:58 2006 for Raptor by  doxygen 1.4.4