$search
00001 #include "riq_hand_ethercat_hardware/riq_hand_command.h" 00002 #include <string.h> 00003 00004 namespace riq_hand_ethercat_hardware 00005 { 00006 00007 const char* RIQActionRequest::modeString(unsigned mode) 00008 { 00009 switch(mode) 00010 { 00011 case CYLINDRICAL_MODE: 00012 return "Cylindrical"; 00013 case PINCH_MODE: 00014 return "Pinch"; 00015 case SPHERIOD_MODE: 00016 return "Spheriod"; 00017 case SCISSORS_MODE: 00018 return "Scissors"; 00019 default: 00020 return "Unknown"; 00021 }; 00022 } 00023 00024 const char* RIQActionRequest::gripString(unsigned grip) 00025 { 00026 switch(grip) 00027 { 00028 case GRIP_STOP: 00029 case GRIP_STOP_X: 00030 return "Stop"; 00031 case GRIP_OPEN: 00032 return "Open"; 00033 case GRIP_CLOSE: 00034 return "Close"; 00035 default: 00036 return "Unknown"; 00037 }; 00038 } 00039 00040 00041 00042 void RIQHandCommandEcat::zero() 00043 { 00044 memset(this, 0, sizeof(*this)); 00045 } 00046 00047 }; //namespace riq_hand_ethercat_hardware