Tekkotsu Homepage
Demos
Overview
Downloads
Dev. Resources
Reference
Credits

SyncWriteHeader< T > Struct Template Reference

Allows you to do a "synchronized write", where all recipients commit the value(s) at the same time, and do not send any response packets. More...

#include <DynamixelProtocol.h>

Inheritance diagram for SyncWriteHeader< T >:

Detailed Description

template<class T>
struct DynamixelProtocol::SyncWriteHeader< T >

Allows you to do a "synchronized write", where all recipients commit the value(s) at the same time, and do not send any response packets.

To do a synchronized write, first send a SyncWriteHeader indicating the type of write command being sent (T for example below) and the number of entries. Then send the corresponing entries themselves, followed by a checksum:

  • unsigned char checksum = 0;
  • write( os, SyncWriteHeader<T>(n), checksum );
  • for(int i=0; i<n; ++i) { write( os, t[i], checksum ); }
  • os.put(~checksum); // note bitwise-not!

Definition at line 105 of file DynamixelProtocol.h.

List of all members.

Public Member Functions

 SyncWriteHeader (unsigned char len)

Public Attributes

unsigned char addr
unsigned char writelen

Constructor & Destructor Documentation

SyncWriteHeader ( unsigned char  len  ) 

Definition at line 106 of file DynamixelProtocol.h.


Member Data Documentation

unsigned char addr

Definition at line 108 of file DynamixelProtocol.h.

unsigned char writelen

Definition at line 109 of file DynamixelProtocol.h.


The documentation for this struct was generated from the following file:

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