KatanaNativeInterface  $VERSION$
kmlCommon.h
Go to the documentation of this file.
1 //
2 // C++ Interface: kmlCommon
3 //
4 // Description:
5 //
6 //
7 // Author: Tiziano Müller <tiziano.mueller@neuronics.ch>, (C) 2006
8 //
9 // Copyright: See COPYING file that comes with this distribution
10 //
11 //
12 
13 #ifndef KMLCOMMON_H
14 #define KMLCOMMON_H
15 
16 #include "common/exception.h"
17 #include <string>
18 
19 #define TM_ENDLESS -1
20 
21 #if !defined (BYTE_DECLARED)
22 #define BYTE_DECLARED
23 typedef unsigned char byte;
24 #endif
25 
30 
31 
36 public:
37  SlaveErrorException() throw ():
38  Exception("Internal Slave Error", -31) {}
39 };
40 
45 public:
46  ParameterReadingException(const std::string &para) throw ():
47  Exception("Reading '" + para + "' parameters failed", -32) {}
48 };
49 
54 public:
55  ParameterWritingException(const std::string &para) throw ():
56  Exception("Writing '" + para + "' parameters failed", -33) {}
57 };
58 
63 public:
64  WrongParameterException(const std::string &para) throw ():
65  Exception("Wrong parameters '" + para + "' set", -34) {}
66 };
67 
72 public:
74  Exception("Encoders for motor are out of range", -35) {}
75 };
76 
81 public:
83  Exception("Motor timeout", -36) {}
84 };
85 
90 public:
91  MotorCrashException() throw ():
92  Exception("Motor crashed", -37) {}
93 };
94 
98 
99 
100 
101 
102 
103 
104 #endif
ParameterWritingException
The data you wanted to send to the robot was invalid.
Definition: kmlCommon.h:53
WrongParameterException::WrongParameterException
WrongParameterException(const std::string &para)
Definition: kmlCommon.h:64
ParameterReadingException::ParameterReadingException
ParameterReadingException(const std::string &para)
Definition: kmlCommon.h:46
MotorOutOfRangeException
The encoders for the given motor were out of range.
Definition: kmlCommon.h:71
Exception::Exception
Exception(const std::string &message, const int error_number)
Definition: exception.h:85
Exception
Definition: exception.h:79
MotorCrashException::MotorCrashException
MotorCrashException()
Definition: kmlCommon.h:91
MotorOutOfRangeException::MotorOutOfRangeException
MotorOutOfRangeException()
Definition: kmlCommon.h:73
ParameterReadingException
There was an error while reading a parameter from the robot.
Definition: kmlCommon.h:44
SlaveErrorException
Slave error occurred.
Definition: kmlCommon.h:35
exception.h
MotorTimeoutException
The timeout elapsed for the given motor and target position.
Definition: kmlCommon.h:80
MotorTimeoutException::MotorTimeoutException
MotorTimeoutException()
Definition: kmlCommon.h:82
WrongParameterException
The given parameter was wrong.
Definition: kmlCommon.h:62
ParameterWritingException::ParameterWritingException
ParameterWritingException(const std::string &para)
Definition: kmlCommon.h:55
SlaveErrorException::SlaveErrorException
SlaveErrorException()
Definition: kmlCommon.h:37
MotorCrashException
The requested motor crashed during the movement.
Definition: kmlCommon.h:89
byte
unsigned char byte
type specification (8 bit)
Definition: kmlCommon.h:23