00001
00002 #ifndef TOOLBOXHH
00003 #define TOOLBOXHH
00004
00005 #include <string>
00006
00007
00008
00009
00010
00011
00012 #include "mTypes.h"
00013
00014
00015
00016
00017 #define NO_V 0
00018 #define LAW_V 1
00019 #define HIGHT_V 2
00020
00021 class Toolbox {
00022
00023 public:
00024 ~Toolbox();
00025
00026 static void readSteerFile(std::string fileNamne, bool verbose );
00027 static unsigned short bigTolittle ( short value );
00028 static void addIntToString(std::string& chaine,int value);
00029 static void addFloatToString(std::string& chaine, float value);
00030
00031
00032 static const unsigned int MASK_LSB = 0x00ff;
00033 static const unsigned int MASK_MSB = 0xff00;
00034 static const unsigned long MASK_CHANNEL_DATA = 0x00000fff;
00035 static const unsigned long MASK_CHANNEL_NUMBER = 0x007ff000;
00036 static const unsigned int MASK_12BIT = 0x0fff;
00037
00038 static void printRepere( bool xRotation, bool yRotation, int zRotation );
00039
00040
00041
00042
00043
00044 private:
00045 Toolbox();
00046 };
00047
00048
00049
00050 struct BinOut {
00051 unsigned long int _Num;
00052 unsigned int _Digits;
00053 inline BinOut(const unsigned long int num, const unsigned int digits = 32) : _Num(num), _Digits(digits) { };
00054 };
00055
00056 std::ostream& operator <<(std::ostream &out, const BinOut& x);
00057
00058 #endif