Changeset 458 for vtcross/trunk/src/cognitive_engines/OSSIE_DEMO_CE/cbr.c
- Timestamp:
- 09/03/09 00:23:49 (15 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
vtcross/trunk/src/cognitive_engines/OSSIE_DEMO_CE/cbr.c
r457 r458 129 129 strcat(_cbr->command, ", "); 130 130 } 131 strcat(_cbr->command, ", timestamp DATE, PRIMARY KEY( biterrorrate,tx_power));");131 strcat(_cbr->command, ", timestamp DATE, PRIMARY KEY(tx_power));"); 132 132 133 133 // execute create table command … … 190 190 float *_vals, 191 191 unsigned int _n, 192 float *_retvals) 192 float *_retvals, 193 int evf) 193 194 { 194 195 int rc; 196 float lower_limit; 197 float upper_limit; 195 198 // generate command 196 199 strcpy(_cbr->command, "select "); … … 211 214 212 215 strcat(_cbr->command, _names[i]); 213 strcat(_cbr->command, ops_str[_ops[i]]); 214 sprintf(str_buffer, "%E", _vals[i]); 215 strcat(_cbr->command, str_buffer); 216 strcat(_cbr->command, " between "); 217 218 lower_limit = _vals[i]*(1-((float)evf/100)); 219 upper_limit = _vals[i]*(1+((float)evf/100)); 220 221 printf("%f %f %f\n", lower_limit, upper_limit, _vals[i]); 222 223 sprintf(_cbr->command, "%s%f", _cbr->command, lower_limit); 224 strcat(_cbr->command, " and "); 225 sprintf(_cbr->command, "%s%f", _cbr->command, upper_limit); 216 226 217 227