Tekkotsu Homepage
Demos
Overview
Downloads
Dev. Resources
Reference
Credits

PingThread Class Reference

Attempts to ping the specified servo by reading its model number, and if successful, current sensor values. More...

#include <DynamixelProtocol.h>

Inheritance diagram for PingThread:

Detailed Description

Attempts to ping the specified servo by reading its model number, and if successful, current sensor values.

The run() call returns with the model string if successful, or NULL if the ping timed out

Definition at line 595 of file DynamixelProtocol.h.

List of all members.

Public Member Functions

 PingThread (std::istream &is, std::ostream &os, unsigned char servoid, unsigned int outputOffset, ServoSensorsResponse *servoinfo=NULL, AXS1SensorsResponse *servoinfoS1=NULL)
 constructor, pass input and output streams, the servo id, and optional sensor response to be filled in
 ~PingThread ()
 destructor, stop and join thread

Static Public Member Functions

static long getTimeout ()
 get timeout
static void setTimeout (long t)
 set timeout

Public Attributes

ServoInfoResponse response

Protected Member Functions

virtual void * run ()
virtual void cancelled ()

Protected Attributes

std::istream & icomm
 input stream
std::ostream & ocomm
 output stream
unsigned char sid
 servo id value
unsigned int output
 output offset
ServoSensorsResponseinfo
 response to be filled in if successful and the servo is servo following common Dynamixel servo register layout.
AXS1SensorsResponseinfoS1
 response to be filled in if successful and the servo is an AX-S1 model.
std::string unknownModelName
 temporary storage to append the model number to

Static Protected Attributes

static long timeout = 150
 time to wait for a response before giving up (in milliseconds)

Private Member Functions

 PingThread (const PingThread &)
 dummy
PingThreadoperator= (const PingThread &)
 dummy

Constructor & Destructor Documentation

PingThread ( std::istream &  is,
std::ostream &  os,
unsigned char  servoid,
unsigned int  outputOffset,
ServoSensorsResponse servoinfo = NULL,
AXS1SensorsResponse servoinfoS1 = NULL 
)

constructor, pass input and output streams, the servo id, and optional sensor response to be filled in

Definition at line 598 of file DynamixelProtocol.h.

~PingThread (  ) 

destructor, stop and join thread

Definition at line 601 of file DynamixelProtocol.h.

PingThread ( const PingThread  )  [private]

dummy


Member Function Documentation

void cancelled (  )  [protected, virtual]

Reimplemented from Thread.

Definition at line 112 of file DynamixelProtocol.cc.

static long getTimeout (  )  [static]

get timeout

Definition at line 603 of file DynamixelProtocol.h.

PingThread& operator= ( const PingThread  )  [private]

dummy

void * run (  )  [protected, virtual]

Reimplemented from Thread.

Definition at line 63 of file DynamixelProtocol.cc.

static void setTimeout ( long  t  )  [static]

set timeout

Definition at line 604 of file DynamixelProtocol.h.


Member Data Documentation

std::istream& icomm [protected]

input stream

Definition at line 612 of file DynamixelProtocol.h.

Referenced by PingThread::cancelled(), and PingThread::run().

ServoSensorsResponse* info [protected]

response to be filled in if successful and the servo is servo following common Dynamixel servo register layout.

Definition at line 616 of file DynamixelProtocol.h.

Referenced by PingThread::run().

response to be filled in if successful and the servo is an AX-S1 model.

Definition at line 617 of file DynamixelProtocol.h.

Referenced by PingThread::run().

std::ostream& ocomm [protected]

output stream

Definition at line 613 of file DynamixelProtocol.h.

Referenced by PingThread::run().

unsigned int output [protected]

output offset

Definition at line 615 of file DynamixelProtocol.h.

Referenced by PingThread::run().

Definition at line 606 of file DynamixelProtocol.h.

Referenced by PingThread::run().

unsigned char sid [protected]

servo id value

Definition at line 614 of file DynamixelProtocol.h.

Referenced by PingThread::run().

long timeout = 150 [static, protected]

time to wait for a response before giving up (in milliseconds)

Definition at line 611 of file DynamixelProtocol.h.

Referenced by PingThread::getTimeout(), PingThread::run(), and PingThread::setTimeout().

std::string unknownModelName [protected]

temporary storage to append the model number to

Definition at line 618 of file DynamixelProtocol.h.

Referenced by PingThread::run().


The documentation for this class was generated from the following files:

Tekkotsu Hardware Abstraction Layer 5.1CVS
Generated Mon May 9 05:01:42 2016 by Doxygen 1.6.3