iCub-main
expected_values.h
Go to the documentation of this file.
1 #ifndef EXPECTED_VALUES_H
2 #define EXPECTED_VALUES_H
3 
4 #include <string>
5 
7 {
8  signed short dat[6];
11  signed_elem_class () {for (int i=0; i<6; i++) {dat[i]=0;}}
12  void remove_bias (signed_elem_class bias) {for (int i=0; i<6; i++) {dat[i]-=bias.dat[i];}}
13 };
14 
16 {
19  unsigned short dat[6];
20  unsigned_elem_class () {for (int i=0; i<6; i++) {dat[i]=0;}}
21 };
22 
24 {
25  private:
26  int expected_values [6][24];
27  int threshold1;
28  int threshold2;
29  std::string serialnumber;
30  static const int def_expected_values[24][6]; // yes: [24][6] !
31  static const int def_expected_values_thresholds[2];
32 
33  public:
35  bool init(const char* filename);
36  bool init();
37  bool check_vals(signed_elem_class values, int trial, signed_elem_class& diff, signed_elem_class& in_bound);
38  void get_current_expected_values (signed_elem_class& values, int trial);
39  std::string get_serialnumber();
40  bool get_thresholds(int &low, int &high);
41 };
42 
43 #endif
bool get_thresholds(int &low, int &high)
void get_current_expected_values(signed_elem_class &values, int trial)
bool check_vals(signed_elem_class values, int trial, signed_elem_class &diff, signed_elem_class &in_bound)
signed short dat[6]
void remove_bias(signed_elem_class bias)
signed_elem_class & operator=(const signed_elem_class &rhs)
unsigned short dat[6]
unsigned_elem_class & operator=(const unsigned_elem_class &rhs)