00001 // Copyright (C) 2004 Pablo Mejia 00002 00003 00004 #ifndef SICK_MSG_0x77_H 00005 #define SICK_MSG_0x77_H 00006 00007 00008 #include "sick_msg.H" 00009 00010 00011 namespace sick 00012 { 00013 // Configure 00014 class msg_0x77_t : public msg_t 00015 { 00016 protected: 00017 static unsigned const BLANKING_OFFSET = 5; 00018 static unsigned const SENSITIVITY_OFFSET = 7; 00019 static unsigned const AVAILABILITY_OFFSET = 9; 00020 static unsigned const MEASURING_MODE_OFFSET = 10; 00021 static unsigned const UNITS_OFFSET = 11; 00022 static unsigned const TEMPORARY_FIELD_OFFSET = 12; 00023 static unsigned const FIELD_A_B_SUBTRACTIVE_OFFSET = 13; 00024 static unsigned const MULTIPLE_EVAL_OFFSET = 14; 00025 static unsigned const RESTART_OFFSET = 15; 00026 static unsigned const RESTART_TIME_OFFSET = 16; 00027 static unsigned const BLANKING_MULTIPLE_EVAL_OFFSET = 17; 00028 static unsigned const CONTOUR_A_REFERENCE_OFFSET = 18; 00029 static unsigned const CONTOUR_A_POS_TOLERANCE_OFFSET = 19; 00030 static unsigned const CONTOUR_A_NEG_TOLERANCE_OFFSET = 20; 00031 static unsigned const CONTOUR_A_BEG_ANGLE_OFFSET = 21; 00032 static unsigned const CONTOUR_A_END_ANGLE_OFFSET = 22; 00033 static unsigned const CONTOUR_B_REFERENCE_OFFSET = 23; 00034 static unsigned const CONTOUR_B_POS_TOLERANCE_OFFSET = 24; 00035 static unsigned const CONTOUR_B_NEG_TOLERANCE_OFFSET = 25; 00036 static unsigned const CONTOUR_B_BEG_ANGLE_OFFSET = 26; 00037 static unsigned const CONTOUR_B_END_ANGLE_OFFSET = 27; 00038 static unsigned const CONTOUR_C_REFERENCE_OFFSET = 28; 00039 static unsigned const CONTOUR_C_POS_TOLERANCE_OFFSET = 29; 00040 static unsigned const CONTOUR_C_NEG_TOLERANCE_OFFSET = 30; 00041 static unsigned const CONTOUR_C_BEG_ANGLE_OFFSET = 31; 00042 static unsigned const CONTOUR_C_END_ANGLE_OFFSET = 32; 00043 static unsigned const PIXEL_EVAL_OFFSET = 33; 00044 static unsigned const SINGLE_EVAL_MODE_OFFSET = 34; 00045 static unsigned const FIELD_B_C_RESTART_TIME_OFFSET = 35; 00046 static unsigned const DAZZLING_MULTIPLE_EVAL_OFFSET = 37; 00047 00048 public: 00049 msg_0x77_t (); 00050 msg_0x77_t (msg_t const *msg) : msg_t (msg) {} 00051 00052 double blanking (void) const 00053 { 00054 return (0.01 * letoh<u16_t>(m_data + BLANKING_OFFSET)); 00055 } 00056 unsigned sensitivity (void) const 00057 { 00058 return (letoh<u16_t>(m_data + SENSITIVITY_OFFSET)); 00059 } 00060 unsigned availability (void) const 00061 { 00062 return (m_data[AVAILABILITY_OFFSET]); 00063 } 00064 unsigned measuring_mode (void) const 00065 { 00066 return (m_data[MEASURING_MODE_OFFSET]); 00067 } 00068 unsigned units (void) const 00069 { 00070 return (m_data[UNITS_OFFSET]); 00071 } 00072 unsigned temporary_field (void) const 00073 { 00074 return (m_data[TEMPORARY_FIELD_OFFSET]); 00075 } 00076 bool field_a_b_subtractive (void) const 00077 { 00078 return (m_data[FIELD_A_B_SUBTRACTIVE_OFFSET]); 00079 } 00080 unsigned multiple_eval (void) const 00081 { 00082 return (m_data[MULTIPLE_EVAL_OFFSET]); 00083 } 00084 unsigned restart (void) const 00085 { 00086 return (m_data[RESTART_OFFSET]); 00087 } 00088 unsigned restart_time (void) const 00089 { 00090 return (m_data[RESTART_TIME_OFFSET]); 00091 } 00092 unsigned blanking_multiple_eval (void) const 00093 { 00094 return (m_data[BLANKING_MULTIPLE_EVAL_OFFSET]); 00095 } 00096 unsigned contour_a_reference (void) const 00097 { 00098 return (m_data[CONTOUR_A_REFERENCE_OFFSET]); 00099 } 00100 unsigned contour_a_pos_tolerance (void) const 00101 { 00102 return (m_data[CONTOUR_A_POS_TOLERANCE_OFFSET]); 00103 } 00104 unsigned contour_a_neg_tolerance (void) const 00105 { 00106 return (m_data[CONTOUR_A_NEG_TOLERANCE_OFFSET]); 00107 } 00108 unsigned contour_a_beg_angle (void) const 00109 { 00110 return (m_data[CONTOUR_A_BEG_ANGLE_OFFSET]); 00111 } 00112 unsigned contour_a_end_angle (void) const 00113 { 00114 return (m_data[CONTOUR_A_END_ANGLE_OFFSET]); 00115 } 00116 unsigned contour_b_reference (void) const 00117 { 00118 return (m_data[CONTOUR_B_REFERENCE_OFFSET]); 00119 } 00120 unsigned contour_b_pos_tolerance (void) const 00121 { 00122 return (m_data[CONTOUR_B_POS_TOLERANCE_OFFSET]); 00123 } 00124 unsigned contour_b_neg_tolerance (void) const 00125 { 00126 return (m_data[CONTOUR_B_NEG_TOLERANCE_OFFSET]); 00127 } 00128 unsigned contour_b_beg_angle (void) const 00129 { 00130 return (m_data[CONTOUR_B_BEG_ANGLE_OFFSET]); 00131 } 00132 unsigned contour_b_end_angle (void) const 00133 { 00134 return (m_data[CONTOUR_B_END_ANGLE_OFFSET]); 00135 } 00136 unsigned contour_c_reference (void) const 00137 { 00138 return (m_data[CONTOUR_C_REFERENCE_OFFSET]); 00139 } 00140 unsigned contour_c_pos_tolerance (void) const 00141 { 00142 return (m_data[CONTOUR_C_POS_TOLERANCE_OFFSET]); 00143 } 00144 unsigned contour_c_neg_tolerance (void) const 00145 { 00146 return (m_data[CONTOUR_C_NEG_TOLERANCE_OFFSET]); 00147 } 00148 unsigned contour_c_beg_angle (void) const 00149 { 00150 return (m_data[CONTOUR_C_BEG_ANGLE_OFFSET]); 00151 } 00152 unsigned contour_c_end_angle (void) const 00153 { 00154 return (m_data[CONTOUR_C_END_ANGLE_OFFSET]); 00155 } 00156 bool pixel_eval (void) const 00157 { 00158 return (m_data[PIXEL_EVAL_OFFSET]); 00159 } 00160 unsigned single_eval_mode (void) const 00161 { 00162 return (m_data[SINGLE_EVAL_MODE_OFFSET]); 00163 } 00164 unsigned field_b_c_restart_time (void) const 00165 { 00166 return (letoh<u16_t> (m_data + 00167 FIELD_B_C_RESTART_TIME_OFFSET)); 00168 } 00169 unsigned dazzling_multiple_eval (void) const 00170 { 00171 return (letoh<u16_t> (m_data + 00172 DAZZLING_MULTIPLE_EVAL_OFFSET)); 00173 } 00174 }; 00175 }; 00176 00177 00178 #endif