00001 /** 00002 * @file MotorCommands.h 00003 * Declaration of class MotorCommands 00004 * 00005 * @author <A href="mailto:roefer@tzi.de">Thomas Röfer</A> 00006 */ 00007 00008 #ifndef __MotorCommands_h_ 00009 #define __MotorCommands_h_ 00010 00011 #include "JointDataBuffer.h" 00012 #include "LEDValue.h" 00013 #include "PIDData.h" 00014 00015 /** 00016 * A class representing a motor commands vector. 00017 */ 00018 class MotorCommands 00019 { 00020 public: 00021 /** 00022 * a buffer with joint data sets sent in one cycle 00023 */ 00024 JointDataBuffer jointDataBuffer; 00025 00026 /** 00027 * the current LED values 00028 */ 00029 LEDValue ledValue; 00030 00031 /** 00032 * the current PID values 00033 */ 00034 PIDData pidData; 00035 00036 /** 00037 * constructs a MotorCommands. 00038 */ 00039 MotorCommands(); 00040 00041 /** 00042 * deconstructs a MotorCommands. 00043 */ 00044 ~MotorCommands(); 00045 00046 /** 00047 * Fills the joint data buffer. 00048 * @param buffer The values that will be copied. 00049 */ 00050 void setVector(const JointDataBuffer &buffer) {jointDataBuffer = buffer;} 00051 00052 /** 00053 * Fills the led buffer. 00054 * @param led The values that will be copied. 00055 */ 00056 void setLED(const LEDValue &led) {ledValue = led;} 00057 }; 00058 00059 /** 00060 * System-independent operator that reads motor commands from a stream. 00061 * @param stream The stream from which is read. 00062 * @param motorCommands The system independent motor commands object. 00063 * @return The stream. 00064 */ 00065 In& operator>>(In& stream,MotorCommands& motorCommands); 00066 00067 #endif //__MotorCommands_h_
1.3.6